Start zuul-executor after afsd and /afs is mounted

Add an override to the systemd configuration for the docker service
unit so that it won't start until after openafs-client is started
and /afs is mounted (the latter because we don't know if the
initscript will possibly return early). Without this, it's a race to
see whether the container will have a working /afs mount, so can
lead to jobs failing to write into AFS with cryptic permissions
errors.

Change-Id: Ie00b1c1bc9c330e2af28c59b3b07a7c244c912dc
This commit is contained in:
Jeremy Stanley 2020-07-27 18:47:52 +00:00
parent 5fa69476c4
commit 8da9b9086f
2 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,2 @@
[Unit]
After=afs.mount openafs-client.service

View File

@ -58,6 +58,16 @@
vars:
logrotate_file_name: /var/log/zuul/executor-debug.log
- name: Make docker systemd override directory
file:
state: directory
path: /etc/systemd/system/docker.service.d
- name: Install docker systemd override for openafs ordering
copy:
src: after-afs.conf
dest: /etc/systemd/system/docker.service.d/after-afs.conf
- name: Make docker-compose directory
file:
state: directory