Added exit-value argument to shutdown command.
kea-dhcpX servers now exit with EXIT_FAILURE status on db loss
src/lib/process/daemon.*
Daemon::exit_value_, new member with getter/setter
src/lib/process/d_controller.*
DControllerBase::launch() - now returns getExitValue()
DControllerBase::shutdownHandler() - uses exit-value argument to set exit
value
src/lib/process/tests/daemon_unittest.cc
TEST_F(DaemonTest, exitValue) - new test
src/bin/agent/main.cc
Use launch() return value for exit value.
src/bin/agent/tests/ca_controller_unittests.cc
TEST_F(CtrlAgentControllerTest, shutdownExitValue) - new test
src/bin/d2/main.cc
Use launch() return value for exit value.
src/bin/d2/tests/d2_command_unittest.cc
TEST_F(CtrlChannelD2Test, shutdownExitValue) - new test
src/bin/dhcp4/ctrl_dhcp4_srv.*
ControlledDhcpv4Srv::
commandShutdownHandler() - handle exit-value argument
shutdown(int exit_value) - added exit_value parameter
dbReconnect() - call shutdown(EXIT_FAILURE)
dbLostCallback() - call shutdown(EXIT_FAILURE)
src/bin/dhcp4/dhcp4_srv.*
Dhcp4Srv::run() - returns int Daemon::exit_value instead of bool
src/bin/dhcp4/main.cc
Use run() return value for exit value.
src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc
TEST_F(CtrlChannelDhcpv4SrvTest, commands) - revamped test
src/bin/dhcp6/ctrl_dhcp6_srv.*
ControlledDhcpv6Srv::
commandShutdownHandler() - use exit-value argument to set exit value
shutdown(int exit_value) - added exit_value parameter
dbReconnect() - call shutdown(EXIT_FAILURE)
dbLostCallback() - call shutdown(EXIT_FAILURE)
src/bin/dhcp6/dhcp6_srv.*
Dhcp6Srv::run() - returns int Daemon::exit_value instead of bool
src/bin/dhcp6/main.cc
Use run() return value for exit value.
src/bin/dhcp6/tests/ctrl_dhcp6_srv_unittest.cc
TEST_F(CtrlDhcpv6SrvTest, commands) - revamped test
Previously it was stored in TEST_DATA_BUILDDIR which resides inside repo sources.
Due to the fact that when repo was located in deep patch creating socket was
failing as max socket patch is about 100 characters. Now it is located
in temp folder managed by Sandbox class. The sandbox directory is created
in test constructor and deleted in destructor. As the temp directory
is in form /tmp/kea-XXXXXX the lnegth is always lower than 1000, so running
the unit tests never fails.
doc/guide/ctrl-channel.xml
Minor update to using socat
src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc
src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc
Updated testing for server response to server
side control channel timeouts
src/lib/cc/json_feed.h
JSONFeed::getProcessedText() - new method that
returns a copy of the current accumulation of
accepted text
src/lib/config/config_messages.mes
src/lib/config/command_mgr.cc
Connection::receiveHandler() - added log info about
discarded data when client closes connection
Connection::timeoutHandler() - added info about discarded
data to server's response to client on server side timeout