Bug 2033051

Summary: ACM application placement fails after renaming the application name
Product: Red Hat Advanced Cluster Management for Kubernetes Reporter: Neha Chugh <nchugh>
Component: App LifecycleAssignee: Feng Xiang <fxiang>
Status: CLOSED ERRATA QA Contact: Almen Ng <almng>
Severity: high Docs Contact: bswope <bswope>
Priority: unspecified    
Version: rhacm-2.4.zCC: kcormier, xiangli, yuhe
Target Milestone: ---Flags: bot-tracker-sync: rhacm-2.4.z+
Target Release: rhacm-2.4.3   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-04-20 23:47:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Neha Chugh 2021-12-15 19:03:36 UTC
Description of the problem:

ACM application placement doesn't update with change of the application name

Release version:
2.4.1

Operator snapshot version:

NA

OCP version:
NA


Browser Info:
NA

Steps to reproduce:
1. Navigate to Application -> create a subscription.
2. Enter application name as "abc" and select the placement configuration based on label for example environment=dev
3. Then change the name of application to "xyz" and save the changes.

Now, in topological view of the application it will appear like below:

Subscription failed with below status:

Cluster deploy status
local-cluster: PropagationFailed
Error: PlacementRule.apps.open-cluster-management.io "abc-placement-1" not found


Actual results:

When the placement selected based on the label, it automatically name the placement in context to application name as prefix and when we change the application name to "xyz" the placement name doesn't refresh with the new updation and the subscription failed as the old name doesn't found.

Expected results:

New placement name should be updated with any updation made in the application name.

Additional info:

Comment 2 Almen Ng 2022-01-31 21:53:27 UTC
Tested on `2.4.2-DOWNSTREAM-2022-01-28-23-20-07` on OCP `4.8.2`. The bug is still reproduceable.

Comment 3 bot-tracker-sync 2022-02-02 18:44:18 UTC
G2Bsync 1028160653 comment 
 KevinFCormier Wed, 02 Feb 2022 17:10:44 UTC 
 G2Bsync @almen-ng Thanks Almen. I was able to reproduce. @jeswanke the fix seems to miss the placementRef of the Subscription.

Comment 10 errata-xmlrpc 2022-04-20 23:47:28 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Red Hat Advanced Cluster Management 2.4.3 security updates and bug fixes), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:1476