Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to concurrently delete block storage objects #182

Open
lezzi opened this issue Feb 18, 2022 · 0 comments
Open

Unable to concurrently delete block storage objects #182

lezzi opened this issue Feb 18, 2022 · 0 comments

Comments

@lezzi
Copy link

lezzi commented Feb 18, 2022

I was attempting to do a concurrent removal of storage objects when multiple processes delete at the same time - one process deletes a unique storage object and I can guarantee that two processes don't initiate deletion for the same object.

The problem is that it fails due to the StorageObject._gen_attached_luns lookup. When multiple storage objects are being deleted, directories of other storage objects can disappear, and os.listdir throws an exception (not able to find a directory). In my understanding lookup should not care about empty directories and has to ignore them.

My local tests showed that it is the only place that blocks concurrent deletion and catching not found exceptions thrown from os.listdir fixes the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant