Uploaded image for project: 'OpenShift Hive'
  1. OpenShift Hive
  2. HIVE-2284

ClusterPool: Handle deleted CDC with external finalizer

XMLWordPrintable

    • ClusterPool: Handle deleted CDC with external finalizer
    • To Do
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • Not Selected
    • None
    • None
    • None

      Updating controller-runtime via HIVE-2144, we had to stop using objects with a deletionTimestamp but no finalizers. This test was relying on such an object, which would incidentally get actually deleted during the code flow, resulting in the configured expected state.

      In reality, it is very unlikely (though still possible) that we will get an object in this state. However, an equivalent state would be where the object has a deletionTimestamp and doesn't have our finalizer, but has some other finalizer. (In this case think for example if an external controller is managing the creation/deletion of CDCs.) When we alter the test thusly, the reconcile goes down a whole different path which actually turns out to be incorrect: we end up trying to use the deleted CDC.

      What's needed is a way to make sure such a CDC is not available for inventory purposes. But we still need to pay attention to whether our finalizer exists, and remove it iff appropriate. To wit, this chunk still needs to run: remove the finalizer only if the CDC is not reserved. However, this func needs to not put the CDC in the "unassigned" bucket, as it does today.

      Not sure what the solution should be without digging a lot deeper. I would hate to grow a whole new bucket (e.g. pendingDeletion?)

      cc abraverm@redhat.com

              Unassigned Unassigned
              efried.openshift Eric Fried
              None
              None
              None
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: