Skip to content

Commit 7bb6c3c

Browse files
committed
OCPBUGS-13300: masters on a single compute server group
2.5 years ago we allowed to configure `serverGroupPolicy` in install-config so a user could choose which Nova scheduling policy to adopt for the machines. However, if the masters were configured with AZ, Terraform would create one ServerGroup in OpenStack (the one from master-0) but configure the Machine providerSpec with different ServerGroups, one per AZ. This was unwanted and now we want to use a single ServerGroup for masters. With compute AZ support, the users already have the possibility to ensure that masters aren't on the same failure domain as others. Also, even if there is less than 3 AZs (e.g. 2), the default `soft-anti-affinity` server group policy would make Nova to scheduling in best effort the machines on different hosts within a same AZ. Therefore, there is no need to configure the master machines with a `serverGroup` per availability zone in their Machines. Also, note that in OCP 4.14, CPMS will be enabled by default. If a user has set multiple AZ for the controlPlane and upgrade from 4.13 to 4.14, CPMS will adopt the control plane and create a CPMS in Inactive mode, with a single `serverGroup`. The `serverGroup` will likely be the one from master-0, and this will be shared across all control plane machines. It'll be up to the user to set the CPMS to Active and then the masters will be redeployed in the unique group for all masters. They will never have a ServerGroup with "clusterID + role" name because in previous releases we added the AZ name in it.
1 parent 9e2ccd1 commit 7bb6c3c

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

docs/user/openstack/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Once you configure the quota for your project, please ensure that the user for t
101101

102102
The default deployment stands up 3 master nodes, which is the minimum amount required for a cluster. For each master node you stand up, you will need 1 instance, and 1 port available in your quota. They should be assigned a flavor with at least 16 GB RAM, 4 vCPUs, and 100 GB Disk (or Root Volume). It is theoretically possible to run with a smaller flavor, but be aware that if it takes too long to stand up services, or certain essential services crash, the installer could time out, leading to a failed install.
103103

104-
The master nodes are placed in a single Server group with "soft anti-affinity" policy by default; the machines will therefore be created on separate hosts when possible.
104+
The master nodes are placed in a single Server group with "soft anti-affinity" policy by default; the machines will therefore be created on separate hosts when possible. Note that this is also the case when the master nodes are deployed across multiple availability zones that were specified by their failure domain.
105105

106106
### Worker Nodes
107107

pkg/asset/machines/openstack/machines.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,17 @@ func generateProvider(clusterID string, platform *openstack.Platform, mpool *ope
174174
}
175175

176176
serverGroupName := clusterID + "-" + role
177-
if failureDomain.ComputeAvailabilityZone != "" {
177+
// We initially used the AZ name as part of the server group name for the masters
178+
// but we realized that it was not useful. Whether or not the AZ is specified, the
179+
// masters will be spread across multiple hosts by default by the Nova scheduler
180+
// (the policy can be changed via `serverGroupPolicy` in install-config.yaml).
181+
// For the workers, we still use the AZ name as part of the server group name
182+
// so the user can control the scheduling policy per AZ and change the MachineSets
183+
// if needed on a day 2 operation.
184+
if role == "worker" && failureDomain.ComputeAvailabilityZone != "" {
178185
serverGroupName += "-" + failureDomain.ComputeAvailabilityZone
179186
}
187+
180188
spec := machinev1alpha1.OpenstackProviderSpec{
181189
TypeMeta: metav1.TypeMeta{
182190
APIVersion: machinev1alpha1.GroupVersion.String(),

0 commit comments

Comments
 (0)