Bug #25608
closedLocks for tasks are created after planning phase, allowing 2 concurrent tasks on a "locked" object
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1655245
Description of problem:
There is a use case when manifest refresh task (or probably also other manifest related tasks) creates lock preventing concurrent manifest tasks - but too late. This allows multiple concurrent manifest tasks running.
The use case requires enabling or disabling some Red Hat repos, such that the task creates more Actions::Pulp::Repository::[UpdateImporter|RefreshDistributor] dynflow steps. This is a must for reproducer.
How reproducible:
100%
Steps to Reproduce:
1. Enable some random Red Hat repositories (at least 5)
2. Invoke two manifest refreshes almost concurrently
3. Try the same once again but with concurrent manifest refresh AND manifest import (this might trigger dangerous consequences, I guess).
Actual results:
2. and also 3. allows multiple manifest tasks running concurrently (and taking much more time than usual).
Expected results:
Neither 2. or 3. allows concurrent manifest tasks running.
Additional info:
hint for engineering: when you dont enable repos before the concurrent manifest refresh, the later task triggered will fail with "Required lock: .." error, as expected. So I think locking is done after generation of dynflow steps while it must be done before them..? (but if I am right, also concurrent CV tasks would be possible the same way..?)
Updated by The Foreman Bot about 6 years ago
- Assignee set to Adam Ruzicka
- Pull request https://github.com/theforeman/foreman-tasks/pull/379 added
Updated by The Foreman Bot about 6 years ago
- Status changed from New to Ready For Testing
Updated by The Foreman Bot almost 4 years ago
- Fixed in Releases foreman-tasks-3.1.0 added
Updated by Adam Ruzicka almost 4 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset f505bb3846ea27069e9d1b132074dcf95af8807f.
Updated by Adam Ruzicka almost 4 years ago
- Subject changed from Locks for tasks are created after planning phase, allowing 2 concurrent tasks on a "locked" object to Locks for tasks are created after planning phase, allowing 2 concurrent tasks on a "locked" object
- Target version set to foreman-tasks-4.0.0
- Fixed in Releases deleted (
foreman-tasks-3.1.0)
Updated by Adam Ruzicka almost 4 years ago
- Fixed in Releases foreman-tasks-4.0.0 added
Updated by Ondřej Ezr almost 4 years ago
- Related to Bug #32094: Mop up after split from locks to locks and links added