Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionJoniel Pasqualetto
2021-08-24 15:01:19 UTC
Description of problem:
foreman-maintain will try to re-enable sync plans that don't exist anymore if there are references to them on the data.yml file.
Version-Release number of selected component (if applicable):
Satellite 6.9
How reproducible:
Steps to Reproduce:
1. Create 2 sync plans
2. Disable sync plans using foreman-maintain:
~~~
# foreman-maintain advanced procedure run sync-plans-disable
Running ForemanMaintain::Scenario
================================================================================
disable active sync plans:
\ Total 2 sync plans are now disabled. [OK]
--------------------------------------------------------------------------------
~~~
3. Remove one of the sync-plans
~~~
# hammer sync-plan delete --id 4
Sync plan destroyed.
~~~
4. Try enabling sync plans back:
~~~
# foreman-maintain advanced procedure run sync-plans-enable
Running ForemanMaintain::Scenario
================================================================================
re-enable sync plans:
| re-enabling sync plans [FAIL]
Could not update the sync plan:
Could not find sync_plan resource with id 4. Potential missing permissions: edit_sync_plans
--------------------------------------------------------------------------------
Scenario [ForemanMaintain::Scenario] failed.
The following steps ended up in failing state:
[sync-plans-enable]
Resolve the failed steps and rerun
the command. In case the failures are false positives,
use --whitelist="sync-plans-enable"
~~~
Actual results:
Fail to re-enable sync plans
Expected results:
All valid sync plans would be enabled
Additional info:
BZ#1717020 was about the exact same thing and is supposed to be fixed on 6.6, however we can see it in 6.9.
I am on 6.11.4 and having this issue still..
Going with this work around while waiting for a solution - not great not terrible.
https://access.redhat.com/solutions/6967460
Red Hat, when do you expect it to be fixed?
Hello,
There is a much better solution present than what is documented in the KB.
A) mv /var/lib/foreman-maintain/data.yml /tmp/
B) use "hammer sync-plan list" to check the current list of sync plans and note down their IDs
C) Use "hammer sync-plan update --id X --enabled true" to enable the sync plans manually [ if found any disabled ] [ here X should be replaced by ID of the sync plan ]
D) Now fix satellite-maintain :
# satellite-maintain advanced procedure run sync-plans-disable
# cat /var/lib/foreman-maintain/data.yml
--> It should record the ID of currently present sync plans under "disabled" section
# satellite-maintain advanced procedure run sync-plans-enable
# cat /var/lib/foreman-maintain/data.yml
--> It should record the ID of currently present sync plans under "enabled" section
And now, you are good to normally use satellite-maintain or foreman-maintain command for upgrade or backup or restore without needing to whitelist any steps.
Verified on 6.13 snap 14
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 3
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
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.13 Release), 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:2097