Configuring a RHEL HA Cluster Fence Agent for an IBM Cloud Virtual Private Cloud (VPC) server

Updated

Environment

  • IBM Cloud Virtual Server for IBM Cloud Virtual Private Cloud (VPC)
  • Red Hat Enterprise Linux 8 with the High Availability Add-on)
  • Pacemaker

Prerequisites

  • A supported version of Red Hat Enterprise Linux has been installed on each node
  • RHEL HA has been installed, configured, and started without a configured fencing agent

For instructions on installing and configuring a Red Hat Cluster consisting of

Configuring a RHEL HA cluster fence Agent for an IBM Cloud Virtual Private Cloud (VPC) server

  1. Install the IBM cloud CLI, as documented in Content from cloud.ibm.com is not included.Installing the stand-alone IBM Cloud CLI.

    # curl -fsSL https://clis.cloud.ibm.com/install/linux | sh
    
  2. Log in to the IBM cloud, specify a resource group, and get an API key. Save the API key for later use.

    # ibmcloud login 
    # ibmcloud target -g <resource group>
    # ibmcloud iam api-key-create <key name>
    
  3. Install the IBM VPC fence agent.

    # yum install fence-agents-ibm-vpc
    
  4. Verify basic connectivity with the agent and API and get the internal node IDs.

    # fence_ibm_vpc --apikey <apikey> --region us-south -o
    list
    <node1_internal_id>,node1
    ... (other nodes will follow)
    # fence_ibm_vpc --apikey <apikey> --region us-south -n
    <node1_internal_id> -o status
    ... (should show Off or On)
    
  5. Verify that the permissions are not blocking fence requests.

        # pcs --force stonith create ibmvpcfence fence_ibm_vpc apikey=<api_key> region=us-south pcmk_host_map="node1:<node1_internal_id>;node2:<node2
    _internal_id>;node3:<node3_internal_id>"
    
  6. Test that you can successfully fence a node.

    # pcs stonith fence node2
    

    Verify that node2 was fenced.

Article Type