Remove file prefix parameter from lockutils methods
"lock_file_prefix" parameter is only needed for external locks (is not default), and external locks are not needed for ironic currently. Change-Id: I685b2f464f9d7dbacf5a8f86a1872e269fb097e9
This commit is contained in:
parent
24bc4cbd7a
commit
ae73b8e83e
@ -37,7 +37,7 @@ class DHCPFactory(object):
|
||||
# NOTE(lucasagomes): Use lockutils to avoid a potential race in eventlet
|
||||
# that might try to create two dhcp factories.
|
||||
@classmethod
|
||||
@lockutils.synchronized(EM_SEMAPHORE, 'ironic-')
|
||||
@lockutils.synchronized(EM_SEMAPHORE)
|
||||
def _set_dhcp_provider(cls, **kwargs):
|
||||
"""Initialize the dhcp provider
|
||||
|
||||
|
@ -135,7 +135,7 @@ class BaseDriverFactory(object):
|
||||
# NOTE(deva): Use lockutils to avoid a potential race in eventlet
|
||||
# that might try to create two driver factories.
|
||||
@classmethod
|
||||
@lockutils.synchronized(EM_SEMAPHORE, 'ironic-')
|
||||
@lockutils.synchronized(EM_SEMAPHORE)
|
||||
def _init_extension_manager(cls):
|
||||
# NOTE(deva): In case multiple greenthreads queue up on this lock
|
||||
# before _extension_manager is initialized, prevent
|
||||
|
@ -205,7 +205,7 @@ def list_policies():
|
||||
return policies
|
||||
|
||||
|
||||
@lockutils.synchronized('policy_enforcer', 'ironic-')
|
||||
@lockutils.synchronized('policy_enforcer')
|
||||
def init_enforcer(policy_file=None, rules=None,
|
||||
default_rule=None, use_conf=True):
|
||||
"""Synchronously initializes the policy enforcer
|
||||
|
@ -82,7 +82,7 @@ class ImageCache(object):
|
||||
if self.master_dir is None:
|
||||
# NOTE(ghe): We don't share images between instances/hosts
|
||||
if not CONF.parallel_image_downloads:
|
||||
with lockutils.lock(img_download_lock_name, 'ironic-'):
|
||||
with lockutils.lock(img_download_lock_name):
|
||||
_fetch(ctx, href, dest_path, force_raw)
|
||||
else:
|
||||
_fetch(ctx, href, dest_path, force_raw)
|
||||
@ -106,7 +106,7 @@ class ImageCache(object):
|
||||
img_download_lock_name = 'download-image:%s' % master_file_name
|
||||
|
||||
# TODO(dtantsur): lock expiration time
|
||||
with lockutils.lock(img_download_lock_name, 'ironic-'):
|
||||
with lockutils.lock(img_download_lock_name):
|
||||
# NOTE(vdrok): After rebuild requested image can change, so we
|
||||
# should ensure that dest_path and master_path (if exists) are
|
||||
# pointing to the same file and their content is up to date
|
||||
@ -123,7 +123,7 @@ class ImageCache(object):
|
||||
|
||||
if cache_up_to_date:
|
||||
# NOTE(dtantsur): ensure we're not in the middle of clean up
|
||||
with lockutils.lock('master_image', 'ironic-'):
|
||||
with lockutils.lock('master_image'):
|
||||
os.link(master_path, dest_path)
|
||||
LOG.debug("Master cache hit for image %(href)s",
|
||||
{'href': href})
|
||||
@ -165,7 +165,7 @@ class ImageCache(object):
|
||||
finally:
|
||||
utils.rmtree_without_raise(tmp_dir)
|
||||
|
||||
@lockutils.synchronized('master_image', 'ironic-')
|
||||
@lockutils.synchronized('master_image')
|
||||
def clean_up(self, amount=None):
|
||||
"""Clean up directory with images, keeping cache of the latest images.
|
||||
|
||||
|
@ -97,7 +97,7 @@ class ClusteredComputeManager(manager.ComputeManager):
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
@lockutils.synchronized(CCM_SEMAPHORE, 'ironic-')
|
||||
@lockutils.synchronized(CCM_SEMAPHORE)
|
||||
def _update_resources(self, node_uuid):
|
||||
"""Update the specified node resource
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user