← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1065531] Re: lockutils - remove lock dir creation and cleanup

 

** Changed in: nova
       Status: Fix Committed => Fix Released

** Changed in: nova
    Milestone: None => havana-3

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1065531

Title:
  lockutils - remove lock dir creation and cleanup

Status in Cinder:
  In Progress
Status in OpenStack Neutron (virtual network service):
  New
Status in OpenStack Compute (Nova):
  Fix Released
Status in Oslo - a Library of Common OpenStack Code:
  Fix Released

Bug description:
  See https://review.openstack.org/14139

  This:

                      if not local_lock_path:
                          cleanup_dir = True
                          local_lock_path = tempfile.mkdtemp()

                      if not os.path.exists(local_lock_path):
                          cleanup_dir = True
                          ensure_tree(local_lock_path)
                      ...
                      finally:
                          # NOTE(vish): This removes the tempdir if we needed
                          #             to create one. This is used to cleanup
                          #             the locks left behind by unit tests.
                          if cleanup_dir:
                              shutil.rmtree(local_lock_path)

  
  Why are we deleting the lock dir here? Does that even work? i.e. what if someone concurrently tries to take the lock, re-creates the dir and lock a new file?

To manage notifications about this bug go to:
https://bugs.launchpad.net/cinder/+bug/1065531/+subscriptions