Project

Profile

Help

Issue #3043

closed

Race condition during orphan cleanup

Added by ttereshc about 7 years ago. Updated about 4 years ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
1. Low
Version:
2.8.7
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

If you do two orphan deletes at the same time, you may hit an issue where orphan delete #1 and #2 both attempt to delete the same files. One will work, but the other will not.

Task pulp.server.managers.content.orphan.delete_all_orphans[27786f75-0b80-4b99-b705-f81686fd7a44] raised unexpected: OSError(2, 'No such file or directory')
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 473, in __call__
    return super(Task, self).__call__(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 103, in __call__
    return super(PulpTask, self).__call__(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 437, in __protected_call__
    return self.run(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/server/managers/content/orphan.py", line 170, in delete_all_orphans
    OrphanManager.delete_orphans_by_type(content_type_id)
  File "/usr/lib/python2.7/site-packages/pulp/server/managers/content/orphan.py", line 241, in delete_orphans_by_type
    OrphanManager.delete_orphaned_file(storage_path)
  File "/usr/lib/python2.7/site-packages/pulp/server/managers/content/orphan.py", line 333, in delete_orphaned_file
    contents = os.listdir(path)
OSError: [Errno 2] No such file or directory: '/var/lib/pulp/content/units/rpm/c4/8c33f82219cec8781bdff6b941805a11064b5f1a68dc61f5ba4925dee153f7'

Related issues

Related to Pulp - Issue #3045: Running orphan cleanup tasks simultaniously leads to high mongod cpu usageCLOSED - WONTFIXActions

Also available in: Atom PDF