QRadar Suite Software deployment attachvolume fails

When a pod is restarted and scheduled on another node, attachvolume fails because the volume is still attached to the previous node on which the pod was scheduled.

Symptoms

The QRadar® Suite Software deployment attachvolume fails after a restart when scheduled on a node.

Diagnosing the problem

You see an error message that looks like the following:
Warning FailedAttachVolume 69m attachdetach-controller Multi-Attach error for volume 

Resolving the problem

Tip: For Amazon Web Services ROSA and Google cloud platform, you can update kube-controller-manager to increase to detachment timeout.

Complete the following steps to remove the volume attachments of the failing pod:

  1. Get the volume name for pod that is failing to attachvolume by running the command:
    POD="<WRITE-POD-NAME-HERE>"
    VOLUME_NAME=$(oc get pvc $(oc get pod $POD -o yaml | grep claimName: | head -1 | sed -e 's/^.*: //') -o jsonpath="{.spec.volumeName}")
  2. Delete the volume attachment by running the following command:
    oc delete volumeattachment $(oc get volumeattachment -oname | grep "$VOLUME_NAME" | awk '{print $1}')
  3. Validate the pod is running using the command:
    oc get pod $POD