Fix wrong regex in cleanup_file_locks.
The sentinel filename actually has form hostname-threadid.pid,
not hostname.threadid-pid.
Launchpad bug 1018586.
Update: Add Eugene to Authors for stable/essex.
Change-Id: I09c01e0e63ee704b1485c196dc0b396ee03b2e5c
(cherry picked from commit 974417b75f
)
This commit is contained in:
parent
bb89acc2b0
commit
f2bc403879
1
Authors
1
Authors
|
@ -62,6 +62,7 @@ Eldar Nugaev <reldan@oscloud.ru>
|
|||
Eoghan Glynn <eglynn@redhat.com>
|
||||
Eric Day <eday@oddments.org>
|
||||
Eric Windisch <eric@cloudscaling.com>
|
||||
Eugene Kirpichov <ekirpichov@gmail.com>
|
||||
Evan Callicoat <diopter@gmail.com>
|
||||
Ewan Mellor <ewan.mellor@citrix.com>
|
||||
François Charlier <francois.charlier@enovance.com>
|
||||
|
|
|
@ -908,7 +908,7 @@ class TestLockCleanup(test.TestCase):
|
|||
|
||||
def _get_sentinel_name(self, hostname, pid, thread='MainThread'):
|
||||
return os.path.join(FLAGS.lock_path,
|
||||
'%s.%s-%d' % (hostname, thread, pid))
|
||||
'%s-%s.%d' % (hostname, thread, pid))
|
||||
|
||||
def _create_sentinel(self, hostname, pid, thread='MainThread'):
|
||||
name = self._get_sentinel_name(hostname, pid, thread)
|
||||
|
|
|
@ -986,7 +986,7 @@ def cleanup_file_locks():
|
|||
return
|
||||
|
||||
hostname = socket.gethostname()
|
||||
sentinel_re = hostname + r'\..*-(\d+$)'
|
||||
sentinel_re = hostname + r'-.*\.(\d+$)'
|
||||
lockfile_re = r'nova-.*\.lock'
|
||||
files = os.listdir(FLAGS.lock_path)
|
||||
|
||||
|
|
Loading…
Reference in New Issue