Bug #23647
closedkatello-remove-orphans in cron.daily can clash with katello-backup
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1478047
Description of problem:
`katello-remove-orphans` and `katello-clean-empty-puppet-environments` can clash with `katello-backup` depending on the schedule, causing incomplete `pulp` backup data being saved away.
We have seen issues, when `katello-backup` and `katello-remove-orphans` run at the same time. It causes `backup_pulp_online` to run multiple times https://github.com/Katello/katello-packaging/blob/KATELLO-3.3/katello/katello-backup#L53 which will produce a almost empty `pulp_data.tar` as `--listed-incremental=.pulp.snar` is used for the first but more important the second run.
Having `katello-remove-orphans` and `katello-clean-empty-puppet-environments` in `cron.d` would allow more flexibility and control when it actually runs. It would also be easier to adjust the timing if clash between `katello-backup` and `katello-remove-orphans` are about to be expected.
Thus changing https://github.com/Katello/katello-packaging/blob/e34a02227e537b293590dc13df06e16ecd4dba76/katello/katello.spec#L84-L85 (including https://github.com/Katello/katello-packaging/blob/e34a02227e537b293590dc13df06e16ecd4dba76/katello/katello.spec#L136-L137) as well as https://github.com/Katello/katello-packaging/blob/e34a02227e537b293590dc13df06e16ecd4dba76/katello/katello-remove-orphans and https://github.com/Katello/katello-packaging/blob/e34a02227e537b293590dc13df06e16ecd4dba76/katello/katello-clean-empty-puppet-environments to actually reflect the requirements and implementation for `cron.d` would be greatly appreciated and add the required/expected flexibility.
Version-Release number of selected component (if applicable):
- katello-common-3.0.0-21.el7sat.noarch
How reproducible:
- Always
Steps to Reproduce:
1. Sync Red Hat and EPEL repository
2. Run katello-backup --online-backup /backup
3. Make sure it runs at the same time when `katello-remove-orphans` is executed via `cron.weekly`
Actual results:
Almost empty `pulp_data.tar` one the backup finished
Expected results:
Full backup of `/var/lib/pulp` to be available
Additional info:
Updated by The Foreman Bot over 6 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman-packaging/pull/2505 added
Updated by Jonathon Turel over 6 years ago
- Translation missing: en.field_release set to 338
Updated by The Foreman Bot over 6 years ago
- Pull request https://github.com/theforeman/foreman-packaging/pull/2644 added
Updated by Justin Sherrill over 6 years ago
- Status changed from Ready For Testing to Closed
- Triaged set to No