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.
Initial working implementation.
src/bin/dhcp4/dhcp4_srv.cc
Dhcpv4Srv::processDhcp4Query() - reworked to
proactively park the packet if lease4_commited callouts
are installed.
src/lib/hooks/hooks_manager.h
HooksManager::park() - added require_reference parameter
src/lib/hooks/parking_lots.h
ParkingLot::park() - set refcount to zero, when added
without pre-existing reference
src/lib/hooks/parking_lots.h
ParkingLot now stores objects in a map instead of list to eliminate
sequential searches
ParkingLotHandle::park() - now allows parking without a pre-existing
reference
ParkingLotHandle::deference() - new method that decrements parked
object reference counts without invoking their callback
src/lib/hooks/tests/parking_lots_unittest.cc
TEST(ParkingLotsTest, parkRequireReferenceTests)
TEST(ParkingLotTest, dereference)
TEST(ParkingLotTest, multipleObjects) - new tests
src/lib/http/client.cc
Refactored, connections and request queue are now managed together
as part of a URL destination.
src/lib/http/url.cc
Url::operator<(const Url& url) - compares original
unparsed string rather then reconstructing a new string for
both operands every time
HttpClient now supports both single and multi threaded modes.
MT mode is not currently used anywhere other than unit tests.
src/lib/http/client.*
Added commentary, spell-check, cleanup
src/lib/http/http_log.h
removed TOMS_TRACE_LOG
src/lib/http/tests/mt_client_unittests.cc
Expanded testing
Clean up
src/lib/http/client.cc
int getSocketFd() - new function for logging purposes only
ConnectionList - new class to store a lists of connections
for a given url
ConnectionPool - modified support multiple connections per url
HttpClientImpl - supports ST and MT mode, for the latter it
manages a thread pool driven by a private IOService instance
HttpClient::HttpClient - sanity checks MT use
HttpClient::~HttpClient - invokes stop() method
src/lib/http/http_messages.mes
new log messeage HTTP_CLIENT_MT_STARTED
src/lib/http/tests/mt_client_unittests.cc
- new file of unit tests for MT HttpClient operation