From 89540bfad54ae3a50cb3cf937e08f6104d05c786 Mon Sep 17 00:00:00 2001 From: Richard Su Date: Wed, 24 Apr 2024 16:01:29 -0500 Subject: [PATCH] OCPBUGS-31733: Remove CPMS manifest for vsphere platform The control-plane-machine-set (CPMS) cluster operator fails to deploy on 4.16-ec.5 build for ABI deployments on vSphere. That build removed the CPMS feature gate. Because ABI and assisted deployments do not create or include machines in the manifests, and the control plane machine operator expects machines to be present for each control plane node, the CO fails to deploy. The CPMS manifest should be removed for ABI and other UPI-like deployments. For UPI there is documentation indicating the CPMS manifest must be removed: https://docs.openshift.com/container-platform/4.15/installing/installing_vsphere/upi/installing-vsphere.html#installation-user-infra-generate-k8s-manifest-ignition_installing-vsphere --- internal/provider/vsphere/ignition.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/internal/provider/vsphere/ignition.go b/internal/provider/vsphere/ignition.go index ce70557c40..a5875708f1 100644 --- a/internal/provider/vsphere/ignition.go +++ b/internal/provider/vsphere/ignition.go @@ -35,6 +35,15 @@ func (p vsphereProvider) PostCreateManifestsHook(_ *common.Cluster, _ *[]string, return fmt.Errorf("error deleting machineset: %w", err) } + // Delete machine-api control plane machine set manifest + p.Log.Info("Deleting machine-api control plane machine set manifest") + files, _ = filepath.Glob(path.Join(workDir, "openshift", "*_openshift-machine-api_master-control-plane-machine-set.yaml")) + err = p.deleteAllFiles(files) + + if err != nil { + return fmt.Errorf("error deleting control plane machine set: %w", err) + } + return nil }