How to set up a custom fence agent for power management in RHEV 3.5

Updated

Overview


The Red Hat Enterprise Virtualization Manager uses fencing for power management and to keep a host responsive.
If a host with fencing enabled loses communication with the Manager, it can be fenced (rebooted) from the Administration Portal. At least two hosts (either RHEL-based hypervisors or RHEV-H) are needed for the fencing mechanism to work.
With the release of Red Hat Enterprise Virtualization 3.5, you now have the option to use custom fence agents other than the fence agent types shipped with the RHEL or RHEV packages.

The workflow to configure a custom fence agent for your RHEV 3.5 environment includes:

  • For non-mapped custom fence agents, install it first on your host systems. This is not needed for mapped custom fence agents.
  • Configure the custom fence agent configuration keys on your Manager using the engine-config utility.
  • Restart the Manager for any changes to take effect.

NOTE Custom fence agents configured using the engine-config utility are persistent even after you upgrade your Red Hat Enterprise Virtualization environment.

Configuration Keys


**Table 1.** Custom fence agent configuration keys
Configuration KeysDescription
CustomFenceAgentMappingMaps a fencing agent to an existing agent to use the fencing script of the existing agent
CustomFenceAgentDefaultParamsDefault parameters per agent
CustomVdsFenceOptionMappingSecure/port/slot mapping support per agent
CustomVdsFenceTypeFence agents types
CustomFencePowerWaitParamMaps a fence agent to the parameter for delay on/off actions.

Examples


To configure your Manager to use a custom fence agent, you can either map the custom fence agent to an existing agent to use the fencing script of the existing agent or use a non-mapping agent and provide your own fencing script. The following examples cover simple mapping, complex mapping, and non-mapping scenarios.

Example 1. Setting up a simple mapped custom fence agent
This is the minimum configuration you need to do to configure the Manager to use a mapped custom fence agent. Define the agent type and map it to a existing agent type that is compatible.

1. Configure the Manager to use custom fence agent XXX by defining the type XXX on the Manager. Use the engine-config tool with the -s option to set the value of a configuration key.

#  engine-config -s CustomVdsFenceType="XXX"

2. Map the custom fence agent XXX to an existing agent. This example uses the ipmilan agent as the existing compatible agent.

# engine-config -s CustomFenceAgentMapping="XXX=ipmilan"

3. Restart the Manager for the changes to take effect.

# service ovirt-engine restart

Example 2. Setting up a complex mapped custom fence agent

1. Configure the Manager to use custom fence agent YYY by defining the type YYY on the Manager. Use the engine-config tool with the -s option to set the value of a configuration key.

#  engine-config -s CustomVdsFenceType="YYY"

2. Map the custom fence agent YYY to an existing agent. This example uses the ipmilan agent as the existing compatible agent.

# engine-config -s CustomFenceAgentMapping="YYY=ipmilan"

3. Map the port setting to use the setting from the custom fence agent YYY.

# engine-config -s CustomVdsFenceOptionMapping="YYY:port=ipport"

4. Restart the Manager for the changes to take effect.

Example 3. Setting up a non-mapped custom fence agent
For a non-mapped fence agent, provide the fencing script under the /usr/sbin directory (Ex: /usr/sbin/fence_ZZZ), and configure the Manager to use this agent. The rest of the custom settings are read from the fencing script.
1. Install the custom agent software on your host system.
2. Configure the Manager to use custom fence agent ZZZ by defining the type ZZZ on the Manager. Use the engine-config tool with the -s option to set the value of a configuration key.

#  engine-config -s CustomVdsFenceType="ZZZ"

3. Map the fence agent setting to use the setting from the custom fence agent ZZZ.

# engine-config -s CustomVdsFenceOptionMapping="ZZZ:port=ipport, secure=secure"

4. Configure the custom fence agent to use a particular power wait parameter. Options available are specific to the hardware. Please check with your vendor.

engine-config -s CustomFencePowerWaitParam="ZZZ=delay"

5. Restart the Manager for the changes to take effect.

Article Type