"Dhcp4": { "lease-database": { "retry-on-startup" : true, ... }, ... }
During server startup, the inability to connect to any of the configured
-backends is considered fatal only if ``retry-on-startup`` is set to ``false``.
-A fatal error is logged and the server exits, based on the idea that the
-configuration should be valid at startup. Exiting to the operating system allows
-nanny scripts to detect the problem.
+backends is considered fatal only if ``retry-on-startup`` is set to ``false``
+(the default). A fatal error is logged and the server exits, based on the idea
+that the configuration should be valid at startup. Exiting to the operating
+system allows nanny scripts to detect the problem.
If ``retry-on-startup`` is set to ``true``, the server will start reconnection
attempts even at server startup or on reconfigure events, and will honor the
-action specified in ``on-fail`` parameter.
+action specified in the ``on-fail`` parameter.
The host parameter is used by the MySQL and PostgreSQL backends.
"Dhcp4": { "hosts-database": { "retry-on-startup" : true, ... }, ... }
During server startup, the inability to connect to any of the configured
-backends is considered fatal only if ``retry-on-startup`` is set to ``false``.
-A fatal error is logged and the server exits, based on the idea that the
-configuration should be valid at startup. Exiting to the operating system allows
-nanny scripts to detect the problem.
+backends is considered fatal only if ``retry-on-startup`` is set to ``false``
+(the default). A fatal error is logged and the server exits, based on the idea
+that the configuration should be valid at startup. Exiting to the operating
+system allows nanny scripts to detect the problem.
If ``retry-on-startup`` is set to ``true``, the server will start reconnection
attempts even at server startup or on reconfigure events, and will honor the
-action specified in ``on-fail`` parameter.
+action specified in the ``on-fail`` parameter.
Finally, the credentials of the account under which the server will
access the database should be set:
"Dhcp6": { "lease-database": { "retry-on-startup" : true, ... }, ... }
During server startup, the inability to connect to any of the configured
-backends is considered fatal only if ``retry-on-startup`` is set to ``false``.
-A fatal error is logged and the server exits, based on the idea that the
-configuration should be valid at startup. Exiting to the operating system allows
-nanny scripts to detect the problem.
+backends is considered fatal only if ``retry-on-startup`` is set to ``false``
+(the default). A fatal error is logged and the server exits, based on the idea
+that the configuration should be valid at startup. Exiting to the operating
+system allows nanny scripts to detect the problem.
If ``retry-on-startup`` is set to ``true``, the server will start reconnection
attempts even at server startup or on reconfigure events, and will honor the
-action specified in ``on-fail`` parameter.
+action specified in the ``on-fail`` parameter.
The host parameter is used by the MySQL and PostgreSQL backends.
"Dhcp6": { "hosts-database": { "retry-on-startup" : true, ... }, ... }
During server startup, the inability to connect to any of the configured
-backends is considered fatal only if ``retry-on-startup`` is set to ``false``.
-A fatal error is logged and the server exits, based on the idea that the
-configuration should be valid at startup. Exiting to the operating system allows
-nanny scripts to detect the problem.
+backends is considered fatal only if ``retry-on-startup`` is set to ``false``
+(the default). A fatal error is logged and the server exits, based on the idea
+that the configuration should be valid at startup. Exiting to the operating
+system allows nanny scripts to detect the problem.
If ``retry-on-startup`` is set to ``true``, the server will start reconnection
attempts even at server startup or on reconfigure events, and will honor the
-action specified in ``on-fail`` parameter.
+action specified in the ``on-fail`` parameter.
Finally, the credentials of the account under which the server will
access the database should be set:
continues serving clients while this mechanism is activated.
During server startup, the inability to connect to any of the configured
-backends is considered fatal only if ``retry-on-startup`` is set to ``false``.
-A fatal error is logged and the server exits, based on the idea that the
-configuration should be valid at startup. Exiting to the operating system allows
-nanny scripts to detect the problem.
+backends is considered fatal only if ``retry-on-startup`` is set to ``false``
+(the default). A fatal error is logged and the server exits, based on the idea
+that the configuration should be valid at startup. Exiting to the operating
+system allows nanny scripts to detect the problem.
If ``retry-on-startup`` is set to ``true``, the server will start reconnection
attempts even at server startup or on reconfigure events, and will honor the
-action specified in ``on-fail`` parameter.
+action specified in the ``on-fail`` parameter.
std::pair<uint32_t, uint32_t> code_version(MYSQL_SCHEMA_VERSION_MAJOR,
MYSQL_SCHEMA_VERSION_MINOR);
- std::string timer_name = "";
+ std::string timer_name;
bool retry = false;
if (parameters.count("retry-on-startup")) {
if (parameters.at("retry-on-startup") == "true") {
std::pair<uint32_t, uint32_t> code_version(PGSQL_SCHEMA_VERSION_MAJOR,
PGSQL_SCHEMA_VERSION_MINOR);
- std::string timer_name = "";
+ std::string timer_name;
bool retry = false;
if (parameters.count("retry-on-startup")) {
if (parameters.at("retry-on-startup") == "true") {
/// B>=A and B=C (it is ok to have newer backend, as it should be backward
/// compatible)
/// Also if B>C, some database upgrade procedure may be triggered
- virtual VersionPair getVersion(const std::string& timer_name = "") const = 0;
+ virtual VersionPair getVersion(const std::string& timer_name = std::string()) const = 0;
/// @brief Commit Transactions
///
///
/// @throw isc::dhcp::DbOperationError An operation on the open database
/// has failed.
- std::pair<uint32_t, uint32_t> getVersion(const std::string& timer_name = "") const;
+ std::pair<uint32_t, uint32_t> getVersion(const std::string& timer_name = std::string()) const;
/// @brief Executes statements which inserts a row into one of the tables.
///
std::pair<uint32_t, uint32_t> code_version(MYSQL_SCHEMA_VERSION_MAJOR,
MYSQL_SCHEMA_VERSION_MINOR);
- std::string timer_name = "";
+ std::string timer_name;
bool retry = false;
if (parameters.count("retry-on-startup")) {
if (parameters.at("retry-on-startup") == "true") {
///
/// @throw isc::db::DbOperationError An operation on the open database
/// has failed.
- virtual std::pair<uint32_t, uint32_t> getVersion(const std::string& timer_name = "") const;
+ virtual std::pair<uint32_t, uint32_t> getVersion(const std::string& timer_name = std::string()) const;
/// @brief Commit Transactions
///
std::pair<uint32_t, uint32_t> code_version(MYSQL_SCHEMA_VERSION_MAJOR,
MYSQL_SCHEMA_VERSION_MINOR);
- std::string timer_name = "";
+ std::string timer_name;
bool retry = false;
if (parameters.count("retry-on-startup")) {
if (parameters.at("retry-on-startup") == "true") {
///
/// @throw isc::db::DbOperationError An operation on the open database has
/// failed.
- virtual std::pair<uint32_t, uint32_t> getVersion(const std::string& timer_name = "") const override;
+ virtual std::pair<uint32_t, uint32_t> getVersion(const std::string& timer_name = std::string()) const override;
/// @brief Commit Transactions
///
///
/// @throw isc::db::DbOperationError An operation on the open database
/// has failed.
- std::pair<uint32_t, uint32_t> getVersion(const std::string& timer_name = "") const;
+ std::pair<uint32_t, uint32_t> getVersion(const std::string& timer_name = std::string()) const;
/// @brief The parameters
DatabaseConnection::ParameterMap parameters_;
std::pair<uint32_t, uint32_t> code_version(PGSQL_SCHEMA_VERSION_MAJOR,
PGSQL_SCHEMA_VERSION_MINOR);
- std::string timer_name = "";
+ std::string timer_name;
bool retry = false;
if (parameters.count("retry-on-startup")) {
if (parameters.at("retry-on-startup") == "true") {
///
/// @throw isc::db::DbOperationError An operation on the open database
/// has failed.
- virtual std::pair<uint32_t, uint32_t> getVersion(const std::string& timer_name = "") const;
+ virtual std::pair<uint32_t, uint32_t> getVersion(const std::string& timer_name = std::string()) const;
/// @brief Commit Transactions
///
std::pair<uint32_t, uint32_t> code_version(PGSQL_SCHEMA_VERSION_MAJOR,
PGSQL_SCHEMA_VERSION_MINOR);
- std::string timer_name = "";
+ std::string timer_name;
bool retry = false;
if (parameters.count("retry-on-startup")) {
if (parameters.at("retry-on-startup") == "true") {
///
/// @throw isc::db::DbOperationError An operation on the open database has
/// failed.
- virtual std::pair<uint32_t, uint32_t> getVersion(const std::string& timer_name = "") const override;
+ virtual std::pair<uint32_t, uint32_t> getVersion(const std::string& timer_name = std::string()) const override;
/// @brief Commit Transactions
///
std::string access = invalidConnectionString();
access += " retry-on-startup=true";
+ // by adding an invalid access will cause the manager factory to throw
+ // resulting in failure to recreate the manager
ConfigControlInfoPtr config_ctl_info(new ConfigControlInfo());
config_ctl_info->addConfigDatabase(access);
CfgMgr::instance().getCurrentCfg()->setConfigControlInfo(config_ctl_info);
access = validConnectionString();
CfgMgr::instance().clear();
- // by adding an invalid access will cause the manager factory to throw
- // resulting in failure to recreate the manager
config_ctl_info.reset(new ConfigControlInfo());
config_ctl_info->addConfigDatabase(access);
CfgMgr::instance().getCurrentCfg()->setConfigControlInfo(config_ctl_info);
std::string access = invalidConnectionString();
access += " retry-on-startup=true";
+ // by adding an invalid access will cause the manager factory to throw
+ // resulting in failure to recreate the manager
ConfigControlInfoPtr config_ctl_info(new ConfigControlInfo());
config_ctl_info->addConfigDatabase(access);
CfgMgr::instance().getCurrentCfg()->setConfigControlInfo(config_ctl_info);
std::string extra = " max-reconnect-tries=3 reconnect-wait-time=1 retry-on-startup=true";
access += extra;
+ // by adding an invalid access will cause the manager factory to throw
+ // resulting in failure to recreate the manager
ConfigControlInfoPtr config_ctl_info(new ConfigControlInfo());
config_ctl_info->addConfigDatabase(access);
CfgMgr::instance().getCurrentCfg()->setConfigControlInfo(config_ctl_info);
std::string extra = " max-reconnect-tries=3 reconnect-wait-time=1 retry-on-startup=true";
access += extra;
+ // by adding an invalid access will cause the manager factory to throw
+ // resulting in failure to recreate the manager
ConfigControlInfoPtr config_ctl_info(new ConfigControlInfo());
config_ctl_info->addConfigDatabase(access);
CfgMgr::instance().getCurrentCfg()->setConfigControlInfo(config_ctl_info);
access = invalidConnectionString();
CfgMgr::instance().clear();
+
// by adding an invalid access will cause the manager factory to throw
// resulting in failure to recreate the manager
config_ctl_info.reset(new ConfigControlInfo());
access = invalidConnectionString();
access += extra;
CfgMgr::instance().clear();
+
// by adding an invalid access will cause the manager factory to throw
// resulting in failure to recreate the manager
config_ctl_info.reset(new ConfigControlInfo());
access = invalidConnectionString();
access += extra;
CfgMgr::instance().clear();
+
// by adding an invalid access will cause the manager factory to throw
// resulting in failure to recreate the manager
config_ctl_info.reset(new ConfigControlInfo());