I'm not sure where you and the other guy got a more up-to-date version of lockfile. python-lockfile has remained at 0.8 in Ubuntu since the package was introduced in Lucid. That said, AFACIS I'm not sure any of this is lockfile related as nova.utils.GreenLockFile overrides lockfile's naming scheme for sentinel files, anyway, and the sentinel regexp is dependent on that, not lockfile.
Did a quick test locally, and found that system named 'warhead.home.base' leaves a sentinel file as 'warhead.home.base-2ae619-2a025a0.24791', for which your newer regexp works, and the original does not:
Hey Eugene-
I'm not sure where you and the other guy got a more up-to-date version of lockfile. python-lockfile has remained at 0.8 in Ubuntu since the package was introduced in Lucid. That said, AFACIS I'm not sure any of this is lockfile related as nova.utils. GreenLockFile overrides lockfile's naming scheme for sentinel files, anyway, and the sentinel regexp is dependent on that, not lockfile.
Did a quick test locally, and found that system named 'warhead.home.base' leaves a sentinel file as 'warhead. home.base- 2ae619- 2a025a0. 24791', for which your newer regexp works, and the original does not:
#!/usr/bin/python
import re
hostname = 'warhead.home.base' home.base- 2ae619- 2a025a0. 24791" orig_sentinel_ re, file) new_sentinel_ re, file)
file="warhead.
orig_sentinel_re = hostname + r'\..*-(\d+$)'
new_sentinel_re = hostname + r'-.*\.(\d+$)'
print re.match(
print re.match(
output:
None
<_sre.SRE_Match object at 0x7f69e74ad558>