Uploaded image for project: 'AMQ Streams'
  1. AMQ Streams
  2. ENTMQST-3867

Fix non-cascading deletion of the StrimziPodSet resources

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 2.2.0.GA
    • None
    • None
    • None

    Description

      When the StrimziPodSet is deleted with orphan cascading policy, the Pods should be kept. This was not always the case and sometimes, the non-cascading deletion resulted in the Pod deletion as well.

      The Pod deletion with StrimziPodSets relies on Kubernetes Garbage Collection. So when the StrimziPodSet resource is deleted, the StrimziPodSet controller actually doesn't do anything and waits for Kubernetes to delete the PodSet as well as the Pods. This works fine for normal deletion. But not for non-cascading deletion. For non-cascading deletion, Kubernetes does following things:

      • Marks the PodSet as deleting (sets the deletion timestamp)
      • Modifies the Pods and removes the ownerReferences from them so that they are not deleted
      • Actually deletes the PodSet

      What happens is that the PodSet controller gets several events when the PodSet or the Pods are modified. And sometimes it happens that it reconciles the pods when the PodSet still exists but the ownerReferences are already removed from Pods => and as a result, it adds the ownerReferences back. So when later the PodSet is deleted, the Pods are deleted as well.

      Attachments

        Activity

          People

            Unassigned Unassigned
            scholzj JAkub Scholz
            Lukas Kral Lukas Kral
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: