How to modify the resource parameter in Pacemaker cluster?

Solution Verified - Updated

Environment

  • Red Hat Enterprise Linux Server 6, 7, 8, and 9 (with the High Availability Add On)
  • pacemaker

Issue

  • How do you modify a resource parameter in pacemaker cluster?

Resolution

Following command can be used to modify the resource parameter in Pacemaker cluster.

# pcs resource update <resource id> [resource options] [op [<operation action <operation options>]...] [meta <meta operations>...] [--wait[=n]]

For example, following command can be used to modify the IP address of a VIP resource.

# pcs resource update VIP_B ip=192.168.122.111

When a resource is modified the resource may restart if the reload operation is not available for the resource or the updated parameter does not have the unique=0 attribute set as discussed in below document.

This could cause any constraints or dependencies (if part of a group) to be stopped first as well.

If the resource is part of a Master/Slave resource then the resource will be demoted on all nodes and then a Master(s) will be prompted. In both instances this will cause a momentary outage.

In order to ensure a resource does not restart following an update, you can put the cluster in maintenance mode first. When the resource parameter is modified, it won't restart, until you leave maintenance mode.

SBR
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.