From: Marcin Siodelski Date: Thu, 7 May 2020 16:00:19 +0000 (+0200) Subject: [#999] Allow single server in PB mode X-Git-Tag: Kea-1.7.8~117 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c32d564605ca51a61cde69d2e6569a88e41b5060;p=thirdparty%2Fkea.git [#999] Allow single server in PB mode --- diff --git a/src/hooks/dhcp/high_availability/ha_config_parser.cc b/src/hooks/dhcp/high_availability/ha_config_parser.cc index e6fb98cd8a..5e71910dce 100644 --- a/src/hooks/dhcp/high_availability/ha_config_parser.cc +++ b/src/hooks/dhcp/high_availability/ha_config_parser.cc @@ -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) { diff --git a/src/hooks/dhcp/high_availability/tests/ha_config_unittest.cc b/src/hooks/dhcp/high_availability/tests/ha_config_unittest.cc index 2fe508f3ed..280e996746 100644 --- a/src/hooks/dhcp/high_availability/tests/ha_config_unittest.cc +++ b/src/hooks/dhcp/high_availability/tests/ha_config_unittest.cc @@ -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.