Project

Profile

Help

Refactor #2157

Convert pulp_resource_manager to use a django lock model

Added by mhrivnak about 3 years ago. Updated 6 months ago.

Status:
MODIFIED
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:

0%

Platform Release:
Blocks Release:
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
Complexity:
Verified:
No
Verification Required:
No
Sprint:
Sprint 8

Description

pulp_resource_manager currently uses a mongodb collection with a uniqueness constraint to obtain a lock. Multiple processes attempt to insert a document, and the one who succeeds is the active process.

Given the lock model that has already been created in django, convert pulp_resource_manager to use it instead of the mongo model.

It's important to test that these locks are acquired and released as expected. Hand testing this by manually invoking two pulp_resource_managers and testing failover would be good.

NOTE: Work done with issue #2154 removed
  • this codepath0 from the 3.0-dev branch That codepath and any necessary supporting codepaths should be added to the signal in pulp.tasking.celery_app
  • this codepath1 from the 3.0-dev branch. That logic needs to be added back to pulp.tasking.base:delete_worker function.

[0]: https://github.com/pulp/pulp/blob/33ce8590f6112c2101930e23f0470c1883ef98a7/server/pulp/server/async/app.py#L84-L87
[1]: https://github.com/pulp/pulp/blob/1331a5846297eb614bfd6fe5ffefb1914d76fad0/server/pulp/server/async/tasks.py#L255-L257


Checklist


Related issues

Blocked by Pulp - Refactor #2087: create django models for task system MODIFIED Actions
Blocked by Pulp - Refactor #2154: Convert task system to use django models MODIFIED Actions

Associated revisions

Revision 6e81d8d7 View on GitHub
Added by fdobrovo about 3 years ago

Convert pulp_resource_manager to use a django lock model

closes #2156
https://pulp.plan.io/issues/2156

History

#1 Updated by mhrivnak about 3 years ago

  • Blocked by Refactor #2087: create django models for task system added

#2 Updated by mhrivnak about 3 years ago

  • Project changed from RPM Support to Pulp
  • Sprint Candidate changed from No to Yes

#3 Updated by mhrivnak about 3 years ago

  • Tags Pulp 3 added

#4 Updated by bmbouter about 3 years ago

  • Checklist item convert the pulp resource manager to use the Django based model added
  • Checklist item Do some hand testing to ensure that failover happens as expected added
  • Description updated (diff)
  • Groomed changed from No to Yes

#5 Updated by jortel@redhat.com about 3 years ago

  • Parent task set to #2162

#6 Updated by jortel@redhat.com about 3 years ago

  • Parent task deleted (#2162)

#7 Updated by mhrivnak about 3 years ago

  • Sprint/Milestone set to 25

#8 Updated by mhrivnak about 3 years ago

  • Sprint/Milestone changed from 25 to 26

#9 Updated by bmbouter about 3 years ago

  • Description updated (diff)

Added a note based on work done in #2154 which moved some of this code around

#10 Updated by bmbouter about 3 years ago

  • Description updated (diff)

#11 Updated by fdobrovo about 3 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to fdobrovo

#12 Updated by fdobrovo about 3 years ago

  • Blocked by Refactor #2154: Convert task system to use django models added

#13 Updated by fdobrovo about 3 years ago

  • Checklist item convert the pulp resource manager to use the Django based model set to Done
  • Checklist item Do some hand testing to ensure that failover happens as expected set to Done

#14 Updated by fdobrovo about 3 years ago

  • Status changed from ASSIGNED to POST

#15 Updated by fdobrovo about 3 years ago

  • Status changed from POST to MODIFIED

I accidently have written wrong issue number into the commit reference to it is here:
https://github.com/pulp/pulp/commit/6e81d8d723144c586933192754b8d99fe8af3414

#16 Updated by bmbouter over 1 year ago

  • Sprint set to Sprint 8

#17 Updated by bmbouter over 1 year ago

  • Sprint/Milestone deleted (26)

#18 Updated by daviddavis 6 months ago

  • Sprint/Milestone set to 3.0

#19 Updated by bmbouter 6 months ago

  • Tags deleted (Pulp 3)

Please register to edit this issue

Also available in: Atom PDF