afs-release: better info when can not get lockfile
For some reason this is failing in the gate -- the some reason bit is hard to determine at the moment. Log the exception. Change-Id: I13c60c5dfc4ab19d8dec589c96338adc7461c992
This commit is contained in:
parent
66e510f0ee
commit
14b85ea1b8
@ -125,8 +125,8 @@ def get_lock(path):
|
|||||||
with open(path, 'w') as f:
|
with open(path, 'w') as f:
|
||||||
try:
|
try:
|
||||||
fcntl.flock(f, fcntl.LOCK_EX | fcntl.LOCK_NB)
|
fcntl.flock(f, fcntl.LOCK_EX | fcntl.LOCK_NB)
|
||||||
except IOError:
|
except IOError as e:
|
||||||
print("Unable to get lockfile!")
|
print("Unable to get lockfile: %s" % e)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
f.write("%s\n" % os.getpid())
|
f.write("%s\n" % os.getpid())
|
||||||
f.flush()
|
f.flush()
|
||||||
|
@ -486,6 +486,7 @@
|
|||||||
- roles/
|
- roles/
|
||||||
- playbooks/roles/mirror-update/
|
- playbooks/roles/mirror-update/
|
||||||
- playbooks/roles/reprepro/
|
- playbooks/roles/reprepro/
|
||||||
|
- playbooks/roles/afs-release/
|
||||||
- playbooks/service-mirror-update.yaml
|
- playbooks/service-mirror-update.yaml
|
||||||
- playbooks/zuul/templates/host_vars/mirror-update99.opendev.org.yaml.j2
|
- playbooks/zuul/templates/host_vars/mirror-update99.opendev.org.yaml.j2
|
||||||
- testinfra/test_mirror-update.py
|
- testinfra/test_mirror-update.py
|
||||||
|
Loading…
Reference in New Issue
Block a user