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
This commit is contained in:
parent
aedd023738
commit
f981042733
@ -51,7 +51,7 @@
|
|||||||
minute: 1
|
minute: 1
|
||||||
hour: 0
|
hour: 0
|
||||||
weekday: 6
|
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
|
- name: Rotate Zuul restart logs
|
||||||
include_role:
|
include_role:
|
||||||
|
@ -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.
|
# we don't run multiple copies of this playbook concurrently.
|
||||||
|
|
||||||
# TODO: stop pulling in the hourly job if we do this
|
# TODO: stop pulling in the hourly job if we do this
|
||||||
|
Loading…
Reference in New Issue
Block a user