Uploaded image for project: 'Percona Operator for MongoDB'
  1. Percona Operator for MongoDB
  2. K8SPSMDB-767

combination of delete-psmdb-pods-in-order and delete-psmdb-pvc finalizers doesn't work

Details

    • Bug
    • Status: Done
    • Medium
    • Resolution: Fixed
    • 1.12.0
    • 1.14.0
    • None
    • Yes
    • Yes

    Description

      If you enable both finalizers (delete-psmdb-pods-in-order and delete-psmdb-pvc) and delete the CR:
      1. pods will not be deleted in order
      2. you will have some PVCs left (not all but 2 - one from cfg-0 and one for rs0-0)

      Here's how it looks.
      Pod deletion:

      NAME                                               READY   STATUS        RESTARTS      AGE
      my-cluster-name-cfg-0                              2/2     Terminating   0             3m5s
      my-cluster-name-cfg-1                              2/2     Terminating   1 (82s ago)   2m30s
      my-cluster-name-cfg-2                              2/2     Terminating   1 (79s ago)   118s
      my-cluster-name-mongos-0                           1/1     Terminating   0             84s
      my-cluster-name-mongos-1                           1/1     Terminating   0             69s
      my-cluster-name-mongos-2                           1/1     Terminating   0             54s
      my-cluster-name-rs0-0                              2/2     Terminating   0             3m4s
      my-cluster-name-rs0-1                              2/2     Terminating   0             2m32s
      my-cluster-name-rs0-2                              2/2     Terminating   0             118s
      percona-server-mongodb-operator-6677c8cbf7-d6p5p   1/1     Running       0             3m40s
      
      NAME                                               READY   STATUS     RESTARTS   AGE
      my-cluster-name-cfg-0                              1/2     Running    0          28s
      my-cluster-name-rs0-0                              0/2     Init:0/1   0          18s
      percona-server-mongodb-operator-6677c8cbf7-d6p5p   1/1     Running    0          4m26s
      
      NAME                                               READY   STATUS        RESTARTS   AGE
      my-cluster-name-cfg-0                              1/2     Terminating   0          34s
      my-cluster-name-rs0-0                              0/2     Terminating   0          24s
      percona-server-mongodb-operator-6677c8cbf7-d6p5p   1/1     Running       0          4m32s
      
      NAME                                               READY   STATUS    RESTARTS   AGE
      percona-server-mongodb-operator-6677c8cbf7-d6p5p   1/1     Running   0          5m5s
      

      PVC deletion:

      NAME                                STATUS        VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
      mongod-data-my-cluster-name-cfg-0   Terminating   pvc-7b0217b7-0bf4-4985-a6a0-ec1270f84ea8   3Gi        RWO            standard       3m16s
      mongod-data-my-cluster-name-cfg-1   Terminating   pvc-097ea32e-d94b-4c13-904d-f13587be62d1   3Gi        RWO            standard       2m41s
      mongod-data-my-cluster-name-cfg-2   Terminating   pvc-65e8b345-9d7b-43f7-a3ac-9bc1108e2d43   3Gi        RWO            standard       2m9s
      mongod-data-my-cluster-name-rs0-0   Terminating   pvc-c105eacd-f9b1-4011-9344-a25f6db2b211   3Gi        RWO            standard       3m15s
      mongod-data-my-cluster-name-rs0-1   Terminating   pvc-85a23bcb-ebda-4cd7-9ec4-e29059935525   3Gi        RWO            standard       2m43s
      mongod-data-my-cluster-name-rs0-2   Terminating   pvc-39dbed92-5918-4977-9069-481f48d587d3   3Gi        RWO            standard       2m9s
      
      NAME                                STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
      mongod-data-my-cluster-name-cfg-0   Bound    pvc-db283a7f-deeb-4f73-83bd-e31e81c2870e   3Gi        RWO            standard       111s
      mongod-data-my-cluster-name-rs0-0   Bound    pvc-862576ac-6ee9-45c7-92e0-156072e60ba8   3Gi        RWO            standard       101s
      

      As you can see two PVC are left and pods are not deleted in order.

      Attachments

        Issue Links

          Activity

            People

              andrii.dema Andrii Dema
              tomislav.plavcic@percona.com Tomislav Plavcic
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Smart Checklist