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.
Bug 1717020 - data.yml is referring to old sync plain id which does not exist in katello_sync_plans
Summary: data.yml is referring to old sync plain id which does not exist in katello_sy...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Satellite Maintain
Version: 6.4.2
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: Unspecified
Assignee: Kavita
QA Contact: Nikhil Kathole
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-06-04 14:32 UTC by Michal Dekan
Modified: 2019-11-14 05:28 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-14 05:28:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
data.yml.nbackup referencing sync plan id 14 which does not exist in the db (3.87 KB, text/plain)
2019-06-04 14:34 UTC, Michal Dekan
no flags Details

Description Michal Dekan 2019-06-04 14:32:34 UTC
Description of problem:

/var/lib/foreman-maintain/data.yml is referencing sync plain id which does not exists in the katello_sync_plans table.

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

rubygem-foreman_maintain-0.3.3-1.el7sat.noarch

How reproducible:

Seems like we need to have satellite started on sat 6.3 upgraded all the way to 6.5 over foreman-maintain.

---
upgrade_6.3: {}
:default:
  :upgrade_target_version: 6.4.z
  :sync_plans:
    :enabled: []
    :disabled:
    - 14
    - 7
    - 8
    - 11
    - 5
    - 6
    - 12
    - 13
    - 15
    - 14
    - 1
    - 6
    - 5
    - 12
    - 2
    - 15
    - 3
...
...
...


Actual results:

I, [2019-06-04 10:10:25+0200 #32556]  INFO -- : --- Execution step 're-enable sync plans' [sync-plans-enable] started ---
D, [2019-06-04 10:10:26+0200 #32556] DEBUG -- : Running command RUBYOPT='-W0' LANG=en_US.utf-8 hammer -c "/etc/foreman-maintain/foreman-maintain-hammer.yml" --interactive=no
 sync-plan update --id 14 --enabled true with stdin nil
D, [2019-06-04 10:10:28+0200 #32556] DEBUG -- : output of the command:
 Could not update the sync plan:
  Couldn't find sync plan '14' in organization ''
E, [2019-06-04 10:10:28+0200 #32556] ERROR -- : Could not update the sync plan:
  Couldn't find sync plan '14' in organization '' (RuntimeError)
/usr/share/gems/gems/foreman_maintain-0.3.3/definitions/features/sync_plans.rb:48:in `block in update_records'
/usr/share/gems/gems/foreman_maintain-0.3.3/definitions/features/sync_plans.rb:43:in `each'
/usr/share/gems/gems/foreman_maintain-0.3.3/definitions/features/sync_plans.rb:43:in `update_records'
/usr/share/gems/gems/foreman_maintain-0.3.3/definitions/features/sync_plans.rb:28:in `make_enable'
/usr/share/gems/gems/foreman_maintain-0.3.3/definitions/procedures/sync_plans/enable.rb:25:in `block in enabled_sync_plans'


Expected results:

foreman-maintan should not try to enable sync plan which does not exist in the db anymore.

Additional info:

# foreman-maintain upgrade list-versions
- failed to list 6.5 version, only 6.4.z was listed

# foreman-maintain upgrade list-versions
6.4.z

We regenerated data.yml:

# mv /var/lib/foreman-maintain/data.yml{,.backup}

- it listed 6.5 version afterwards
- attaching data.yml.backup for the reference

Comment 3 Michal Dekan 2019-06-04 14:34:21 UTC
Created attachment 1577154 [details]
data.yml.nbackup referencing sync plan id 14 which does not exist in the db

Comment 5 Michal Dekan 2019-06-04 14:43:11 UTC
regenerated  /var/lib/foreman-maintain/data.yml re-enabled sync plan successfully during upgrade to 6.5:

# cat /var/lib/foreman-maintain/data.yml
---
upgrade_6.5: {}
:default:
  :upgrade_target_version:
  :sync_plans:
    :enabled:
    - 1
    - 6
    - 5
    - 12
    - 2
    - 15
    - 3
    :disabled: []


Note You need to log in before you can comment on or make changes to this bug.