]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#999] Allow single server in PB mode
authorMarcin Siodelski <marcin@isc.org>
Thu, 7 May 2020 16:00:19 +0000 (18:00 +0200)
committerMarcin Siodelski <marcin@isc.org>
Fri, 8 May 2020 17:29:09 +0000 (19:29 +0200)
src/hooks/dhcp/high_availability/ha_config_parser.cc
src/hooks/dhcp/high_availability/tests/ha_config_unittest.cc

index e6fb98cd8aaa5f7f0230bd69b74bd3cb93dc7047..5e71910dce9655567a9b8f4ec0c51abcdb5c0126 100644 (file)
@@ -164,12 +164,6 @@ HAConfigParser::parseInternal(const HAConfigPtr& config_storage,
     // Peers configuration parsing.
     const auto& peers_vec = peers->listValue();
 
-    // There must be at least two peers specified.
-    if (peers_vec.size() < 2) {
-        isc_throw(ConfigError, "peers configuration requires at least two peers"
-                  " to be specified");
-    }
-
     // Go over configuration of each peer.
     for (auto p = peers_vec.begin(); p != peers_vec.end(); ++p) {
 
index 2fe508f3edc3656db2a7ee68e5c09a4009163aef..280e99674614a52075d21ba627862046f2a3f06a 100644 (file)
@@ -493,7 +493,7 @@ TEST_F(HAConfigTest, singlePeer) {
         "        ]"
         "    }"
         "]",
-        "peers configuration requires at least two peers to be specified");
+        "secondary server required in the load balancing configuration");
 }
 
 // Server name must not be empty.