|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * installing/installing_vsphere/installing-restricted-networks-vsphere.adoc |
| 4 | +// * installing/installing_vsphere/installing-vsphere-network-customizations.adoc |
| 5 | +// * installing/installing_vsphere/installing-vsphere.adoc |
| 6 | + |
| 7 | +:_content-type: PROCEDURE |
| 8 | +[id="anti-affinity-vsphere_{context}"] |
| 9 | += Configuring vSphere DRS anti-affinity rules for control plane nodes |
| 10 | + |
| 11 | +vSphere Distributed Resource Scheduler (DRS) anti-affinity rules can be configured to support higher availability of {product-title} Control Plane nodes. Anti-affinity rules ensure that the vSphere Virtual Machines for the {product-title} Control Plane nodes are not scheduled to the same vSphere Host. |
| 12 | + |
| 13 | +[IMPORTANT] |
| 14 | +==== |
| 15 | +* The following information applies to compute DRS only and does not apply to storage DRS. |
| 16 | +
|
| 17 | +* The `govc`` command is an open-source command available from VMware; it is not available from Red Hat. The `govc` command is not supported by the Red Hat support. |
| 18 | +
|
| 19 | +* Instructions for downloading and installing `govc` are found on the VMware documentation website. |
| 20 | +==== |
| 21 | + |
| 22 | +// https://docs.vmware.com/en/VMware-Telco-Cloud-Operations/1.4.0/deployment-guide-140/GUID-5249E662-D792-4A1A-93E6-CF331552364C.html#:~:text=Govc%20is%20an%20open%20source,operations%20on%20the%20target%20vCenter. |
| 23 | + |
| 24 | +Create an anti-affinity rule by running the following command: |
| 25 | + |
| 26 | +.Example command |
| 27 | + |
| 28 | +[source,terminal] |
| 29 | +---- |
| 30 | +$ govc cluster.rule.create \ |
| 31 | + -name openshift4-control-plane-group \ |
| 32 | + -dc MyDatacenter -cluster MyCluster \ |
| 33 | + -enable \ |
| 34 | + -anti-affinity master-0 master-1 master-2 |
| 35 | +---- |
| 36 | + |
| 37 | +After creating the rule, your control plane nodes are automatically migrated by vSphere so they are not running on the same hosts. This might take some time while vSphere reconciles the new rule. Successful command completion is shown in the following procedure. |
| 38 | + |
| 39 | +[NOTE] |
| 40 | +==== |
| 41 | +The migration occurs automatically and might cause brief OpenShift API outage or latency until the migration finishes. |
| 42 | +==== |
| 43 | + |
| 44 | +The vSphere DRS anti-affinity rules need to be updated manually in the event of a control plane VM name change or migration to a new vSphere Cluster. |
| 45 | + |
| 46 | +.Procedure |
| 47 | + |
| 48 | +. Remove any existing DRS anti-affinity rule by running the following command: |
| 49 | ++ |
| 50 | +[source,terminal] |
| 51 | +---- |
| 52 | +$ govc cluster.rule.remove \ |
| 53 | + -name openshift4-control-plane-group \ |
| 54 | + -dc MyDatacenter -cluster MyCluster |
| 55 | +---- |
| 56 | ++ |
| 57 | +.Example Output |
| 58 | +[source,terminal] |
| 59 | +---- |
| 60 | +[13-10-22 09:33:24] Reconfigure /MyDatacenter/host/MyCluster...OK |
| 61 | +---- |
| 62 | + |
| 63 | +. Create the rule again with updated names by running the following command: |
| 64 | ++ |
| 65 | +[source,terminal] |
| 66 | +---- |
| 67 | +$ govc cluster.rule.create \ |
| 68 | + -name openshift4-control-plane-group \ |
| 69 | + -dc MyDatacenter -cluster MyOtherCluster \ |
| 70 | + -enable \ |
| 71 | + -anti-affinity master-0 master-1 master-2 |
| 72 | +---- |
0 commit comments