Bug 2053996 - ReclaimSpace does not acquire repo lock so it can be run concurrently with the repo sync
Summary: ReclaimSpace does not acquire repo lock so it can be run concurrently with th...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Repositories
Version: 6.11.0
Hardware: x86_64
OS: Linux
high
high
Target Milestone: 6.11.0
Assignee: satellite6-bugs
QA Contact: Cole Higgins
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-13 21:13 UTC by Pavel Moravec
Modified: 2023-09-15 01:51 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-07-05 14:33:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 34456 0 High New ReclaimSpace does not acquire repo lock so it can be run concurrently with the repo sync 2022-02-15 20:24:43 UTC
Red Hat Product Errata RHSA-2022:5498 0 None None None 2022-07-05 14:33:29 UTC

Description Pavel Moravec 2022-02-13 21:13:03 UTC
Description of problem:
The described observation is not a bug per se and I dont even know if it *can* lead to a problem. But ReclaimSpace task does not acquire any lock, and it can be concurrently executed to the repo sync or content validation (successfully tried both).

Doing concurrently two different (in some way opposite) activities on a repo sounds as a potential problem, hence raising it this way. If that concurrent activity can trigger a problem, please add repo lock to ReclaimSpace task. If not, close this BZ as NOTABUG.
 

Version-Release number of selected component (if applicable):
Sat 7.0 snap 9


How reproducible:
100%


Steps to Reproduce:
1. Sync a (bigger) repo with On Demand download policy
2. Open the repo in WebUI in two tabs.
3. Quickly one after another, initiate sync and reclaim space tasks from the two tabs.
4. Check the task details / ReclaimSpace task locks.


Actual results:
4. It is possible to have the tasks running concurrently. ReclaimSpace does not acquire any lock.


Expected results:
Add the repo lock to ReclaimSpace in case it is needed.


Additional info:

Comment 1 Samir Jha 2022-02-15 20:24:42 UTC
Created redmine issue https://projects.theforeman.org/issues/34456 from this bug

Comment 2 Bryan Kearney 2022-02-22 00:05:30 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/34456 has been resolved.

Comment 9 errata-xmlrpc 2022-07-05 14:33:17 UTC
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 (Moderate: Satellite 6.11 Release), 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/RHSA-2022:5498

Comment 10 Red Hat Bugzilla 2023-09-15 01:51:51 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 365 days


Note You need to log in before you can comment on or make changes to this bug.