Commit 249219f1 authored by Thomas Markwalder's avatar Thomas Markwalder

[5477] dhcpsrv/postgres and kea-dhcp4 now support db reconnect

kea-dhcp4
    added support for max-reconnect-tries and reconnect-wait-time
    to lease and host db parsers

    Added a callback for when DB backends detect loss of connectivity

    Added a self-rescheduling method to attempt to reconnect to the
    backends if retries are enabled

dhcpsrv
    Added a callback that DatabaseConnection derivations should invoke
    when they lose connectivity.

    Added an optional callback parameter from CfgDbAccess::createManagers()
    all the way down to DatabaseConnection ctor.

    pgsql_connection.cc
        PgSqlConnection::~PgSqlConnection() - Added logic to close the
        connection only when the connect state is still OK.
        Otherwise it likes to core dump.

        PgSqlConnection::checkStatementError() - Modified to invoke the
        connectivity lost callback on "fatal" errors

    pgsql_lease_mgr_unittest.cc
    pgsql_host_data_source_unittest.cc
        Added tests to verify that the lost callback is NOT invoked on an
        open failure
parent f124d85d
......@@ -18,6 +18,7 @@
#include <hooks/hooks_manager.h>
#include <stats/stats_mgr.h>
#include <cfgrpt/config_report.h>
#include <boost/lexical_cast.hpp>
#include <signal.h>
#include <sstream>
......@@ -543,6 +544,83 @@ ControlledDhcpv4Srv::processCommand(const string& command,
}
}
void
ControlledDhcpv4Srv::dbReconnect() {
bool reopened = false;
// Re-open lease and host database with new parameters.
try {
CfgDbAccessPtr cfg_db = CfgMgr::instance().getCurrentCfg()->getCfgDbAccess();
cfg_db->createManagers(boost::bind(&ControlledDhcpv4Srv::dbLostCallback, this, _1));
reopened = true;
} catch (const std::exception& ex) {
LOG_ERROR(dhcp4_logger, DHCP4_DB_RECONNECT_ATTEMPT_FAILED).arg(ex.what());
}
if (reopened) {
// Cancel the timer.
if (TimerMgr::instance()->isTimerRegistered("Dhcp4DbReconnectTimer")) {
TimerMgr::instance()->cancel("Dhcp4DbReconnectTimer");
}
// Set network state to service enabled
network_state_.enableService();
// Toss the reconnct control, we're done with it
db_reconnect_ctl_.reset();
} else {
if (!db_reconnect_ctl_->checkRetries()) {
LOG_ERROR(dhcp4_logger, DHCP4_DB_RECONNECT_RETRIES_EXHAUSTED)
.arg(db_reconnect_ctl_->maxRetries());
shutdown();
return;
}
LOG_INFO(dhcp4_logger, DHCP4_DB_RECONNECT_ATTEMPT_SCHEDULE)
.arg(db_reconnect_ctl_->maxRetries() - db_reconnect_ctl_->retriesLeft())
.arg(db_reconnect_ctl_->maxRetries())
.arg(db_reconnect_ctl_->retryInterval());
if (!TimerMgr::instance()->isTimerRegistered("Dhcp4DbReconnectTimer")) {
TimerMgr::instance()->registerTimer("Dhcp4DbReconnectTimer",
boost::bind(&ControlledDhcpv4Srv::dbReconnect, this),
db_reconnect_ctl_->retryInterval() * 1000,
asiolink::IntervalTimer::ONE_SHOT);
}
TimerMgr::instance()->setup("Dhcp4DbReconnectTimer");
}
}
bool
ControlledDhcpv4Srv::dbLostCallback(ReconnectCtlPtr db_reconnect_ctl) {
// Disable service until we recover
network_state_.disableService();
if (!db_reconnect_ctl) {
// This shouldn't never happen
LOG_ERROR(dhcp4_logger, DHCP4_DB_RECONNECT_NO_DB_CTL);
return (false);
}
// If reconnect isn't enabled, log it and return false
if (!db_reconnect_ctl->retriesLeft() ||
!db_reconnect_ctl->retryInterval()) {
LOG_INFO(dhcp4_logger, DHCP4_DB_RECONNECT_DISABLED)
.arg(db_reconnect_ctl->retriesLeft())
.arg(db_reconnect_ctl->retryInterval());
return(false);
}
// Save the reconnect control
db_reconnect_ctl_ = db_reconnect_ctl;
// Invoke reconnect method
dbReconnect();
return(true);
}
isc::data::ConstElementPtr
ControlledDhcpv4Srv::processConfig(isc::data::ConstElementPtr config) {
......@@ -578,8 +656,7 @@ ControlledDhcpv4Srv::processConfig(isc::data::ConstElementPtr config) {
try {
CfgDbAccessPtr cfg_db = CfgMgr::instance().getStagingCfg()->getCfgDbAccess();
cfg_db->setAppendedParameters("universe=4");
cfg_db->createManagers();
cfg_db->createManagers(boost::bind(&ControlledDhcpv4Srv::dbLostCallback, srv, _1));
} catch (const std::exception& ex) {
err << "Unable to open database: " << ex.what();
return (isc::config::createAnswer(1, err.str()));
......@@ -651,7 +728,8 @@ ControlledDhcpv4Srv::checkConfig(isc::data::ConstElementPtr config) {
}
ControlledDhcpv4Srv::ControlledDhcpv4Srv(uint16_t port /*= DHCP4_SERVER_PORT*/)
: Dhcpv4Srv(port), io_service_(), timer_mgr_(TimerMgr::instance()) {
: Dhcpv4Srv(port), io_service_(), timer_mgr_(TimerMgr::instance()),
db_reconnect_ctl_(0) {
if (getInstance()) {
isc_throw(InvalidOperation,
"There is another Dhcpv4Srv instance already.");
......
......@@ -11,6 +11,7 @@
#include <asiolink/asiolink.h>
#include <cc/data.h>
#include <cc/command_interpreter.h>
#include <dhcpsrv/database_connection.h>
#include <dhcpsrv/timer_mgr.h>
#include <dhcp4/dhcp4_srv.h>
......@@ -331,6 +332,15 @@ private:
/// Shared pointer to the instance of timer @c TimerMgr is held here to
/// make sure that the @c TimerMgr outlives instance of this class.
TimerMgrPtr timer_mgr_;
/// @brief Attempts to reconnect the server to the DB backend managers
void dbReconnect();
/// @brief Callback DB backends should invoke upon loss of connectivity
bool dbLostCallback(ReconnectCtlPtr db_reconnect_ctl);
/// @brief Pointer the current DB reconnect control values
ReconnectCtlPtr db_reconnect_ctl_;
};
}; // namespace isc::dhcp
......
This diff is collapsed.
......@@ -440,6 +440,26 @@ ControlCharacterFill [^"\\]|\\{JSONEscapeSequence}
}
}
\"max-reconnect-tries\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LEASE_DATABASE:
case isc::dhcp::Parser4Context::HOSTS_DATABASE:
return isc::dhcp::Dhcp4Parser::make_MAX_RECONNECT_TRIES(driver.loc_);
default:
return isc::dhcp::Dhcp4Parser::make_STRING("max-reconnect-tries", driver.loc_);
}
}
\"reconnect-wait-time\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LEASE_DATABASE:
case isc::dhcp::Parser4Context::HOSTS_DATABASE:
return isc::dhcp::Dhcp4Parser::make_RECONNECT_WAIT_TIME(driver.loc_);
default:
return isc::dhcp::Dhcp4Parser::make_STRING("reconnect-wait-time", driver.loc_);
}
}
\"valid-lifetime\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
......
......@@ -140,6 +140,33 @@ change is committed by the administrator.
A debug message indicating that the DHCPv4 server has received an
updated configuration from the Kea configuration system.
% DHCP4_DB_RECONNECT_ATTEMPT_SCHEDULE Scheduling attempt %1 of %2 in %3 seconds
An informational message indicating that the server is scheduling the next
attempt to reconnect to its lease and/or host databases. This occurs when the
server has lost databse connectivity and is attempting to reconnect
automatically.
% DHCP4_DB_RECONNECT_ATTEMPT_FAILED database reconnect failed: %1
An error message indicating that an attempt to reconnect to the lease and/or
host data bases has failed. This occurs after connectivity to either one
has been lost and an automatic attempt to reconnect has failed.
% DHCP4_DB_RECONNECT_NO_DB_CTL unexpected error in database reconnect
This is an error message indicating a programmatic error that should not
occur. It will prohibit the server from attempting to reconnect to its
databases if connectivy is lost, and the server will exit. This error
should be reported.
% DHCP4_DB_RECONNECT_DISABLED database reconnect is disabled: max-reconnect-tries %1, reconnect-wait-time %1
This is an informational message indicating that connetivity to either the
lease or host database or both and that automatic reconnect is not enabled.
% DHCP4_DB_RECONNECT_RETRIES_EXHAUSTED - Maximum number of Database reconnect attempts: %1, hasbeen exhausted without success, server is shutting down!
This error indicates that the server is shutting after failing to reconnect to
the lease and/or host database(s) after making the maximum configured number
of reconnect attempts. Loss of connectivity is typically a network or database
server issue.
% DHCP4_DDNS_REQUEST_SEND_FAILED failed sending a request to kea-dhcp-ddns, error: %1, ncr: %2
This error message indicates that DHCP4 server attempted to send a DDNS
update request to the DHCP-DDNS server. This is most likely a configuration or
......
This diff is collapsed.
......@@ -387,116 +387,118 @@ namespace isc { namespace dhcp {
TOKEN_CONNECT_TIMEOUT = 294,
TOKEN_CONTACT_POINTS = 295,
TOKEN_KEYSPACE = 296,
TOKEN_VALID_LIFETIME = 297,
TOKEN_RENEW_TIMER = 298,
TOKEN_REBIND_TIMER = 299,
TOKEN_DECLINE_PROBATION_PERIOD = 300,
TOKEN_SUBNET4 = 301,
TOKEN_SUBNET_4O6_INTERFACE = 302,
TOKEN_SUBNET_4O6_INTERFACE_ID = 303,
TOKEN_SUBNET_4O6_SUBNET = 304,
TOKEN_OPTION_DEF = 305,
TOKEN_OPTION_DATA = 306,
TOKEN_NAME = 307,
TOKEN_DATA = 308,
TOKEN_CODE = 309,
TOKEN_SPACE = 310,
TOKEN_CSV_FORMAT = 311,
TOKEN_ALWAYS_SEND = 312,
TOKEN_RECORD_TYPES = 313,
TOKEN_ENCAPSULATE = 314,
TOKEN_ARRAY = 315,
TOKEN_SHARED_NETWORKS = 316,
TOKEN_POOLS = 317,
TOKEN_POOL = 318,
TOKEN_USER_CONTEXT = 319,
TOKEN_COMMENT = 320,
TOKEN_SUBNET = 321,
TOKEN_INTERFACE = 322,
TOKEN_INTERFACE_ID = 323,
TOKEN_ID = 324,
TOKEN_RAPID_COMMIT = 325,
TOKEN_RESERVATION_MODE = 326,
TOKEN_DISABLED = 327,
TOKEN_OUT_OF_POOL = 328,
TOKEN_ALL = 329,
TOKEN_HOST_RESERVATION_IDENTIFIERS = 330,
TOKEN_CLIENT_CLASSES = 331,
TOKEN_TEST = 332,
TOKEN_CLIENT_CLASS = 333,
TOKEN_RESERVATIONS = 334,
TOKEN_DUID = 335,
TOKEN_HW_ADDRESS = 336,
TOKEN_CIRCUIT_ID = 337,
TOKEN_CLIENT_ID = 338,
TOKEN_HOSTNAME = 339,
TOKEN_FLEX_ID = 340,
TOKEN_RELAY = 341,
TOKEN_IP_ADDRESS = 342,
TOKEN_HOOKS_LIBRARIES = 343,
TOKEN_LIBRARY = 344,
TOKEN_PARAMETERS = 345,
TOKEN_EXPIRED_LEASES_PROCESSING = 346,
TOKEN_RECLAIM_TIMER_WAIT_TIME = 347,
TOKEN_FLUSH_RECLAIMED_TIMER_WAIT_TIME = 348,
TOKEN_HOLD_RECLAIMED_TIME = 349,
TOKEN_MAX_RECLAIM_LEASES = 350,
TOKEN_MAX_RECLAIM_TIME = 351,
TOKEN_UNWARNED_RECLAIM_CYCLES = 352,
TOKEN_DHCP4O6_PORT = 353,
TOKEN_CONTROL_SOCKET = 354,
TOKEN_SOCKET_TYPE = 355,
TOKEN_SOCKET_NAME = 356,
TOKEN_DHCP_DDNS = 357,
TOKEN_ENABLE_UPDATES = 358,
TOKEN_QUALIFYING_SUFFIX = 359,
TOKEN_SERVER_IP = 360,
TOKEN_SERVER_PORT = 361,
TOKEN_SENDER_IP = 362,
TOKEN_SENDER_PORT = 363,
TOKEN_MAX_QUEUE_SIZE = 364,
TOKEN_NCR_PROTOCOL = 365,
TOKEN_NCR_FORMAT = 366,
TOKEN_ALWAYS_INCLUDE_FQDN = 367,
TOKEN_OVERRIDE_NO_UPDATE = 368,
TOKEN_OVERRIDE_CLIENT_UPDATE = 369,
TOKEN_REPLACE_CLIENT_NAME = 370,
TOKEN_GENERATED_PREFIX = 371,
TOKEN_TCP = 372,
TOKEN_JSON = 373,
TOKEN_WHEN_PRESENT = 374,
TOKEN_NEVER = 375,
TOKEN_ALWAYS = 376,
TOKEN_WHEN_NOT_PRESENT = 377,
TOKEN_LOGGING = 378,
TOKEN_LOGGERS = 379,
TOKEN_OUTPUT_OPTIONS = 380,
TOKEN_OUTPUT = 381,
TOKEN_DEBUGLEVEL = 382,
TOKEN_SEVERITY = 383,
TOKEN_FLUSH = 384,
TOKEN_MAXSIZE = 385,
TOKEN_MAXVER = 386,
TOKEN_DHCP6 = 387,
TOKEN_DHCPDDNS = 388,
TOKEN_CONTROL_AGENT = 389,
TOKEN_TOPLEVEL_JSON = 390,
TOKEN_TOPLEVEL_DHCP4 = 391,
TOKEN_SUB_DHCP4 = 392,
TOKEN_SUB_INTERFACES4 = 393,
TOKEN_SUB_SUBNET4 = 394,
TOKEN_SUB_POOL4 = 395,
TOKEN_SUB_RESERVATION = 396,
TOKEN_SUB_OPTION_DEFS = 397,
TOKEN_SUB_OPTION_DEF = 398,
TOKEN_SUB_OPTION_DATA = 399,
TOKEN_SUB_HOOKS_LIBRARY = 400,
TOKEN_SUB_DHCP_DDNS = 401,
TOKEN_SUB_LOGGING = 402,
TOKEN_STRING = 403,
TOKEN_INTEGER = 404,
TOKEN_FLOAT = 405,
TOKEN_BOOLEAN = 406
TOKEN_MAX_RECONNECT_TRIES = 297,
TOKEN_RECONNECT_WAIT_TIME = 298,
TOKEN_VALID_LIFETIME = 299,
TOKEN_RENEW_TIMER = 300,
TOKEN_REBIND_TIMER = 301,
TOKEN_DECLINE_PROBATION_PERIOD = 302,
TOKEN_SUBNET4 = 303,
TOKEN_SUBNET_4O6_INTERFACE = 304,
TOKEN_SUBNET_4O6_INTERFACE_ID = 305,
TOKEN_SUBNET_4O6_SUBNET = 306,
TOKEN_OPTION_DEF = 307,
TOKEN_OPTION_DATA = 308,
TOKEN_NAME = 309,
TOKEN_DATA = 310,
TOKEN_CODE = 311,
TOKEN_SPACE = 312,
TOKEN_CSV_FORMAT = 313,
TOKEN_ALWAYS_SEND = 314,
TOKEN_RECORD_TYPES = 315,
TOKEN_ENCAPSULATE = 316,
TOKEN_ARRAY = 317,
TOKEN_SHARED_NETWORKS = 318,
TOKEN_POOLS = 319,
TOKEN_POOL = 320,
TOKEN_USER_CONTEXT = 321,
TOKEN_COMMENT = 322,
TOKEN_SUBNET = 323,
TOKEN_INTERFACE = 324,
TOKEN_INTERFACE_ID = 325,
TOKEN_ID = 326,
TOKEN_RAPID_COMMIT = 327,
TOKEN_RESERVATION_MODE = 328,
TOKEN_DISABLED = 329,
TOKEN_OUT_OF_POOL = 330,
TOKEN_ALL = 331,
TOKEN_HOST_RESERVATION_IDENTIFIERS = 332,
TOKEN_CLIENT_CLASSES = 333,
TOKEN_TEST = 334,
TOKEN_CLIENT_CLASS = 335,
TOKEN_RESERVATIONS = 336,
TOKEN_DUID = 337,
TOKEN_HW_ADDRESS = 338,
TOKEN_CIRCUIT_ID = 339,
TOKEN_CLIENT_ID = 340,
TOKEN_HOSTNAME = 341,
TOKEN_FLEX_ID = 342,
TOKEN_RELAY = 343,
TOKEN_IP_ADDRESS = 344,
TOKEN_HOOKS_LIBRARIES = 345,
TOKEN_LIBRARY = 346,
TOKEN_PARAMETERS = 347,
TOKEN_EXPIRED_LEASES_PROCESSING = 348,
TOKEN_RECLAIM_TIMER_WAIT_TIME = 349,
TOKEN_FLUSH_RECLAIMED_TIMER_WAIT_TIME = 350,
TOKEN_HOLD_RECLAIMED_TIME = 351,
TOKEN_MAX_RECLAIM_LEASES = 352,
TOKEN_MAX_RECLAIM_TIME = 353,
TOKEN_UNWARNED_RECLAIM_CYCLES = 354,
TOKEN_DHCP4O6_PORT = 355,
TOKEN_CONTROL_SOCKET = 356,
TOKEN_SOCKET_TYPE = 357,
TOKEN_SOCKET_NAME = 358,
TOKEN_DHCP_DDNS = 359,
TOKEN_ENABLE_UPDATES = 360,
TOKEN_QUALIFYING_SUFFIX = 361,
TOKEN_SERVER_IP = 362,
TOKEN_SERVER_PORT = 363,
TOKEN_SENDER_IP = 364,
TOKEN_SENDER_PORT = 365,
TOKEN_MAX_QUEUE_SIZE = 366,
TOKEN_NCR_PROTOCOL = 367,
TOKEN_NCR_FORMAT = 368,
TOKEN_ALWAYS_INCLUDE_FQDN = 369,
TOKEN_OVERRIDE_NO_UPDATE = 370,
TOKEN_OVERRIDE_CLIENT_UPDATE = 371,
TOKEN_REPLACE_CLIENT_NAME = 372,
TOKEN_GENERATED_PREFIX = 373,
TOKEN_TCP = 374,
TOKEN_JSON = 375,
TOKEN_WHEN_PRESENT = 376,
TOKEN_NEVER = 377,
TOKEN_ALWAYS = 378,
TOKEN_WHEN_NOT_PRESENT = 379,
TOKEN_LOGGING = 380,
TOKEN_LOGGERS = 381,
TOKEN_OUTPUT_OPTIONS = 382,
TOKEN_OUTPUT = 383,
TOKEN_DEBUGLEVEL = 384,
TOKEN_SEVERITY = 385,
TOKEN_FLUSH = 386,
TOKEN_MAXSIZE = 387,
TOKEN_MAXVER = 388,
TOKEN_DHCP6 = 389,
TOKEN_DHCPDDNS = 390,
TOKEN_CONTROL_AGENT = 391,
TOKEN_TOPLEVEL_JSON = 392,
TOKEN_TOPLEVEL_DHCP4 = 393,
TOKEN_SUB_DHCP4 = 394,
TOKEN_SUB_INTERFACES4 = 395,
TOKEN_SUB_SUBNET4 = 396,
TOKEN_SUB_POOL4 = 397,
TOKEN_SUB_RESERVATION = 398,
TOKEN_SUB_OPTION_DEFS = 399,
TOKEN_SUB_OPTION_DEF = 400,
TOKEN_SUB_OPTION_DATA = 401,
TOKEN_SUB_HOOKS_LIBRARY = 402,
TOKEN_SUB_DHCP_DDNS = 403,
TOKEN_SUB_LOGGING = 404,
TOKEN_STRING = 405,
TOKEN_INTEGER = 406,
TOKEN_FLOAT = 407,
TOKEN_BOOLEAN = 408
};
};
......@@ -771,6 +773,14 @@ namespace isc { namespace dhcp {
symbol_type
make_KEYSPACE (const location_type& l);
static inline
symbol_type
make_MAX_RECONNECT_TRIES (const location_type& l);
static inline
symbol_type
make_RECONNECT_WAIT_TIME (const location_type& l);
static inline
symbol_type
make_VALID_LIFETIME (const location_type& l);
......@@ -1416,12 +1426,12 @@ namespace isc { namespace dhcp {
enum
{
yyeof_ = 0,
yylast_ = 892, ///< Last index in yytable_.
yynnts_ = 337, ///< Number of nonterminal symbols.
yylast_ = 900, ///< Last index in yytable_.
yynnts_ = 339, ///< Number of nonterminal symbols.
yyfinal_ = 28, ///< Termination state number.
yyterror_ = 1,
yyerrcode_ = 256,
yyntokens_ = 152 ///< Number of tokens.
yyntokens_ = 154 ///< Number of tokens.
};
......@@ -1478,9 +1488,9 @@ namespace isc { namespace dhcp {
115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
145, 146, 147, 148, 149, 150, 151
145, 146, 147, 148, 149, 150, 151, 152, 153
};
const unsigned int user_token_number_max_ = 406;
const unsigned int user_token_number_max_ = 408;
const token_number_type undef_token_ = 2;
if (static_cast<int>(t) <= yyeof_)
......@@ -1513,30 +1523,30 @@ namespace isc { namespace dhcp {
{
switch (other.type_get ())
{
case 167: // value
case 171: // map_value
case 209: // socket_type
case 212: // outbound_interface_value
case 222: // db_type
case 299: // hr_mode
case 444: // ncr_protocol_value
case 452: // replace_client_name_value
case 169: // value
case 173: // map_value
case 211: // socket_type
case 214: // outbound_interface_value
case 224: // db_type
case 303: // hr_mode
case 448: // ncr_protocol_value
case 456: // replace_client_name_value
value.copy< ElementPtr > (other.value);
break;
case 151: // "boolean"
case 153: // "boolean"
value.copy< bool > (other.value);
break;
case 150: // "floating point"
case 152: // "floating point"
value.copy< double > (other.value);
break;
case 149: // "integer"
case 151: // "integer"
value.copy< int64_t > (other.value);
break;
case 148: // "constant string"
case 150: // "constant string"
value.copy< std::string > (other.value);
break;
......@@ -1557,30 +1567,30 @@ namespace isc { namespace dhcp {
(void) v;
switch (this->type_get ())
{
case 167: // value
case 171: // map_value
case 209: // socket_type
case 212: // outbound_interface_value
case 222: // db_type
case 299: // hr_mode
case 444: // ncr_protocol_value
case 452: // replace_client_name_value
case 169: // value
case 173: // map_value
case 211: // socket_type
case 214: // outbound_interface_value
case 224: // db_type
case 303: // hr_mode
case 448: // ncr_protocol_value
case 456: // replace_client_name_value
value.copy< ElementPtr > (v);
break;
case 151: // "boolean"
case 153: // "boolean"
value.copy< bool > (v);
break;
case 150: // "floating point"
case 152: // "floating point"
value.copy< double > (v);
break;
case 149: // "integer"
case 151: // "integer"
value.copy< int64_t > (v);
break;
case 148: // "constant string"
case 150: // "constant string"
value.copy< std::string > (v);
break;
......@@ -1660,30 +1670,30 @@ namespace isc { namespace dhcp {
// Type destructor.
switch (yytype)
{
case 167: // value
case 171: // map_value
case 209: // socket_type
case 212: // outbound_interface_value
case 222: // db_type
case 299: // hr_mode
case 444: // ncr_protocol_value
case 452: // replace_client_name_value
case 169: // value
case 173: // map_value
case 211: // socket_type
case 214: // outbound_interface_value
case 224: // db_type
case 303: // hr_mode
case 448: // ncr_protocol_value
case 456: // replace_client_name_value
value.template destroy< ElementPtr > ();
break;
case 151: // "boolean"
case 153: // "boolean"
value.template destroy< bool > ();
break;
case 150: // "floating point"
case 152: // "floating point"
value.template destroy< double > ();
break;
case 149: // "integer"
case 151: // "integer"
value.template destroy< int64_t > ();
break;
case 148: // "constant string"
case 150: // "constant string"
value.template destroy< std::string > ();
break;
......@@ -1710,30 +1720,30 @@ namespace isc { namespace dhcp {
super_type::move(s);
switch (this->type_get ())
{
case 167: // value
case 171