1. 20 Apr, 2021 4 commits
  2. 19 Apr, 2021 4 commits
  3. 16 Apr, 2021 9 commits
  4. 15 Apr, 2021 8 commits
  5. 14 Apr, 2021 7 commits
    • Thomas Markwalder's avatar
      [#1735] Additional review comments · e6354ef4
      Thomas Markwalder authored
      More cosmetics, doxygen fixes.
      e6354ef4
    • Thomas Markwalder's avatar
      [#1735] Fixed a typo. · 3d7803b7
      Thomas Markwalder authored
      modified:
          ha_config_unittest.cc
      3d7803b7
    • Thomas Markwalder's avatar
      [#1735] Addressed review comments. · b3872cb5
      Thomas Markwalder authored
      Cosmetics, typos etc...
      
      modified:
          doc/sphinx/arm/hooks-ha.rst
          src/hooks/dhcp/high_availability/ha_config.h
          src/hooks/dhcp/high_availability/ha_messages.mes
          src/hooks/dhcp/high_availability/tests/ha_config_unittest.cc
          src/hooks/dhcp/high_availability/tests/ha_test.cc
          src/hooks/dhcp/high_availability/tests/ha_test.h
          src/lib/dhcpsrv/cfg_multi_threading.cc
      b3872cb5
    • Thomas Markwalder's avatar
      [#1735] Added preliminary HA+MT doc to ARM · a7ec7a26
      Thomas Markwalder authored
      doc/sphinx/arm/hooks-ha.rst
          Added an initial section for HA+MT configuration.
      a7ec7a26
    • Thomas Markwalder's avatar
      [#1735] Added log messages to HA config parsing · 14e3b308
      Thomas Markwalder authored
          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
      14e3b308
    • Thomas Markwalder's avatar
      [#1735] Rework HA+MT config validation · c4713497
      Thomas Markwalder authored
      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()
      c4713497
    • Thomas Markwalder's avatar
      [#1735] Added HA+MT configuration support to HA hook lib · c855ddfd
      Thomas Markwalder authored
      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
      c855ddfd
  6. 12 Apr, 2021 8 commits
    • Thomas Markwalder's avatar
      [#1733] Addressed more comments · 22779396
      Thomas Markwalder authored
      A few more cosmetic fixes.
      22779396
    • Thomas Markwalder's avatar
      [#1733] Addressed review comments · feb7c199
      Thomas Markwalder authored
      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
      feb7c199
    • Thomas Markwalder's avatar
      [#1733] Fixed HA unit test issue · 8a41527d
      Thomas Markwalder authored
      src/hooks/dhcp/high_availability/libloadtests/close_unittests.cc
          Set SO_REUSEADDR so back to back runs of HA unit tests do not fail.
      8a41527d
    • Thomas Markwalder's avatar
      [#1733] Replaced std::map with std::unordered_map in ParkingLot · 02624543
      Thomas Markwalder authored
      modified:
      src/lib/hooks/parking_lots.h
      02624543
    • Thomas Markwalder's avatar
      [#1733] kea-dhcp6 now proactively parks packets · 2bf7d39e
      Thomas Markwalder authored
      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.
      2bf7d39e
    • Thomas Markwalder's avatar
      [#1733] Revised parking lot rules · 1cdf4497
      Thomas Markwalder authored
      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.
      1cdf4497
    • Thomas Markwalder's avatar
      [#1733] kea-dhcp4 now implements Core Packet Parking · e63033ad
      Thomas Markwalder authored
      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
      e63033ad
    • Thomas Markwalder's avatar
      [#1733] Parking lot enchancements · f2ffdb5b
      Thomas Markwalder authored
      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
      f2ffdb5b