From f981042733d857d92af8b3daf059c9a5be1e8c95 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Mon, 27 Jun 2022 09:03:50 -0700 Subject: [PATCH] Fix zuul reboot playbook flock location We were using /var/run/ansible/zuul_reboot.lock to flock around this cron job. Unfortauntely it seems /var/run/ansible does not exist so the flock command fails. Move the file to /var/run/zuul_reboot.lock to work around this. Note that we want to use /var/run since it is a tmpfs which means if the server unexpectedly reboots we'll automatically clear the lock. Change-Id: Ib0f4a434cbbf2152722493e80b5cc7a945c1f235 --- playbooks/service-bridge.yaml | 2 +- playbooks/zuul_reboot.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/playbooks/service-bridge.yaml b/playbooks/service-bridge.yaml index 7f84396435..d305434260 100644 --- a/playbooks/service-bridge.yaml +++ b/playbooks/service-bridge.yaml @@ -51,7 +51,7 @@ minute: 1 hour: 0 weekday: 6 - job: "flock -n /var/run/ansible/zuul_reboot.lock /usr/local/bin/ansible-playbook -f 20 /home/zuul/src/opendev.org/opendev/system-config/playbooks/zuul_reboot.yaml > /var/log/ansible/zuul_reboot.log 2>&1" + job: "flock -n /var/run/zuul_reboot.lock /usr/local/bin/ansible-playbook -f 20 /home/zuul/src/opendev.org/opendev/system-config/playbooks/zuul_reboot.yaml > /var/log/ansible/zuul_reboot.log 2>&1" - name: Rotate Zuul restart logs include_role: diff --git a/playbooks/zuul_reboot.yaml b/playbooks/zuul_reboot.yaml index e0b7fed147..fa5b334469 100644 --- a/playbooks/zuul_reboot.yaml +++ b/playbooks/zuul_reboot.yaml @@ -1,4 +1,4 @@ -# This relies on flock -n /var/run/ansible/zuul_reboot.lock to ensure +# This relies on flock -n /var/run/zuul_reboot.lock to ensure # we don't run multiple copies of this playbook concurrently. # TODO: stop pulling in the hourly job if we do this