2209. [func] fdupont
- Some hooks using multi-threading postpone their start
- routing at the end of configuration processing.
- Now these routines can safely throw when they detect
- a problem: a configuration error is reported.
+ Some hooks using multi-threading postpone their startup until
+ after the configuration has been completed. If the hook
+ subsequently failed the startup, the error would not have been
+ properly propagated. The fix ensures that the errors are
+ reported during the configuration stage.
(Gitlab #2692)
Kea 2.5.6 (development) released on February 28, 2024
-// Copyright (C) 2018-2024 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2024 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
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
/// @file
-/// @brief Callout library for testing execution of the dhcp4_srv_configured
-/// hook point.
+/// @brief Callout library for testing the scenarios when a hook library
+/// posts some work to the IO service as a result of configuration.
+/// Using a callout that always throws we can ensure that the server polls
+/// this initial work before it starts working.
///
static const int LIBRARY_NUMBER = 4;
}
// Checks that postponed hook start service can fail.
-TEST_F(LoadUnloadDhcpv4SrvTest, StartServiceFail) {
+TEST_F(LoadUnloadDhcpv4SrvTest, startServiceFail) {
boost::shared_ptr<ControlledDhcpv4Srv> srv(new ControlledDhcpv4Srv(0));
// Ensure no marker files to start with.
-// Copyright (C) 2018-2024 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2024 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
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
/// @file
-/// @brief Callout library for testing execution of the dhcp6_srv_configured
-/// hook point.
+/// @brief Callout library for testing the scenarios when a hook library
+/// posts some work to the IO service as a result of configuration.
+/// Using a callout that always throws we can ensure that the server polls
+/// this initial work before it starts working.
///
static const int LIBRARY_NUMBER = 4;
}
// Checks that postponed hook start service can fail.
-TEST_F(LoadUnloadDhcpv6SrvTest, StartServiceFail) {
+TEST_F(LoadUnloadDhcpv6SrvTest, startServiceFail) {
boost::shared_ptr<ControlledDhcpv6Srv> srv(new ControlledDhcpv6Srv(0));
// Ensure no marker files to start with.