Bug 2175007

Summary: [regression] data.yml is referring to old sync plain id which does not exist in katello_sync_plans
Product: Red Hat Satellite Reporter: Odilon Sousa <osousa>
Component: Satellite MaintainAssignee: Eric Helms <ehelms>
Status: CLOSED ERRATA QA Contact: Griffin Sullivan <gsulliva>
Severity: high Docs Contact:
Priority: high    
Version: 6.9.0CC: ahumbe, apatel, egolov, ehelms, gsulliva, kgaikwad, msunil, ngalvin, pcreech, pdwyer, rcavalca, rrajput, saydas
Target Milestone: 6.12.3Keywords: PrioBumpGSS, Regression, Triaged, Upgrades, WorkAround
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-foreman_maintain-1.1.12-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1997186 Environment:
Last Closed: 2023-04-04 15:20:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Comment 2 Griffin Sullivan 2023-03-14 19:25:59 UTC
Verified on 6.12.3 snap 1

Deleting sync plans when disabled does not disrupt foreman-maintain's ability to enable the right sync plans.

Steps to Reproduce:

1. Create 2 sync plans

2. # foreman-maintain advanced procedure run sync-plans-disable

3. # hammer sync-plan delete --id 1

4. # foreman-maintain advanced procedure run sync-plans-enable

Results:

Running ForemanMaintain::Scenario
================================================================================
re-enable sync plans: 
| Total 1 sync plans are now enabled.                                 [OK]      
--------------------------------------------------------------------------------


You can also see the proper list of enabled and disabled sync plans in /var/lib/foreman-maintain/data.yml

Comment 3 Griffin Sullivan 2023-03-24 13:16:52 UTC
Verified in 6.12.3 snap 2

Test automation covering the following steps ran and passed successfully

1. Create 2 sync plans

2. # foreman-maintain advanced procedure run sync-plans-disable

3. # hammer sync-plan delete --id 1

4. # foreman-maintain advanced procedure run sync-plans-enable

Results:

Running ForemanMaintain::Scenario
================================================================================
re-enable sync plans: 
| Total 1 sync plans are now enabled.                                 [OK]      
--------------------------------------------------------------------------------

Comment 8 errata-xmlrpc 2023-04-04 15:20:04 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 (Important: Satellite 6.12.3 Async Security Update), 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-2023:1630