-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
False
-
sat-endeavour
-
None
-
None
-
None
-
None
Description of problem:
Host assigned to a compliance policy is scanned and report uploaded to the Satellite.
When changed with another compliance policy, it causes a duplicate profile and cronjob on the Host.
How reproducible: Yes
Is this issue a regression from an earlier version: No
Steps to Reproduce:
1. Clear all policies and hostgroup for Host to make sure everything is clean
2. Assign hostgroup1 to Host. Trigger ansible roles run.
3. On Host side, either run the scan manually or wait for the cron job to trigger
4. The scan completed, report uploaded to the Satellite. Host policy now explicitly set to id 1.
5. Now switch Host to hostgroup2. Trigger ansible roles run.
6. Check the config and cron on Host and see both policy id 1 and 2
and the cronjob has duplicate lines
Actual behavior:
Both compliance profile and cronjob exist on the Host.
Expected behavior:
When the Host is replaced witha new compliance policy eather manually or using hostgroup, the old policy should be cleared from the Host.
The only way to clear the duplicated policy is by clicking "Unassigned Compliance Policy" from the Host.
Business Impact / Additional info:
The customer has leapp upgraded numbers of RHEL8 (assigned with compliance policy of RHEL8) to RHEL9 (to be assigned with new compliance policy, either manually or via hostgroup). The only way to clear is to invoke "Unassign Compliance Policy" from the WEBUI which is not ideal as the customer is automating actions on the satellite/hosts.