Issue #907
closedResource reservations are not released properly
Description
The pulp tasking system of 2.5.x has a defect where resource reservations are not cleaned up. I have verified this does not affect 2.6.0 or newer versions of Pulp.
This causes workers to be considered reserved when they are not. This doesn't cause a correctness problem, but could potentially causes work to be incorrectly routed to workers who are already busy with other work. The workaround is to restart the Pulp worker with the vestige reservation which causes that worker to release all associated resource reservations.
To reproduce we need to look at the internal state of pulp as follows:
0) Install any 2.5.x version of Pulp.
1) Start all Pulp services.
2) Create a repo and sync it like this:
pulp-admin -u admin -p admin rpm repo create --repo-id zoo --relative-url zoo --feed http://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/zoo/
pulp-admin -u admin -p admin rpm repo sync run --repo-id zoo
3) After the task is fully finished the reserved_resource collection in the pulp database in MongoDB should be empty, but instead you'll find a record like this one:
{ "_id" : "repository:zoo" , "_ns" : "reserved_resources" , "num_reservations" : 1 , "assigned_queue" : "reserved_resource_worker-0@example.com.dq"}
4) If you run the sync again you'll see the num_reservations increase 1 for each time you run the sync.
Expected results: I that when work that requires a reservation completes and there is no other work in the system that the reserved_resource collection will be empty.
Updated by bmbouter about 8 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to bmbouter
Added by bmbouter about 8 years ago
Added by bmbouter about 8 years ago
Updated by bmbouter about 8 years ago
- Status changed from ASSIGNED to MODIFIED
- % Done changed from 0 to 100
Applied in changeset pulp|1964dbdea6c467a0da348a73beac092ffc4153e5.
Updated by cduryee about 8 years ago
- Triaged changed from No to Yes
issue is already in modified state, setting triage to true.
Updated by bmbouter over 7 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Resource reservations now release properly
https://pulp.plan.io/issues/907
closes #907