Uploaded image for project: 'Red Hat Advanced Cluster Management'
  1. Red Hat Advanced Cluster Management
  2. ACM-3050

Objects managed by ConfigurationPolicies are left behind if they are renamed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Undefined Undefined
    • ACM 2.8.0
    • ACM 2.6.0, ACM 2.7.0
    • GRC
    • 3
    • False
    • Hide

      None

      Show
      None
    • False
    • GRC Sprint 2023-04
    • Important
    • ?
    • No

      Description of problem:

      The pruneObjectBehavior of a ConfigurationPolicy does not help clean up objects when the policy is edited such that the managed object's name is changed. Ideally, editing the policy would result in deleting the old object, if the pruneObjectBehavior field was set.

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

      2.6+

      How reproducible:

      Yes

      Steps to Reproduce:

      1. Create a policy with a ConfigurationPolicy managing a pod. Set the pod name to "one" and set the pruneObjectBehavior flag on the ConfigurationPolicy to "DeleteAll".
      2. Enforce the policy and wait for it to become compliant.
      3. Edit the policy, changing the pod's name to "two"
      4. Wait for the policy to become compliant.

      Actual results:

      Pods "one" and "two" will be present on the managed cluster. If the Policy is deleted, only pod "two" will be removed along with it.

      Expected results:

      Pod "one" should be removed when the policy is edited.

      Additional info:

      Sort of similar to https://issues.redhat.com/browse/ACM-3049

              yikim@redhat.com Yi Rae Kim
              jkulikau@redhat.com Justin Kulikauskas
              Derek Ho Derek Ho
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: