From 14b85ea1b8a2434ab50e5ae01a17d39922888b42 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Fri, 16 Sep 2022 15:26:16 +1000 Subject: [PATCH] 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 --- playbooks/roles/afs-release/files/release-volumes.py | 4 ++-- zuul.d/system-config-run.yaml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/playbooks/roles/afs-release/files/release-volumes.py b/playbooks/roles/afs-release/files/release-volumes.py index ba2e6f744a..d1fa9bb7e1 100644 --- a/playbooks/roles/afs-release/files/release-volumes.py +++ b/playbooks/roles/afs-release/files/release-volumes.py @@ -125,8 +125,8 @@ def get_lock(path): with open(path, 'w') as f: try: fcntl.flock(f, fcntl.LOCK_EX | fcntl.LOCK_NB) - except IOError: - print("Unable to get lockfile!") + except IOError as e: + print("Unable to get lockfile: %s" % e) sys.exit(1) f.write("%s\n" % os.getpid()) f.flush() diff --git a/zuul.d/system-config-run.yaml b/zuul.d/system-config-run.yaml index 9ed0bc9873..a720ef0fcf 100644 --- a/zuul.d/system-config-run.yaml +++ b/zuul.d/system-config-run.yaml @@ -486,6 +486,7 @@ - roles/ - playbooks/roles/mirror-update/ - playbooks/roles/reprepro/ + - playbooks/roles/afs-release/ - playbooks/service-mirror-update.yaml - playbooks/zuul/templates/host_vars/mirror-update99.opendev.org.yaml.j2 - testinfra/test_mirror-update.py