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.
Description of problem:
When one clones a Satellite6 from RHEL6 via satellite-clone, any Sync Plan (either cloned from a parent Satellite or a new one created) is attempted to execute twice on every schedule.
This problem does _not_ happen when cloning Sat6 on RHEL7. Only when cloning from RHEL6 (where katello-backup --online-backup was run)
The root cause is the following:
- satellite-clone installs Satellite incl. filling event_listeners mongo collection
- this collection is not dropped (cf. [1]) while I guess it should be
- once the satellite-clone finishes, event_listeners collection in mongo has 2 records (original from installer and one copied from cloned Sat)
- how Sync Plan is triggered:
- pulp checks scheduled_calls collection to trigger repo synces
- once a repo sync finishes, hooks from event_listeners are run to notify katello/foreman
- so katello gets such trigger and files foreman-task for repo sync (with pulp task ID such that the foreman-task wont trigger new pulp sync task, but just checks it status)
- pulp executes the triggers for all applicable event_listeners, so having a duplicate ones, a duplicate foreman-task is created (for each and every repo synced)
[1] https://github.com/RedHatSatellite/satellite-clone/blob/master/roles/satellite-clone/tasks/reset_pulp_data.yml#L2
Version-Release number of selected component (if applicable):
satellite-clone-1.1.4-1.el7sat.noarch
How reproducible:
100%
Steps to Reproduce:
1. Clone whatever Satellite (even freshly installed)
2. Have (cloned or created) Sync Plan (idealy with hourly frequency to see it soon)
3. Wait for the Sync Plan execution time and check foreman tasks created
4. check event listeners:
mongo pulp_database --eval "DBQuery.shellBatchSize = 10000000; db.event_listeners.find().shellPrint()"
Actual results:
3. Shows duplicate tasks created / half of them failing with "acquired lock .." error.
4. shows 2 listeners
Expected results:
3. no extra tasks created
4. to show just 1 listener
Additional info:
I was monitoring content of the events_listener table. The table got one new record, then:
- when cloning from RHEL7, this record was removed and replaced by the same record from original Satellite
- when cloning from RHEL6, the record from original Satellite was just _added_ but previous record remained there - thats the problem
(just out of curiosity (if I am right with the way of fix): why we dont drop *all* tables but just some of them?)
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, 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/RHBA-2018:0330