2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-07 09:25:15 +00:00

[#1108] Servers execute shutdown on unrecoverable DBs

Added ChangeLog entry

src/bin/dhcp4/ctrl_dhcp4_srv.*
    ControlledDhcpv4Srv::dbLostCallback() - schedules a shutdown
    once retries have been exhausted/disableld

src/bin/dhcp6/ctrl_dhcp6_srv.*
    ControlledDhcpv6Srv::dbLostCallback() - schedules a shutdown
    once retries have been exhausted/disableld

src/lib/database/database_connection.h
    class DbUnrecoverableError - new exception

src/lib/mysql/mysql_connection.h
    MySqlConnection::check_error() - throws DbUnrecoverableError
    instead of calling exit()

src/lib/pgsql/pgsql_connection.*
    PgSqlConnection::checkStatementError() - throws DbUnrecoverableError
    instead of calling exit()
This commit is contained in:
Thomas Markwalder
2020-01-31 12:02:57 -05:00
parent 89d12ac7d9
commit ae1272d370
9 changed files with 37 additions and 15 deletions

View File

@@ -1,4 +1,4 @@
// Copyright (C) 2015-2019 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2015-2020 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -39,6 +39,14 @@ public:
isc::Exception(file, line, what) {}
};
/// @brief Exception thrown when connectivity has been lost and
/// cannot be recovered.
class DbUnrecoverableError : public Exception {
public:
DbUnrecoverableError(const char* file, size_t line, const char* what) :
isc::Exception(file, line, what) {}
};
/// @brief Invalid type exception
///
/// Thrown when the factory doesn't recognize the type of the backend.