Bug #24593
openPrevent running concurrent Capsule Sync against the same Capsule
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1581415
Description of problem:
There are really no locks preventing to run more Capsule Sync tasks against the same Capsule. That is very dangerous, as running this many times (i.e. due to an operator mistake) on a Satellite with hundreds or thousands of repos, the level of concurrency in dynflow (and also on the Capsule to some extend) boils the server(s).
(theoretically concurrent capsule sync might affect each other, I guess, so another reason to prevent it - apart of the fact it is ridiculous)
Version-Release number of selected component (if applicable):
any incl. 6.3.1
How reproducible:
100%
Steps to Reproduce:
1. Have an external Capsule
2.
for i in 1 2 3 4 5; do
hammer capsule content synchronize --id=2 --async
done
3. Wait a minute, check tasks running
Actual results:
3. shows multiple CapsuleSync tasks running against the same Capsule.
Expected results:
2. 2nd and further CapsuleSync request should failed with "Required lock already taken" like error.
3. No concurrent CapsuleSync tasks against the same Capsule.
Additional info:
Updated by Adam Ruzicka over 6 years ago
- Subject changed from Prevent running concurrent Capsule Sync against the same Capsule to Prevent running concurrent Capsule Sync against the same Capsule
- Priority changed from High to Normal
Updated by Jonathon Turel over 6 years ago
- Category set to Foreman Proxy Content
- Target version set to Katello Backlog
- Triaged changed from No to Yes