Skip to content

CKS upgrade does not apply the provider and CSI driver of the new version #14922

In review

Description

@bhouse-nexthop

problem

Upgrading a CKS cluster to a Kubernetes version whose binaries ISO has a different CloudStack Kubernetes provider (CCM) or CSI driver manifest leaves the cluster on the manifests it was created with.

upgrade-kubernetes.sh copies the provider manifest of the new ISO to /opt/provider/provider.yaml on each node, and KubernetesClusterUpgradeWorker calls deployProvider() before each node. But deploy-provider starts with:

(/opt/bin/kubectl get pods -A | grep cloud-controller-manager) && exit 0

so on any running cluster it exits before applying anything. The CSI driver manifests of the ISO (snapshot-crds.yaml, manifest.yaml) are not copied by the upgrade script at all, and deploy-csi-driver has the same early exit.

The upgrade script does apply the CNI and dashboard manifests of the new ISO, so only the provider and the CSI driver are affected.

versions

4.22 and main (same code). Seen on 4.22.1.1 with KVM.

The steps to reproduce the bug

  1. Create a CKS cluster (1 control node, 2 workers) on an isolated network from a 1.33 binaries ISO, with the CSI driver enabled.
  2. Register a 1.34 binaries ISO whose provider.yaml differs, for example one with hostNetwork: true and a required control-plane node affinity on the cloud-controller-manager Deployment.
  3. Upgrade the cluster to the 1.34 version.
  4. /opt/provider/provider.yaml on the control node has hostNetwork: true, but kubectl -n kube-system get deployment cloud-controller-manager still has generation 1, no host network, no affinity, and the image of the 1.33 ISO.

What to do about it?

Once every node is upgraded, apply the provider and CSI driver manifests of the new ISO and wait for their rollout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions