The maintenance feature of the High Availability hook library addresses this
situation. The :isccmd:`ha-maintenance-start` command was introduced to allow the
-administrator to put the pair of the active servers in a state in which one of
+administrator to put the pairs of the active servers in a state in which one of
them is responding to all DHCP queries and the other one is awaiting shutdown.
Suppose that the HA setup includes two active servers, ``server1`` and
case, it is necessary to restart the other server and allow it to complete its
normal state negotiation process.
+If the server has many relationships with different partners, the ``ha-maintenance-start``
+command attempts to transition all of the relationships into the
+``partner-in-maintenance`` state by sending the ``ha-mainteance-notify`` to all
+partner servers. If this step fails for any server an error is returned.
+In that case, send the ``ha-maintenance-cancel`` command to resume normal
+operation and fix the issue.
+
+
Upgrading From Older HA Versions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"command": "ha-scopes",
"service": [ "dhcp4" ],
"arguments": {
- "scopes": [ "HA_server1", "HA_server2" ]
+ "scopes": [ "HA_server1", "HA_server2" ],
+ "server-name": "server2"
}
}
"command": "ha-scopes",
"service": [ "dhcp4 "],
"arguments": {
- "scopes": [ ]
+ "scopes": [ ],
+ "server-name": "server2"
}
}
+The optional ``server-name`` parameter specifies a name of one of the partners belonging
+to the HA relationship this command pertains to. This parameter can be omitted if the
+server receiving this command has only one HA relationship in the configuration.
+
.. isccmd:: ha-continue
.. _command-ha-continue:
{
"command": "ha-continue",
- "service": [ "dhcp4" ]
+ "service": [ "dhcp4" ],
+ "arguments": {
+ "scopes": [ ],
+ "server-name": "server2"
+ }
}
+The optional ``server-name`` parameter specifies a name of one of the partners belonging
+to the HA relationship this command pertains to. This parameter can be omitted if the
+server receiving this command has only one HA relationship in the configuration.
+
.. isccmd:: ha-heartbeat
.. _command-ha-heartbeat:
{
"command": "ha-heartbeat",
- "service": [ "dhcp4" ]
+ "service": [ "dhcp4" ],
+ "arguments": {
+ "scopes": [ ],
+ "server-name": "server2"
+ }
}
+The optional ``server-name`` parameter specifies a name of one of the partners belonging
+to the HA relationship this command pertains to. This parameter can be omitted if the
+server receiving this command has only one HA relationship in the configuration.
+
Upon successful communication with the server, a response similar to this should
be returned:
The ``ha-maintenance-start`` Command
------------------------------------
-This command is used to initiate the transition of the server's partner into the
+This command is used to initiate the transition of the server's partners into the
``in-maintenance`` state and the transition of the server receiving the command
-into the ``partner-in-maintenance`` state. See the :ref:`ha-maintenance` section
-for details.
+into the ``partner-in-maintenance`` state in each HA relationship. See the
+:ref:`ha-maintenance` section for details.
::
This command is used to cancel the maintenance previously initiated using the
:isccmd:`ha-maintenance-start` command. The server receiving this command will first
send :isccmd:`ha-maintenance-notify`, with the ``cancel`` flag set to ``true``, to its
-partner. Next, the server reverts from the ``partner-in-maintenance`` state to
+partners. Next, the server reverts from the ``partner-in-maintenance`` state to
its previous state. See the :ref:`ha-maintenance` section for details.
::
"command": "ha-maintenance-notify",
"service": [ "dhcp4" ],
"arguments": {
- "cancel": false
+ "cancel": false,
+ "server-name": "server2"
}
}
+The optional ``server-name`` parameter specifies a name of one of the partners belonging
+to the HA relationship this command pertains to. This parameter can be omitted if the
+server receiving this command has only one HA relationship in the configuration.
+
.. warning::
The :isccmd:`ha-maintenance-notify` command is not meant to be used by system
A server administrator may send this command to reset a misbehaving state
machine.
-This command includes no arguments:
-
::
{
"command": "ha-reset",
- "service": [ "dhcp4" ]
+ "service": [ "dhcp4" ],
+ "arguments": {
+ "server-name": "server2"
+ }
}
-And elicits the response:
+The optional ``server-name`` parameter specifies a name of one of the partners belonging
+to the HA relationship this command pertains to. This parameter can be omitted if the
+server receiving this command has only one HA relationship in the configuration.
+
+It elicits the response:
::
in the ``partner-down`` state enables its own DHCP service to continue
responding to clients.
-This command includes no arguments:
-
::
{
"command": "ha-sync-complete-notify",
- "service": [ "dhcp4" ]
+ "service": [ "dhcp4" ],
+ "arguments": {
+ "origin": 1100,
+ "server-name": "server2"
+ }
}
-And elicits the response:
+The optional ``server-name`` parameter specifies a name of one of the partners belonging
+to the HA relationship this command pertains to. This parameter can be omitted if the
+server receiving this command has only one HA relationship in the configuration.
+
+The `origin` is used to select the HA service for which the receiving server should
+enable the DHCP service when it receives this notification. This is the same origin the
+sending server used previously to disable the DHCP service before synchronization.
+
+It elicits the response:
::