Project

General

Profile

Actions

Bug #25608

closed

Locks for tasks are created after planning phase, allowing 2 concurrent tasks on a "locked" object

Added by Adam Ruzicka over 5 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

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..?)


Related issues 1 (0 open1 closed)

Related to foreman-tasks - Bug #32094: Mop up after split from locks to locks and linksClosedAdam RuzickaActions
Actions #1

Updated by The Foreman Bot over 5 years ago

  • Assignee set to Adam Ruzicka
  • Pull request https://github.com/theforeman/foreman-tasks/pull/379 added
Actions #2

Updated by The Foreman Bot over 5 years ago

  • Status changed from New to Ready For Testing
Actions #3

Updated by The Foreman Bot over 3 years ago

  • Fixed in Releases foreman-tasks-3.1.0 added
Actions #4

Updated by Adam Ruzicka over 3 years ago

  • Status changed from Ready For Testing to Closed
Actions #5

Updated by Adam Ruzicka about 3 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)
Actions #6

Updated by Adam Ruzicka about 3 years ago

  • Fixed in Releases foreman-tasks-4.0.0 added
Actions #7

Updated by Ondřej Ezr about 3 years ago

  • Related to Bug #32094: Mop up after split from locks to locks and links added
Actions

Also available in: Atom PDF