After initiating workload cluster update, machine remains stuck in "Deleting" state with present error "VolumeAttachment with .spec.source.persistentVolumeName not matching a PersistentVolume"
search cancel

After initiating workload cluster update, machine remains stuck in "Deleting" state with present error "VolumeAttachment with .spec.source.persistentVolumeName not matching a PersistentVolume"

book

Article ID: 423081

calendar_today

Updated On:

Products

VMware vSphere Kubernetes Service VMware vSphere ESXi

Issue/Introduction

  • An update of a workload cluster was started, but individual nodes are stuck at Deleting indefinitely or for a unusual longer period of time:
    # kubectl get machines -n <namespace>
    NAME                              CLUSTER   NODENAME                          PROVIDERID                      PHASE      AGE   VERSION
    cluster-#####-#####               cluster   cluster-#####-#####               vsphere://###-###-###-###-###   Running    3d    v1.30.14+vmware.1-fips
    cluster-worker-nodepool-0-#-#-1   cluster   cluster-worker-nodepool-0-#-#-1   vsphere://###-###-###-###-###   Deleting   7d    v1.29.4+vmware.3-fips.1
    cluster-worker-nodepool-0-#-#-2   cluster   cluster-worker-nodepool-0-#-#-#   vsphere://###-###-###-###-###   Running    1d    v1.30.14+vmware.1-fips
    cluster-worker-nodepool-1-#-#-3   cluster   cluster-worker-nodepool-1-#-#-#   vsphere://###-###-###-###-###   Running    7d    v1.29.4+vmware.3-fips.1
    cluster-worker-nodepool-2-#-#-4   cluster   cluster-worker-nodepool-2-#-#-#   vsphere://###-###-###-###-###   Running    7d    v1.29.4+vmware.3-fips.1
  • Describing the individual affected machine, it can be observed the machine is referring to a problematic VolumeAttachment and that it has been drained successfully:
    # kubectl describe machine -n <namespace> cluster-worker-nodepool-0-#-#-1
    [...]
    Phase:                Deleting
    v1beta2:
      Conditions:
        Reason:                NotReady
        Status:                False
        Type:                  Available
        Message:               * Deleting: Machine deletion in progress since more than 15m, stage: WaitingForVolumeDetach
    [...]
        Message:               Waiting for Node volumes to be detached (started at ####-##-##T##:##:##.00Z)
    * VolumeAttachment with .spec.source.persistentVolumeName not matching a PersistentVolume: pvc-########-####-####-#####-############
        Observed Generation:  4
        Reason:               WaitingForVolumeDetach
        Status:               True
        Type:                 Deleting
    Events:
    Type    Reason               Age                   From                Message
    ----    ------               ----                  ----                -------
    Normal  SuccessfulDrainNode  3m (x3000 over 20h)   machine-controller  success draining Machine's node "cluster-worker-nodepool-0-#-#-1"
  • When checking VolumeAttachments within the workload cluster in an SSH session with any of the control plane nodes, an attachment still being present for above affected PersistentVolume can be observed:
    root@cluster-#####-#####:~# kubectl get volumeattachment -A | grep pvc-########-####-####-#####-############
    csi-################################   csi.vsphere.vmware.com   pvc-########-####-####-#####-############   cluster-worker-nodepool-0-#-#-1   true       12d
    root@cluster-#####-#####:~#
  • Describing above VolumeAttachment in the same SSH session, an error about not finding the same PersistentVolume can be seen:
    root@cluster-#####-#####:~# kubectl describe volumeattachment csi-################################
    Name:         csi-################################
    Namespace:
    Labels:       <none>
    Annotations:  csi.alpha.kubernetes.io/node-id: cluster-worker-nodepool-0-#-#-1  <--- referring to same node being "stuck"
    [...]
    Status:
    Attached:  true
    Attachment Metadata:
      Disk UUID:  ################################
      Type:       vSphere CNS Block Volume
    Detach Error:
      Message:  persistentvolume "pvc-########-####-####-#####-############" not found  <--- referring to a PV no longer existent
      Time:     ####-##-##T##:##:##.00Z
    Events:       <none>
  • Still in the above SSH session, double-checking the existence of the mentioned PersistentVolume reveals it is indeed no longer present within the workload cluster:
    root@cluster-#####-#####:~# kubectl get pv,pvc -A | grep pvc-########-####-####-#####-############
    root@cluster-#####-#####:~#

Environment

VMware vSphere Supervisor

Resolution

When experiencing this issue, contact Broadcom support for assistance.