Uploaded image for project: 'Migration Toolkit for Virtualization'
  1. Migration Toolkit for Virtualization
  2. MTV-3353

Archiving and deleting a failed RHV plan is not cleaning up the PVC

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 2.9.4
    • Controller
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • True
    • Important

      Description of problem:

      After archiving and deleting the migration plan, the original and prime PVC remains in the cluster and needs to be manually removed. Only the populator pods are cleaned up properly.

      The following PVCs remained in the cluster after archiving and deleting a failed plan for a VM with two disks:

      42544ee2-e9af-4811-916b-3ab44a0ddf0c-nxwgq   Pending                                                                        ocs-external-storagecluster-ceph-rbd          <unset>                 19m
      db2f38c1-20db-48eb-8d0d-f74bc4258f73-hkvzn   Pending                                                                        ocs-external-storagecluster-ceph-rbd          <unset>                 19m
      prime-03c14633-d9b6-459b-a262-af216746b6c8   Bound     pvc-4ff08e9e-b360-42f5-baf5-0b86bddf0abc   100Gi      RWX            ocs-external-storagecluster-ceph-rbd          <unset>                 19m
      prime-eae92085-2b5d-47f0-8286-c77e793ed8d5   Bound     pvc-0911a693-f8ea-4b27-939d-657847d008eb   200Gi      RWX            ocs-external-storagecluster-ceph-rbd          <unset>                 19m

       

      To delete the PVCs, we also need to remove the finalizer after deleting them.

      # oc delete pvc 42544ee2-e9af-4811-916b-3ab44a0ddf0c-nxwgq db2f38c1-20db-48eb-8d0d-f74bc4258f73-hkvzn
      persistentvolumeclaim "42544ee2-e9af-4811-916b-3ab44a0ddf0c-nxwgq" deleted
      persistentvolumeclaim "db2f38c1-20db-48eb-8d0d-f74bc4258f73-hkvzn" deleted
      ^C[
      stuck in terminating:
      42544ee2-e9af-4811-916b-3ab44a0ddf0c-nxwgq   Terminating                                                                        ocs-external-storagecluster-ceph-rbd          <unset>                 21m
      db2f38c1-20db-48eb-8d0d-f74bc4258f73-hkvzn   Terminating                                                                        ocs-external-storagecluster-ceph-rbd          <unset>                 21m
       
      # oc patch pvc db2f38c1-20db-48eb-8d0d-f74bc4258f73-hkvzn -p '{"metadata":{"finalizers":null}}'
      persistentvolumeclaim/db2f38c1-20db-48eb-8d0d-f74bc4258f73-hkvzn patched
       
      # oc patch pvc 42544ee2-e9af-4811-916b-3ab44a0ddf0c-nxwgq -p '{"metadata":{"finalizers":null}}'
      persistentvolumeclaim/42544ee2-e9af-4811-916b-3ab44a0ddf0c-nxwgq patched
       
      # oc delete pvc prime-03c14633-d9b6-459b-a262-af216746b6c8 prime-eae92085-2b5d-47f0-8286-c77e793ed8d5
      persistentvolumeclaim "prime-03c14633-d9b6-459b-a262-af216746b6c8" deleted
      persistentvolumeclaim "prime-eae92085-2b5d-47f0-8286-c77e793ed8d5" deleted
      

      Version-Release number of selected component (if applicable):

      Migration Toolkit for Virtualization Operator  2.9.4
      OpenShift Virtualization 4.19.6

      How reproducible:

      Always 
      

      Steps to Reproduce:

      1. Start a migration plan from RHV provider.
      2. While populator pod is downloading the disk, stop the ovirt-imageio service on the RHV hosts.
      3. Wait for it to fail.
      4. Archive and delete the migration plan.
      5. The created PVCs for the migration are not automatically removed.

      Actual results:

      Archiving and deleting a failed RHV plan is not cleaning up the PVC

      Expected results:

      It should cleanup the PVC since the leftover can cause operational issues

      Additional info:

       

              Unassigned Unassigned
              rhn-support-nashok Nijin Ashok
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: