TKG workload cluster password rotation pods fail with OCI runtime mount error after upgrade
search cancel

TKG workload cluster password rotation pods fail with OCI runtime mount error after upgrade

book

Article ID: 439359

calendar_today

Updated On:

Products

VMware vSphere Kubernetes Service

Issue/Introduction

  • After upgrading a Tanzu Kubernetes Grid (TKG) workload cluster to versions such as v1.35.x, automated node password rotation tasks may fail. This occurs because the legacy update-node-password-runner DaemonSet attempts an unauthorized root filesystem mount that is blocked by newer container runtime security. This article provides steps to clear the stale DaemonSet and trigger a secure reconciliation via the Tanzu controller.
  • When checking the pod status in the guest cluster (kubectl get pods -n kube-system), one or more pods starting with update-node-password-runner-xxx are stuck in an Error or CrashLoopBackOff state.

  • Running kubectl describe pod <pod-name> -n kube-system on a crashing pod reveals the following fatal OCI runtime error (timestamps and counts masked):

    Warning  Failed   ####m (##### over ####d)   kubelet  Error: failed to create containerd task: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/" to rootfs at "/": create mountpoint for / mount: mountpoint "/run/containerd/io.containerd.runtime.v2.task/k8s.io/update-password/rootfs" is on the top of rootfs

Cause

  • This issue occurs due to a conflict between a legacy DaemonSet configuration and strict security enhancements introduced in newer versions of the container runtime (runc) shipped with the updated Photon OS nodes.
  • Historically, the update-node-password-runner DaemonSet required access to the host's underlying binaries to modify the virtual machine's local password. It achieved this by mounting the host's root directory (hostPath: /) directly over the container's root directory (mountPath: /).
  • Recent security updates to the runc container runtime explicitly block containers from mounting volumes directly over their own root (/) filesystem.
  • Engineering has addressed this in newer TKG releases by updating the DaemonSet template to safely mount only specific required directories (e.g., /usr, /etc, /bin) rather than the entire root directory. However, during some cluster upgrades, the legacy DaemonSet object is not automatically overwritten and remains "stuck" in the cluster. When this legacy DaemonSet attempts to execute on the newly upgraded node OS, runc intercepts the illegal rootfs mount and crashes the pod.
  • This issue is addressed in TKG releases leveraging the updated Tanzu controller.

Resolution

The logic to resolve this issue is already present in the updated Tanzu controller running in the vSphere Namespace. To resolve the issue, delete the stale DaemonSet from the guest cluster so the controller can securely recreate it.

  1. Log in to the guest workload cluster context.
  2. Delete the legacy DaemonSet after taking a backup:
    kubectl delete ds update-node-password-runner -n kube-system
  3. Monitor the namespace to confirm the controller recreates the pods using the updated secure template:
    kubectl get pods -n kube-system -w | grep update-node-password-runner
    Note: If the pods do not recreate immediately after deleting the DaemonSet, this simply means the cluster passwords are already up-to-date and no rotation is currently required. To confirm the timestamp of the last successful update, check the cluster annotations from the Supervisor Cluster context:
    kubectl get cluster <WORKLOAD_CLUSTER_NAME> -n <VSPHERE_NAMESPACE> -o yaml | grep password-update-last-timestamp
  4. (Optional) To immediately force a new password rotation cycle and confirm functionality, switch your context to the Supervisor Cluster and modify the last-update annotation on the workload cluster:
    kubectl annotate cluster <WORKLOAD_CLUSTER_NAME> -n <VSPHERE_NAMESPACE> kubernetes.vmware.com/password-update-last-

    (Note the - at the very end of the command, which instructs Kubernetes to remove the annotation.)

    After running this command, switch back to the guest cluster and repeat Step 3 to watch the ephemeral pods spin up, rotate the passwords, and cleanly terminate.