Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 7. Configuring HA cluster resources on Red Hat OpenStack Platform
The following table lists the RHOSP-specific resource agents you use to configure resources for an HA cluster on RHOSP.
|
|
Provides support for RHOSP-specific resource agents. You must configure an |
|
|
Configures a virtual IP address resource. For information about configuring an |
|
|
Configures a floating IP address resource. For information about configuring an |
|
|
Configures a block storage resource. For information about configuring an |
When configuring other cluster resources, use the standard Pacemaker resource agents.
7.1. Configuring an openstack-info resource in an HA cluster on Red Hat OpenStack Platform (required) Link kopierenLink in die Zwischenablage kopiert!
You must configure an openstack-info resource in order to run any other RHOSP-specific resource agent except for the fence_openstack fence agent.
This procedure to create an openstack-info resource uses a clouds.yaml file for RHOSP authentication.
Prerequisites
- A configured HA cluster running on RHOSP
- Access to the RHOSP APIs, using the RHOSP authentication method you will use for cluster configuration, as described in Setting up an authentication method for RHOSP
Procedure
Complete the following steps from any node in the cluster.
To view the options for the
openstack-inforesource agent, run the following command.pcs resource describe openstack-info
# pcs resource describe openstack-infoCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create the
openstack-inforesource as a clone resource. In this example, the resource is also namedopenstack-info. This example uses aclouds.yamlconfiguration file and thecloud=parameter is set to the name of the cloud in yourclouds.yamlfile.pcs resource create openstack-info openstack-info cloud="ha-example" clone
# pcs resource create openstack-info openstack-info cloud="ha-example" cloneCopy to Clipboard Copied! Toggle word wrap Toggle overflow Check the cluster status to verify that the resource is running.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
7.2. Configuring a virtual IP address in an HA cluster on Red Hat Openstack Platform Link kopierenLink in die Zwischenablage kopiert!
This procedure to create an RHOSP virtual IP address resource for an HA cluster on an RHOSP platform uses a clouds.yaml file for RHOSP authentication.
The RHOSP virtual IP resource operates in conjunction with an IPaddr2 cluster resource. When you configure an RHOSP virtual IP address resource, the resource agent ensures that the RHOSP infrastructure associates the virtual IP address with a cluster node on the network. This allows an IPaddr2 resource to function on that node.
Prerequisites
- A configured HA cluster running on RHOSP
- An assigned IP address to use as the virtual IP address
- Access to the RHOSP APIs, using the RHOSP authentication method you will use for cluster configuration, as described in Setting up an authentication method for RHOSP
Procedure
Complete the following steps from any node in the cluster.
To view the options for the
openstack-virtual-ipresource agent, run the following command.pcs resource describe openstack-virtual-ip
# pcs resource describe openstack-virtual-ipCopy to Clipboard Copied! Toggle word wrap Toggle overflow Run the following command to determine the subnet ID for the virtual IP address you are using. In this example, the virtual IP address is 172.16.0.119.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create the RHOSP virtual IP address resource.
The following command creates an RHOSP virtual IP address resource for an IP address of 172.16.0.119, specifying the subnet ID you determined in the previous step.
pcs resource create ClusterIP-osp ocf:heartbeat:openstack-virtual-ip cloud=ha-example ip=172.16.0.119 subnet_id=723c5a77-156d-4c3b-b53c-ee73a4f75185
# pcs resource create ClusterIP-osp ocf:heartbeat:openstack-virtual-ip cloud=ha-example ip=172.16.0.119 subnet_id=723c5a77-156d-4c3b-b53c-ee73a4f75185Copy to Clipboard Copied! Toggle word wrap Toggle overflow Configure ordering and location constraints:
-
Ensure that the
openstack-inforesource starts before the virtual IP address resource. Ensure that the Virtual IP address resource runs on the same node as the
openstack-inforesource.pcs constraint order start openstack-info-clone then ClusterIP-osp pcs constraint colocation add ClusterIP-osp with openstack-info-clone score=INFINITY
# pcs constraint order start openstack-info-clone then ClusterIP-osp Adding openstack-info-clone ClusterIP-osp (kind: Mandatory) (Options: first-action=start then-action=start) # pcs constraint colocation add ClusterIP-osp with openstack-info-clone score=INFINITYCopy to Clipboard Copied! Toggle word wrap Toggle overflow
-
Ensure that the
Create an
IPaddr2resource for the virtual IP address.pcs resource create ClusterIP ocf:heartbeat:IPaddr2 ip=172.16.0.119
# pcs resource create ClusterIP ocf:heartbeat:IPaddr2 ip=172.16.0.119Copy to Clipboard Copied! Toggle word wrap Toggle overflow Configure ordering and location constraints to ensure that the
openstack-virtual-ipresource starts before theIPaddr2resource and that theIPaddr2resource runs on the same node as theopenstack-virtual-ipresource.pcs constraint order start ClusterIP-osp then ClusterIP pcs constraint colocation add ClusterIP with ClusterIP-osp
# pcs constraint order start ClusterIP-osp then ClusterIP Adding ClusterIP-osp ClusterIP (kind: Mandatory) (Options: first-action=start then-action=start) # pcs constraint colocation add ClusterIP with ClusterIP-ospCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Verify the resource constraint configuration.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Check the cluster status to verify that the resources are running.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
7.3. Configuring a floating IP address in an HA cluster on Red Hat OpenStack Platform Link kopierenLink in die Zwischenablage kopiert!
The following procedure creates a floating IP address resource for an HA cluster on RHOSP. This procedure uses a clouds.yaml file for RHOSP authentication.
Prerequisites
- A configured HA cluster running on RHOSP
- An IP address on the public network to use as the floating IP address, assigned by the RHOSP administrator
- Access to the RHOSP APIs, using the RHOSP authentication method you will use for cluster configuration, as described in Setting up an authentication method for RHOSP
Procedure
Complete the following steps from any node in the cluster.
To view the options for the
openstack-floating-ipresource agent, run the following command.pcs resource describe openstack-floating-ip
# pcs resource describe openstack-floating-ipCopy to Clipboard Copied! Toggle word wrap Toggle overflow Find the subnet ID for the address on the public network that you will use to create the floating IP address resource.
The public network is usually the network with the default gateway. Run the following command to display the default gateway address.
route -n | grep ^0.0.0.0 | awk '{print $2}'# route -n | grep ^0.0.0.0 | awk '{print $2}' 172.16.0.1Copy to Clipboard Copied! Toggle word wrap Toggle overflow Run the following command to find the subnet ID for the public network. This command generates a table with ID and Subnet headings.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Create the floating IP address resource, specifying the public IP address for the resource and the subnet ID for that address. When you configure the floating IP address resource, the resource agent configures a virtual IP address on the public network and associates it with a cluster node.
pcs resource create float-ip openstack-floating-ip cloud="ha-example" ip_id="10.19.227.211" subnet_id="723c5a77-156d-4c3b-b53c-ee73a4f75185"
# pcs resource create float-ip openstack-floating-ip cloud="ha-example" ip_id="10.19.227.211" subnet_id="723c5a77-156d-4c3b-b53c-ee73a4f75185"Copy to Clipboard Copied! Toggle word wrap Toggle overflow Configure an ordering constraint to ensure that the
openstack-inforesource starts before the floating IP address resource.pcs constraint order start openstack-info-clone then float-ip
# pcs constraint order start openstack-info-clone then float-ip Adding openstack-info-clone float-ip (kind: Mandatory) (Options: first-action=start then-action=startCopy to Clipboard Copied! Toggle word wrap Toggle overflow Configure a location constraint to ensure that the floating IP address resource runs on the same node as the
openstack-inforesource.pcs constraint colocation add float-ip with openstack-info-clone score=INFINITY
# pcs constraint colocation add float-ip with openstack-info-clone score=INFINITYCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Verify the resource constraint configuration.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Check the cluster status to verify that the resources are running.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
7.4. Configuring a block storage resource in an HA cluster on Red Hat OpenStack Platform Link kopierenLink in die Zwischenablage kopiert!
The following procedure creates a block storage resource for an HA cluster on RHOSP. This procedure uses a clouds.yaml file for RHOSP authentication.
Prerequisites
- A configured HA cluster running on RHOSP
- A block storage volume created by the RHOSP administrator
- Access to the RHOSP APIs, using the RHOSP authentication method you will use for cluster configuration, as described in Setting up an authentication method for RHOSP
Procedure
Complete the following steps from any node in the cluster.
To view the options for the
openstack-cinder-volumeresource agent, run the following command.pcs resource describe openstack-cinder-volume
# pcs resource describe openstack-cinder-volumeCopy to Clipboard Copied! Toggle word wrap Toggle overflow Determine the volume ID of the block storage volume you are configuring as a cluster resource.
Run the following command to display a table of available volumes that includes the UUID and name of each volume.
openstack --os-cloud=ha-example volume list
# openstack --os-cloud=ha-example volume list | ID | Name | | 23f67c9f-b530-4d44-8ce5-ad5d056ba926| testvolume-cinder-data-disk |Copy to Clipboard Copied! Toggle word wrap Toggle overflow If you already know the volume name, you can run the following command, specifying the volume you are configuring. This displays a table with an ID field.
openstack --os-cloud=ha-example volume show testvolume-cinder-data-disk
# openstack --os-cloud=ha-example volume show testvolume-cinder-data-diskCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create the block storage resource, specifying the ID for the volume.
pcs resource create cinder-vol openstack-cinder-volume volume_id="23f67c9f-b530-4d44-8ce5-ad5d056ba926" cloud="ha-example"
# pcs resource create cinder-vol openstack-cinder-volume volume_id="23f67c9f-b530-4d44-8ce5-ad5d056ba926" cloud="ha-example"Copy to Clipboard Copied! Toggle word wrap Toggle overflow Configure an ordering constraint to ensure that the
openstack-inforesource starts before the block storage resource.pcs constraint order start openstack-info-clone then cinder-vol
# pcs constraint order start openstack-info-clone then cinder-vol Adding openstack-info-clone cinder-vol (kind: Mandatory) (Options: first-action=start then-action=startCopy to Clipboard Copied! Toggle word wrap Toggle overflow Configure a location constraint to ensure that the block storage resource runs on the same node as the
openstack-inforesource.pcs constraint colocation add cinder-vol with openstack-info-clone score=INFINITY
# pcs constraint colocation add cinder-vol with openstack-info-clone score=INFINITYCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Verify the resource constraint configuration.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Check the cluster status to verify that the resource is running.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow