HA+MT fully integrated and functional.
src/hooks/dhcp/high_availability/ha_service.*
HAService - changed client_ from instance to pointer
- added listener_
HAService::startClientAndListener() - new method which
instantiates client_ and listener_ instances based on config,
and starts them
HAService::stopClientAndListener() - new method that stops
client_ and listener_ instances.
HAService::HAService() - invokes startClientAndListener()
HAService::~HAService() - invokes stopClientAndListener()
src/hooks/dhcp/high_availability/tests/Makefile.am
Added ha_mt_unittest.c
src/hooks/dhcp/high_availability/tests/ha_mt_unittest.cc
New file with HA+MT related tests
src/hooks/dhcp/high_availability/tests/ha_service_unittest.cc
Modified tests to ensure use of ST HAService
src/lib/config/cmd_http_listener.h
Added CmdHttpListener commentary
Added INFO level log messages when HA+MT has been
disabled due to incompatible core or system settings.
modified:
ha_config.cc
ha_messages.mes
ha_messages.cc
ha_messages.h
src/hooks/dhcp/high_availability/ha_config.*
HAConfig::validate() - updates config based
on DHCP MT config
src/hooks/dhcp/high_availability/ha_config_parser.cc
Changed thread members to uint32_tt
src/hooks/dhcp/high_availability/tests/ha_config_unittest.cc
TEST_F(HAConfigTest, multiThreadingPermutations) - new test
src/hooks/dhcp/high_availability/tests/ha_test.*
HATest::setDHCPMultiThreadingConfig()
HATest::makeHAMtJson()
HA hook lib now parses a new top level map parameter:
"multi-threading": {
"enable-multi-threading": true,
"http-dedicated-listener": true,
"http-listener-threads": 4,
"http-client-threads": 5"
}"
but it does nothing with it yet.
src/hooks/dhcp/high_availability/ha_config.*
HAConfig - added member attributes for MT config,
getters & setters
src/hooks/dhcp/high_availability/ha_config_parser.cc
Added HA_CONFIG_MT_DEFAULTS
HAConfigParser::parseInternal() - parsers MT map
of parameters
src/hooks/dhcp/high_availability/tests/ha_config_unittest.cc
Updated tests.
TEST_F(HAConfigTest, configureMultiThreading) - new test
Minor clean-up and typos.
src/hooks/dhcp/high_availability/ha_impl.cc
HAImpl::leases4Committed()
HAImpl::leases6Committed() - added try-catch to ensure
we call dereference on error
src/bin/dhcp6/dhcp6_srv.cc
Dhcpv6Srv::processDhcp6Query() - modified to proactively
park packets.
src/hooks/dhcp/high_availability/ha_impl.cc
HAImpl::leases4Committed()
HAImpl::leases6Committed() - revised to reference before the
call to asynSendLeases() and dereference if it returns 0.
src/hooks/dhcp/high_availability/libloadtests/close_unittests.cc
src/hooks/dhcp/high_availability/tests/ha_impl_unittest.cc
src/hooks/dhcp/high_availability/tests/ha_service_unittest.cc
Revised tests to park first as needed.
src/lib/hooks/parking_lots.h
Fixed a typo in throw messages.
Reversed parking rules: now an object must be parked before
it can be referenced instead of the other way around.
src/bin/dhcp4/dhcp4_srv.cc
Commentary clean up
src/hooks/dhcp/high_availability/ha_impl.cc
HAImpl::leases4Committed() - modified to create the parking
lot reference before calling asyncSendLeaseUpdates(), and
remove it if the function returns 0 indicating no updates to
wait upon.
src/lib/hooks/hooks_manager.h
HooskManager::park() - revert addition of require_reference_ parameter.
src/lib/hooks/parking_lots.h
A parked object can only be parked once.
A reference may only be created (or removed) if the object has been parked.
reference() and dereference() return the new reference count.
src/lib/hooks/tests/hooks_manager_unittest.cc
Updated to tests to park first, reference, and then call callouts.
src/lib/hooks/tests/parking_lots_unittest.cc
Modified tests to reflect new behavior.