From 8da9b9086fbb9024e556caeb43cba9e2f4d3366d Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Mon, 27 Jul 2020 18:47:52 +0000 Subject: [PATCH] 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 --- playbooks/roles/zuul-executor/files/after-afs.conf | 2 ++ playbooks/roles/zuul-executor/tasks/main.yaml | 10 ++++++++++ 2 files changed, 12 insertions(+) create mode 100644 playbooks/roles/zuul-executor/files/after-afs.conf diff --git a/playbooks/roles/zuul-executor/files/after-afs.conf b/playbooks/roles/zuul-executor/files/after-afs.conf new file mode 100644 index 0000000000..5482490907 --- /dev/null +++ b/playbooks/roles/zuul-executor/files/after-afs.conf @@ -0,0 +1,2 @@ +[Unit] +After=afs.mount openafs-client.service diff --git a/playbooks/roles/zuul-executor/tasks/main.yaml b/playbooks/roles/zuul-executor/tasks/main.yaml index 395d5f8bd7..7a11948275 100644 --- a/playbooks/roles/zuul-executor/tasks/main.yaml +++ b/playbooks/roles/zuul-executor/tasks/main.yaml @@ -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