Kea: isc::ha::HAImpl Class Reference

| Kea 3.2.0-git

isc::ha::HAImpl Class Reference

High Availability hooks library implementation. More...

`#include <ha_impl.h>`

Inheritance diagram for isc::ha::HAImpl:
[legend]

## Public Member Functions
| HAImpl ()
| Constructor.
virtual | ~HAImpl ()
| Destructor.
void | buffer4Receive (hooks::CalloutHandle &callout_handle)
| Implementation of the "buffer4_receive" callout.
void | buffer6Receive (hooks::CalloutHandle &callout_handle)
| Implementation of the "buffer6_receive" callout.
void | commandProcessed (hooks::CalloutHandle &callout_handle)
| Implementation of the "command_processed" callout.
void | configure (const data::ConstElementPtr &input_config)
| Parses configuration.
void | continueHandler (hooks::CalloutHandle &callout_handle)
| Implements handler for the ha-continue command.
HAConfigPtr | getConfig () const
| Returns a configuration for the first relationship.
HAConfigPtr | getConfig (const std::string &partner_name) const
| Returns parsed configuration by partner name.
HAServicePtr | getHAServiceByServerName (const std::string &command_name, data::ConstElementPtr args) const
| Attempts to get an `HAService` by server name.
isc::asiolink::IOServicePtr | getIOService ()
| Get the hook I/O service.
void | haResetHandler (hooks::CalloutHandle &callout_handle)
| Implements handler for the ha-reset command.
void | heartbeatHandler (hooks::CalloutHandle &callout_handle)
| Implements handle for the heartbeat command.
void | lease4Expire (hooks::CalloutHandle &callout_handle)
| Implementation of the "lease4_expire" callout.
void | lease4ServerDecline (hooks::CalloutHandle &callout_handle)
| Implementation of the "lease4_server_decline" callout.
void | lease6Expire (hooks::CalloutHandle &callout_handle)
| Implementation of the "lease6_expire" callout.
void | leases4Committed (hooks::CalloutHandle &callout_handle)
| Implementation of the "leases4_committed" callout.
void | leases6Committed (hooks::CalloutHandle &callout_handle)
| Implementation of the "leases6_committed" callout.
void | maintenanceCancelHandler (hooks::CalloutHandle &callout_handle)
| Implements handler for the ha-maintenance-cancel command.
void | maintenanceNotifyHandler (hooks::CalloutHandle &callout_handle)
| Implements handler for the ha-maintenance-notify command.
void | maintenanceStartHandler (hooks::CalloutHandle &callout_handle)
| Implements handler for the ha-maintenance-start command.
void | scopesHandler (hooks::CalloutHandle &callout_handle)
| Implements handler for the ha-scopes command.
void | setIOService (isc::asiolink::IOServicePtr io_service)
| Set the hook I/O service.
void | startServices (const dhcp::NetworkStatePtr &network_state, const HAServerType &server_type)
| Creates high availability services using current configuration.
void | stop ()
| Stop the client and listener.
void | subnet4Select (hooks::CalloutHandle &callout_handle)
| Implementation of the "subnet4_select" callout.
void | subnet6Select (hooks::CalloutHandle &callout_handle)
| Implementation of the "subnet6_select" callout.
void | syncCompleteNotifyHandler (hooks::CalloutHandle &callout_handle)
| Implements handler for the ha-sync-complete-notify command.
void | synchronizeHandler (hooks::CalloutHandle &callout_handle)
| Implements handler for the ha-sync command.

## Protected Member Functions
virtual bool | shouldReclaim (const HAServicePtr &service, const dhcp::Lease4Ptr &lease4) const
| Checks if the lease should be reclaimed by this server.
virtual bool | shouldReclaim (const HAServicePtr &service, const dhcp::Lease6Ptr &lease6) const
| Checks if the lease should be reclaimed by this server.

## Protected Attributes
HAConfigMapperPtr | config_
| Holds parsed configuration.
isc::asiolink::IOServicePtr | io_service_
| The hook I/O service.
HAServiceMapperPtr | services_
| Pointer to the high availability services (state machines).

## Detailed Description

High Availability hooks library implementation.

This object provides an interface between the HA hook library callouts and the HA state model implemented in the `HAService`. Callouts invoke respective methods of the `HAImpl` to configure the service, generate lease updates etc. The `HAImpl` retrieves and validates the arguments provided within `CalloutHandle` object and then invokes appropriate methods of the `HAService` class.

Definition at line 31 of file ha_impl.h.

## Constructor & Destructor Documentation

## ◆ HAImpl()

isc::ha::HAImpl::HAImpl | ( |  | ) |

Constructor.

Definition at line 34 of file ha_impl.cc.

References config_, io_service_, and services_.

## ◆ ~HAImpl()

isc::ha::HAImpl::~HAImpl | ( |  | ) |
| virtual

Destructor.

Definition at line 64 of file ha_impl.cc.

References config_, io_service_, services_, and stop().

Here is the call graph for this function:

## Member Function Documentation

## ◆ buffer4Receive()

void isc::ha::HAImpl::buffer4Receive | ( | hooks::CalloutHandle & | callout_handle | ) |

Implementation of the "buffer4_receive" callout.

This callout uses HA service to check if the query should be processed by this server or a partner. If the partner should process the query, this callout sets the status to `CalloutHandle::NEXT_STEP_DROP` to cause the server to drop the packet. Therefore it is important to note that, if multiple hook libraries implementing `buffer4_receive` hook are loaded, the order of loading the libraries may matter. If this library sets the status to `CalloutHandle::NEXT_STEP_DROP` and the other library overrides this status, the query will be processed by the server instead of being dropped. This problem may be mitigated by loading the HA library last, i.e. placing the library at the end of the "hooks-libraries" list within a Kea configuration file.

If the received query is to be processed by this server instance, the `CalloutHabndle::NEXT_STEP_SKIP` status is set to prevent the server from unpacking the query because the query is unpacked by the callout.

Parameters

  callout_handle | Callout handle provided to the callout.

Todo
  Add unit tests to verify the behavior for different malformed packets.

Definition at line 82 of file ha_impl.cc.

References isc::stats::StatsMgr::addValue(), isc::log::DBGLVL_TRACE_BASIC, isc::hooks::CalloutHandle::getArgument(), isc::hooks::CalloutHandle::getStatus(), isc::ha::HA_BUFFER4_RECEIVE_NOT_FOR_US, isc::ha::HA_BUFFER4_RECEIVE_PACKET_OPTIONS_SKIPPED, isc::ha::HA_BUFFER4_RECEIVE_UNPACK_FAILED, isc::ha::ha_logger, isc::stats::StatsMgr::instance(), LOG_DEBUG, CalloutHandle::NEXT_STEP_DROP, CalloutHandle::NEXT_STEP_SKIP, services_, isc::hooks::CalloutHandle::setStatus(), and isc::Exception::what().

Here is the call graph for this function:

## ◆ buffer6Receive()

void isc::ha::HAImpl::buffer6Receive | ( | hooks::CalloutHandle & | callout_handle | ) |

Implementation of the "buffer6_receive" callout.

This callout uses HA service to check if the query should be processed by this server or a partner. If the partner should process the query, this callout sets the status to `CalloutHandle::NEXT_STEP_DROP` to cause the server to drop the packet. Therefore it is important to note that, if multiple hook libraries implementing `buffer6_receive` hook are loaded, the order of loading the libraries may matter. If this library sets the status to `CalloutHandle::NEXT_STEP_DROP` and the other library overrides this status, the query will be processed by the server instead of being dropped. This problem may be mitigated by loading the HA library last, i.e. placing the library at the end of the "hooks-libraries" list within a Kea configuration file.

If the received query is to be processed by this server instance, the `CalloutHabndle::NEXT_STEP_SKIP` status is set to prevent the server from unpacking the query because the query is unpacked by the callout.

Parameters

  callout_handle | Callout handle provided to the callout.

Todo
  Add unit tests to verify the behavior for different malformed packets.

Definition at line 413 of file ha_impl.cc.

References isc::stats::StatsMgr::addValue(), isc::log::DBGLVL_TRACE_BASIC, isc::hooks::CalloutHandle::getArgument(), isc::hooks::CalloutHandle::getStatus(), isc::ha::HA_BUFFER6_RECEIVE_NOT_FOR_US, isc::ha::HA_BUFFER6_RECEIVE_PACKET_OPTIONS_SKIPPED, isc::ha::HA_BUFFER6_RECEIVE_UNPACK_FAILED, isc::ha::ha_logger, isc::stats::StatsMgr::instance(), LOG_DEBUG, CalloutHandle::NEXT_STEP_DROP, CalloutHandle::NEXT_STEP_SKIP, services_, isc::hooks::CalloutHandle::setStatus(), and isc::Exception::what().

Here is the call graph for this function:

## ◆ commandProcessed()

void isc::ha::HAImpl::commandProcessed | ( | hooks::CalloutHandle & | callout_handle | ) |

Implementation of the "command_processed" callout.

It adds the HA servers information to "status-get" command responses by calling `HAService::commandProcessed`.

Parameters

  callout_handle | Callout handle provided to the callout.

Definition at line 706 of file ha_impl.cc.

References config_, Element::create(), Element::createList(), Element::createMap(), isc::hooks::CalloutHandle::getArgument(), isc::ha::HAConfig::HAModeToString(), Element::map, and services_.

Here is the call graph for this function:

## ◆ configure()

void isc::ha::HAImpl::configure | ( | const data::ConstElementPtr & | input_config | ) |

Parses configuration.

Parameters

  input_config | Configuration specified for the hooks library.

Exceptions

  ConfigError | when configuration fails.

Definition at line 39 of file ha_impl.cc.

References config_, and isc::ha::HAConfigParser::parse().

Here is the call graph for this function:

## ◆ continueHandler()

void isc::ha::HAImpl::continueHandler | ( | hooks::CalloutHandle & | callout_handle | ) |

Implements handler for the ha-continue command.

Parameters

  callout_handle | Callout handle provided to the callout.

Definition at line 890 of file ha_impl.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::createAnswer(), isc::hooks::CalloutHandle::getArgument(), getHAServiceByServerName(), isc::config::parseCommand(), and isc::hooks::CalloutHandle::setArgument().

Here is the call graph for this function:

## ◆ getConfig() [1/2]

HAConfigPtr isc::ha::HAImpl::getConfig | ( |  | ) | const
| inline

Returns a configuration for the first relationship.

This function is held here for historical reasons and it is currently only used in the unit tests for a single-relationship test cases. The production code should use the other variant of this function that includes a partner name as a parameter. It covers both the cases when there is only one relationship and the hub-and-spoke case.

Returns
  Configuration for the relationship to which the partner belongs.

Exceptions

  InvalidOperation | when there are no relationships.

Definition at line 71 of file ha_impl.h.

References config_.

## ◆ getConfig() [2/2]

HAConfigPtr isc::ha::HAImpl::getConfig | ( | const std::string & | partner_name | ) | const
| inline

Returns parsed configuration by partner name.

Parameters

  partner_name | name of a partner belonging to the relationship for which the configuration should be retrieved.

Returns
  Configuration for the relationship to which the partner belongs.

Definition at line 80 of file ha_impl.h.

References config_.

## ◆ getHAServiceByServerName()

HAServicePtr isc::ha::HAImpl::getHAServiceByServerName | ( | const std::string & | command_name,
|  | data::ConstElementPtr | args ) const

Attempts to get an `HAService` by server name.

The function expects that the arguments contain the "server-name" parameter. If the parameter is not specified, a default `HAService` name is returned.

Parameters

  command_name | command name (used for logging purposes only).
  args | command arguments or null.

Returns
  Pointer to an `HAService` instance.

Exceptions

  BadValue | if the specified server-name doesn't exist or if the server-name wasn't specified and more than one `HAService` exists.

Definition at line 1050 of file ha_impl.cc.

References isc_throw, Element::map, services_, and Element::string.

Referenced by continueHandler(), haResetHandler(), heartbeatHandler(), maintenanceNotifyHandler(), scopesHandler(), syncCompleteNotifyHandler(), and synchronizeHandler().

## ◆ getIOService()

isc::asiolink::IOServicePtr isc::ha::HAImpl::getIOService | ( |  | ) |
| inline

Get the hook I/O service.

Returns
  the hook I/O service.

Definition at line 240 of file ha_impl.h.

References io_service_.

## ◆ haResetHandler()

void isc::ha::HAImpl::haResetHandler | ( | hooks::CalloutHandle & | callout_handle | ) |

Implements handler for the ha-reset command.

Parameters

  callout_handle | Callout handle provided to the callout.

Definition at line 978 of file ha_impl.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::createAnswer(), isc::hooks::CalloutHandle::getArgument(), getHAServiceByServerName(), isc::config::parseCommand(), and isc::hooks::CalloutHandle::setArgument().

Here is the call graph for this function:

## ◆ heartbeatHandler()

void isc::ha::HAImpl::heartbeatHandler | ( | hooks::CalloutHandle & | callout_handle | ) |

Implements handle for the heartbeat command.

Parameters

  callout_handle | Callout handle provided to the callout.

Definition at line 739 of file ha_impl.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::createAnswer(), isc::hooks::CalloutHandle::getArgument(), getHAServiceByServerName(), isc::config::parseCommand(), and isc::hooks::CalloutHandle::setArgument().

Here is the call graph for this function:

## ◆ lease4Expire()

void isc::ha::HAImpl::lease4Expire | ( | hooks::CalloutHandle & | callout_handle | ) |

Implementation of the "lease4_expire" callout.

Parameters

  callout_handle | Callout handle provided to the callout.

Definition at line 356 of file ha_impl.cc.

References isc::log::DBGLVL_TRACE_BASIC, isc::hooks::CalloutHandle::getArgument(), isc::dhcp::CfgMgr::getCurrentCfg(), isc::ha::HAConfig::getSubnetServerName(), isc::ha::HA_LEASE4_EXPIRE_INVALID_HA_SERVER_NAME, isc::ha::HA_LEASE4_EXPIRE_RECLAMATION_SKIP, isc::ha::ha_logger, isc::dhcp::CfgMgr::instance(), LOG_DEBUG, LOG_ERROR, CalloutHandle::NEXT_STEP_SKIP, services_, isc::hooks::CalloutHandle::setStatus(), and shouldReclaim().

Here is the call graph for this function:

## ◆ lease4ServerDecline()

void isc::ha::HAImpl::lease4ServerDecline | ( | hooks::CalloutHandle & | callout_handle | ) |

Implementation of the "lease4_server_decline" callout.

Parameters

  callout_handle | Callout handle provided to the callout.

Definition at line 323 of file ha_impl.cc.

References config_, isc::hooks::CalloutHandle::getArgument(), CalloutHandle::NEXT_STEP_CONTINUE, services_, isc::hooks::CalloutHandle::setArgument(), and isc::hooks::CalloutHandle::setStatus().

Here is the call graph for this function:

## ◆ lease6Expire()

void isc::ha::HAImpl::lease6Expire | ( | hooks::CalloutHandle & | callout_handle | ) |

Implementation of the "lease6_expire" callout.

Parameters

  callout_handle | Callout handle provided to the callout.

Definition at line 649 of file ha_impl.cc.

References isc::log::DBGLVL_TRACE_BASIC, isc::hooks::CalloutHandle::getArgument(), isc::dhcp::CfgMgr::getCurrentCfg(), isc::ha::HAConfig::getSubnetServerName(), isc::ha::HA_LEASE6_EXPIRE_INVALID_HA_SERVER_NAME, isc::ha::HA_LEASE6_EXPIRE_RECLAMATION_SKIP, isc::ha::ha_logger, isc::dhcp::CfgMgr::instance(), LOG_DEBUG, LOG_ERROR, CalloutHandle::NEXT_STEP_SKIP, services_, isc::hooks::CalloutHandle::setStatus(), and shouldReclaim().

Here is the call graph for this function:

## ◆ leases4Committed()

void isc::ha::HAImpl::leases4Committed | ( | hooks::CalloutHandle & | callout_handle | ) |

Implementation of the "leases4_committed" callout.

Parameters

  callout_handle | Callout handle provided to the callout.

Definition at line 231 of file ha_impl.cc.

References isc::stats::StatsMgr::addValue(), config_, isc::log::DBGLVL_TRACE_BASIC, isc::hooks::CalloutHandle::getArgument(), isc::hooks::CalloutHandle::getContext(), isc::hooks::CalloutHandle::getParkingLotHandlePtr(), isc::ha::HA_LEASES4_COMMITTED_NO_RELATIONSHIP, isc::ha::HA_LEASES4_COMMITTED_NOTHING_TO_UPDATE, isc::ha::ha_logger, isc::stats::StatsMgr::instance(), isc_throw, LOG_DEBUG, LOG_ERROR, CalloutHandle::NEXT_STEP_DROP, CalloutHandle::NEXT_STEP_PARK, services_, and isc::hooks::CalloutHandle::setStatus().

Here is the call graph for this function:

## ◆ leases6Committed()

void isc::ha::HAImpl::leases6Committed | ( | hooks::CalloutHandle & | callout_handle | ) |

Implementation of the "leases6_committed" callout.

Parameters

  callout_handle | Callout handle provided to the callout.

Definition at line 564 of file ha_impl.cc.

References isc::stats::StatsMgr::addValue(), config_, isc::log::DBGLVL_TRACE_BASIC, isc::hooks::CalloutHandle::getArgument(), isc::hooks::CalloutHandle::getContext(), isc::hooks::CalloutHandle::getParkingLotHandlePtr(), isc::ha::HA_LEASES6_COMMITTED_NO_RELATIONSHIP, isc::ha::HA_LEASES6_COMMITTED_NOTHING_TO_UPDATE, isc::ha::ha_logger, isc::stats::StatsMgr::instance(), isc_throw, LOG_DEBUG, LOG_ERROR, CalloutHandle::NEXT_STEP_DROP, CalloutHandle::NEXT_STEP_PARK, services_, and isc::hooks::CalloutHandle::setStatus().

Here is the call graph for this function:

## ◆ maintenanceCancelHandler()

void isc::ha::HAImpl::maintenanceCancelHandler | ( | hooks::CalloutHandle & | callout_handle | ) |

Implements handler for the ha-maintenance-cancel command.

Parameters

  callout_handle | Callout handle provided to the callout.

Definition at line 969 of file ha_impl.cc.

References services_, and isc::hooks::CalloutHandle::setArgument().

Here is the call graph for this function:

## ◆ maintenanceNotifyHandler()

void isc::ha::HAImpl::maintenanceNotifyHandler | ( | hooks::CalloutHandle & | callout_handle | ) |

Implements handler for the ha-maintenance-notify command.

Parameters

  callout_handle | Callout handle provided to the callout.

Definition at line 915 of file ha_impl.cc.

References Element::boolean, isc::config::CONTROL_RESULT_ERROR, isc::config::createAnswer(), isc::hooks::CalloutHandle::getArgument(), getHAServiceByServerName(), isc_throw, isc::config::parseCommandWithArgs(), isc::hooks::CalloutHandle::setArgument(), and Element::string.

Here is the call graph for this function:

## ◆ maintenanceStartHandler()

void isc::ha::HAImpl::maintenanceStartHandler | ( | hooks::CalloutHandle & | callout_handle | ) |

Implements handler for the ha-maintenance-start command.

Parameters

  callout_handle | Callout handle provided to the callout.

Definition at line 955 of file ha_impl.cc.

References isc::config::CONTROL_RESULT_SUCCESS, isc::config::parseAnswer(), services_, and isc::hooks::CalloutHandle::setArgument().

Here is the call graph for this function:

## ◆ scopesHandler()

void isc::ha::HAImpl::scopesHandler | ( | hooks::CalloutHandle & | callout_handle | ) |

Implements handler for the ha-scopes command.

Parameters

  callout_handle | Callout handle provided to the callout.

Definition at line 831 of file ha_impl.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::createAnswer(), isc::hooks::CalloutHandle::getArgument(), getHAServiceByServerName(), isc_throw, Element::list, Element::map, isc::config::parseCommand(), isc::hooks::CalloutHandle::setArgument(), and Element::string.

Here is the call graph for this function:

## ◆ setIOService()

void isc::ha::HAImpl::setIOService | ( | isc::asiolink::IOServicePtr | io_service | ) |
| inline

Set the hook I/O service.

Parameters

  io_service | the hook I/O service.

Definition at line 247 of file ha_impl.h.

References io_service_.

## ◆ shouldReclaim() [1/2]

bool isc::ha::HAImpl::shouldReclaim | ( | const HAServicePtr & | service,
|  | const dhcp::Lease4Ptr & | lease4 ) const
| protectedvirtual

Checks if the lease should be reclaimed by this server.

The lease must not be reclaimed by the server when the server is in the terminated state and the lease belongs to another server (per load balancing algorithm or when it is a standby server).

This function is virtual so that it can be derived and mocked in the tests.

Parameters

  service | pointer to the HA service to which the lease belongs.
  lease4 | pointer to the DHCPv4 lease being reclaimed.

Returns
  true if the DHCPv4 lease should be reclaimed by this server instance, false otherwise.

Definition at line 1080 of file ha_impl.cc.

Referenced by lease4Expire(), and lease6Expire().

## ◆ shouldReclaim() [2/2]

bool isc::ha::HAImpl::shouldReclaim | ( | const HAServicePtr & | service,
|  | const dhcp::Lease6Ptr & | lease6 ) const
| protectedvirtual

Checks if the lease should be reclaimed by this server.

The lease must not be reclaimed by the server when the server is in the terminated state and the lease belongs to another server (per load balancing algorithm or when it is a standby server).

This function is virtual so that it can be derived and mocked in the tests.

Parameters

  service | pointer to the HA service to which the lease belongs.
  lease6 | pointer to the DHCPv4 lease being reclaimed.

Returns
  true if the DHCPv6 lease should be reclaimed by this server instance, false otherwise.

Definition at line 1085 of file ha_impl.cc.

## ◆ startServices()

void isc::ha::HAImpl::startServices | ( | const dhcp::NetworkStatePtr & | network_state,
|  | const HAServerType & | server_type )

Creates high availability services using current configuration.

The caller must ensure that the HA configuration is valid before calling this function.

Parameters

  network_state | pointer to the object holding a state of the DHCP service (enabled/disabled).
  server_type | DHCP server type for which the HA service should be created.

Definition at line 44 of file ha_impl.cc.

References config_, io_service_, and services_.

## ◆ stop()

void isc::ha::HAImpl::stop | ( |  | ) |

Stop the client and listener.

Definition at line 72 of file ha_impl.cc.

References io_service_, and services_.

Referenced by ~HAImpl().

## ◆ subnet4Select()

void isc::ha::HAImpl::subnet4Select | ( | hooks::CalloutHandle & | callout_handle | ) |

Implementation of the "subnet4_select" callout.

This callout decides whether the received packet should be processed by the server when the server has multiple HA relationships. The relationship selection is based on the selected subnet.

Parameters

  callout_handle | Callout handle provided to the callout.

Definition at line 139 of file ha_impl.cc.

References isc::stats::StatsMgr::addValue(), isc::log::DBGLVL_TRACE_BASIC, isc::hooks::CalloutHandle::getArgument(), isc::ha::HAConfig::getSubnetServerName(), isc::ha::ha_logger, isc::ha::HA_SUBNET4_SELECT_INVALID_HA_SERVER_NAME, isc::ha::HA_SUBNET4_SELECT_NO_RELATIONSHIP_FOR_SUBNET, isc::ha::HA_SUBNET4_SELECT_NO_RELATIONSHIP_SELECTOR_FOR_SUBNET, isc::ha::HA_SUBNET4_SELECT_NO_SUBNET_SELECTED, isc::ha::HA_SUBNET4_SELECT_NOT_FOR_US, isc::stats::StatsMgr::instance(), LOG_DEBUG, LOG_ERROR, CalloutHandle::NEXT_STEP_DROP, services_, isc::hooks::CalloutHandle::setContext(), and isc::hooks::CalloutHandle::setStatus().

Here is the call graph for this function:

## ◆ subnet6Select()

void isc::ha::HAImpl::subnet6Select | ( | hooks::CalloutHandle & | callout_handle | ) |

Implementation of the "subnet6_select" callout.

This callout decides whether the received packet should be processed by the server when the server has multiple HA relationships. The relationship selection is based on the selected subnet.

Parameters

  callout_handle | Callout handle provided to the callout.

Definition at line 472 of file ha_impl.cc.

References isc::stats::StatsMgr::addValue(), isc::log::DBGLVL_TRACE_BASIC, isc::hooks::CalloutHandle::getArgument(), isc::ha::HAConfig::getSubnetServerName(), isc::ha::ha_logger, isc::ha::HA_SUBNET6_SELECT_INVALID_HA_SERVER_NAME, isc::ha::HA_SUBNET6_SELECT_NO_RELATIONSHIP_FOR_SUBNET, isc::ha::HA_SUBNET6_SELECT_NO_RELATIONSHIP_SELECTOR_FOR_SUBNET, isc::ha::HA_SUBNET6_SELECT_NO_SUBNET_SELECTED, isc::ha::HA_SUBNET6_SELECT_NOT_FOR_US, isc::stats::StatsMgr::instance(), LOG_DEBUG, LOG_ERROR, CalloutHandle::NEXT_STEP_DROP, services_, isc::hooks::CalloutHandle::setContext(), and isc::hooks::CalloutHandle::setStatus().

Here is the call graph for this function:

## ◆ syncCompleteNotifyHandler()

void isc::ha::HAImpl::syncCompleteNotifyHandler | ( | hooks::CalloutHandle & | callout_handle | ) |

Implements handler for the ha-sync-complete-notify command.

Parameters

  callout_handle | Callout handle provided to the callout.

Definition at line 1004 of file ha_impl.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::createAnswer(), isc::hooks::CalloutHandle::getArgument(), getHAServiceByServerName(), isc::dhcp::NetworkState::HA_REMOTE_COMMAND, Element::integer, isc_throw, isc::config::parseCommand(), and isc::hooks::CalloutHandle::setArgument().

Here is the call graph for this function:

## ◆ synchronizeHandler()

void isc::ha::HAImpl::synchronizeHandler | ( | hooks::CalloutHandle & | callout_handle | ) |

Implements handler for the ha-sync command.

Parameters

  callout_handle | Callout handle provided to the callout.

Definition at line 766 of file ha_impl.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::createAnswer(), isc::hooks::CalloutHandle::getArgument(), getHAServiceByServerName(), Element::integer, isc_throw, Element::map, isc::config::parseCommand(), isc::hooks::CalloutHandle::setArgument(), and Element::string.

Here is the call graph for this function:

## Member Data Documentation

## ◆ config_

HAConfigMapperPtr isc::ha::HAImpl::config_
| protected

Holds parsed configuration.

Definition at line 285 of file ha_impl.h.

Referenced by HAImpl(), ~HAImpl(), commandProcessed(), configure(), getConfig(), getConfig(), lease4ServerDecline(), leases4Committed(), leases6Committed(), and startServices().

## ◆ io_service_

isc::asiolink::IOServicePtr isc::ha::HAImpl::io_service_
| protected

The hook I/O service.

Definition at line 282 of file ha_impl.h.

Referenced by HAImpl(), ~HAImpl(), getIOService(), setIOService(), startServices(), and stop().

## ◆ services_

HAServiceMapperPtr isc::ha::HAImpl::services_
| protected

Pointer to the high availability services (state machines).

Definition at line 288 of file ha_impl.h.

Referenced by HAImpl(), ~HAImpl(), buffer4Receive(), buffer6Receive(), commandProcessed(), getHAServiceByServerName(), lease4Expire(), lease4ServerDecline(), lease6Expire(), leases4Committed(), leases6Committed(), maintenanceCancelHandler(), maintenanceStartHandler(), startServices(), stop(), subnet4Select(), and subnet6Select().

The documentation for this class was generated from the following files:

- ha_impl.h
- ha_impl.cc