Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]
Applies to SUSE Linux Enterprise High Availability Extension 15 SP2

17 Executing Maintenance Tasks Edit source

To perform maintenance tasks on the cluster nodes, you might need to stop the resources running on that node, to move them, or to shut down or reboot the node. It might also be necessary to temporarily take over the control of resources from the cluster, or even to stop the cluster service while resources remain running.

This chapter explains how to manually take down a cluster node without negative side-effects. It also gives an overview of different options the cluster stack provides for executing maintenance tasks.

17.1 Implications of Taking Down a Cluster Node Edit source

In SUSE Linux Enterprise Server High Availability Extension 15 SP2, the way cluster services were started and stopped has changed. SUSE recommends using the crm shell. The old commands with systemctl are still available, but are recommended for experienced users only. For details, refer to the SUSE blog article https://www.suse.com/c/suse-high-availability-cluster-services-how-to-stop-start-or-view-the-status/.

The recommended way to start, stop, or view the status is:

crm cluster start

Start cluster services on one node

crm cluster stop

Stop cluster services on one node

crm cluster restart

Restart cluster services on one node

crm cluster status

View status of the cluster stack on one node

Execute the above commands as user root or as a user who has the required privileges.

When you shut down or reboot a cluster node (or stop the Pacemaker service on a node), the following processes will be triggered:

  • The resources that are running on the node will be stopped or moved off the node.

  • If stopping the resources should fail or time out, the STONITH mechanism will fence the node and shut it down.

Procedure 17.1: Manually Rebooting a Cluster Node

If your aim is to move the services off the node in an orderly fashion before shutting down or rebooting the node, proceed as follows:

  1. On the node you want to reboot or shut down, log in as root or equivalent.

  2. Put the node into standby mode:

    root # crm -w node standby

    That way, services can migrate off the node without being limited by the shutdown timeout of Pacemaker cluster services.

  3. Check the cluster status with:

    root # crm status

    It shows the respective node in standby mode:

    [...]
    Node bob: standby
    [...]
  4. Stop the cluster services on that node:

    root # crm cluster stop
  5. Reboot the node.

To check if the node joins the cluster again:

  1. Log in to the node as root or equivalent.

  2. Check if the cluster services has started:

    root # crm cluster status
  3. If not, start it:

    root # crm cluster start
  4. Check the cluster status with:

    root # crm status

    It should show the node coming online again.

17.2 Different Options for Maintenance Tasks Edit source

Pacemaker offers a variety of options for performing system maintenance:

Putting the Cluster in Maintenance Mode

The global cluster property maintenance-mode allows you to put all resources into maintenance state at once. The cluster will cease monitoring them and thus become oblivious to their status.

Putting a Node in Maintenance Mode

This option allows you to put all resources running on a specific node into maintenance state at once. The cluster will cease monitoring them and thus become oblivious to their status.

Putting a Node in Standby Mode

A node that is in standby mode can no longer run resources. Any resources running on the node will be moved away or stopped (in case no other node is eligible to run the resource). Also, all monitoring operations will be stopped on the node (except for those with role="Stopped").

You can use this option if you need to stop a node in a cluster while continuing to provide the services running on another node.

Putting a Resource into Maintenance Mode

When this mode is enabled for a resource, no monitoring operations will be triggered for the resource.

Use this option if you need to manually touch the service that is managed by this resource and do not want the cluster to run any monitoring operations for the resource during that time.

Putting a Resource into Unmanaged Mode

The is-managed meta attribute allows you to temporarily release a resource from being managed by the cluster stack. This means you can manually touch the service that is managed by this resource (for example, to adjust any components). However, the cluster will continue to monitor the resource and to report any failures.

If you want the cluster to also cease monitoring the resource, use the per-resource maintenance mode instead (see Putting a Resource into Maintenance Mode).

17.3 Preparing and Finishing Maintenance Work Edit source

Warning
Warning: Risk of Data Loss

If you need to do testing or maintenance work, follow the general steps below.

Otherwise you risk unwanted side effects, like resources not starting in an orderly fashion, unsynchronized CIBs across the cluster nodes, or even data loss.

  1. Before you start, choose which of the options outlined in Section 17.2 is appropriate for your situation.

  2. Apply this option with Hawk2 or crmsh.

  3. Execute your maintenance task or tests.

  4. After you have finished, put the resource, node or cluster back to normal operation.

17.4 Putting the Cluster in Maintenance Mode Edit source

To put the cluster in maintenance mode on the crm shell, use the following command:

root # crm configure property maintenance-mode=true

To put the cluster back to normal mode after your maintenance work is done, use the following command:

root # crm configure property maintenance-mode=false
Procedure 17.2: Putting the Cluster in Maintenance Mode with Hawk2
  1. Start a Web browser and log in to the cluster as described in Section 7.2, “Logging In”.

  2. In the left navigation bar, select Cluster Configuration.

  3. In the CRM Configuration group, select the maintenance-mode attribute from the empty drop-down box and click the plus icon to add it.

  4. To set maintenance-mode=true, activate the check box next to maintenance-mode and confirm your changes.

  5. After you have finished the maintenance task for the whole cluster, deactivate the check box next to the maintenance-mode attribute.

    From this point on, High Availability Extension will take over cluster management again.

17.5 Putting a Node in Maintenance Mode Edit source

To put a node in maintenance mode on the crm shell, use the following command:

root # crm node maintenance NODENAME

To put the node back to normal mode after your maintenance work is done, use the following command:

root # crm node ready NODENAME
Procedure 17.3: Putting a Node in Maintenance Mode with Hawk2
  1. Start a Web browser and log in to the cluster as described in Section 7.2, “Logging In”.

  2. In the left navigation bar, select Cluster Status.

  3. In one of the individual nodes' views, click the wrench icon next to the node and select Maintenance.

  4. After you have finished your maintenance task, click the wrench icon next to the node and select Ready.

17.6 Putting a Node in Standby Mode Edit source

To put a node in standby mode on the crm shell, use the following command:

root # crm node standby NODENAME

To bring the node back online after your maintenance work is done, use the following command:

root # crm node online NODENAME
Procedure 17.4: Putting a Node in Standby Mode with Hawk2
  1. Start a Web browser and log in to the cluster as described in Section 7.2, “Logging In”.

  2. In the left navigation bar, select Cluster Status.

  3. In one of the individual nodes' views, click the wrench icon next to the node and select Standby.

  4. Finish the maintenance task for the node.

  5. To deactivate the standby mode, click the wrench icon next to the node and select Ready.

17.7 Putting a Resource into Maintenance Mode Edit source

To put a resource into maintenance mode on the crm shell, use the following command:

root # crm resource maintenance RESOURCE_ID true

To put the resource back into normal mode after your maintenance work is done, use the following command:

root # crm resource maintenance RESOURCE_ID false
Procedure 17.5: Putting a Resource into Maintenance Mode with Hawk2
  1. Start a Web browser and log in to the cluster as described in Section 7.2, “Logging In”.

  2. In the left navigation bar, select Resources.

  3. Select the resource you want to put in maintenance mode or unmanaged mode, click the wrench icon next to the resource and select Edit Resource.

  4. Open the Meta Attributes category.

  5. From the empty drop-down list, select the maintenance attribute and click the plus icon to add it.

  6. Activate the check box next to maintenance to set the maintenance attribute to yes.

  7. Confirm your changes.

  8. After you have finished the maintenance task for that resource, deactivate the check box next to the maintenance attribute for that resource.

    From this point on, the resource will be managed by the High Availability Extension software again.

17.8 Putting a Resource into Unmanaged Mode Edit source

To put a resource into unmanaged mode on the crm shell, use the following command:

root # crm resource unmanage RESOURCE_ID

To put it into managed mode again after your maintenance work is done, use the following command:

root # crm resource manage RESOURCE_ID
Procedure 17.6: Putting a Resource into Unmanaged Mode with Hawk2
  1. Start a Web browser and log in to the cluster as described in Section 7.2, “Logging In”.

  2. From the left navigation bar, select Status and go to the Resources list.

  3. In the Operations column, click the arrow down icon next to the resource you want to modify and select Edit.

    The resource configuration screen opens.

  4. Below Meta Attributes, select the is-managed entry from the empty drop-down box.

  5. Set its value to No and click Apply.

  6. After you have finished your maintenance task, set is-managed to Yes (which is the default value) and apply your changes.

    From this point on, the resource will be managed by the High Availability Extension software again.

17.9 Rebooting a Cluster Node While in Maintenance Mode Edit source

Note
Note: Implications

If the cluster or a node is in maintenance mode, you can stop or restart cluster resources at will—the High Availability Extension will not attempt to restart them. If you stop the Pacemaker service on a node, all daemons and processes (originally started as Pacemaker-managed cluster resources) will continue to run.

If you attempt to start Pacemaker services on a node while the cluster or node is in maintenance mode, Pacemaker will initiate a single one-shot monitor operation (a probe) for every resource to evaluate which resources are currently running on that node. However, it will take no further action other than determining the resources' status.

If you want to take down a node while either the cluster or the node is in maintenance mode, proceed as follows:

  1. On the node you want to reboot or shut down, log in as root or equivalent.

  2. If you have a DLM resource (or other resources depending on DLM), make sure to explicitly stop those resources before stopping the Pacemaker service:

    crm(live)resource# stop RESOURCE_ID

    The reason is that stopping Pacemaker also stops the Corosync service, on whose membership and messaging services DLM depends. If Corosync stops, the DLM resource will assume a split brain scenario and trigger a fencing operation.

  3. Stop the Pacemaker service on that node:

    root # crm cluster stop
  4. Shut down or reboot the node.

Print this page