From 53157b193d7f69dc29322f88193623e3e0191f94 Mon Sep 17 00:00:00 2001 From: Vuong Hoang Date: Sat, 30 May 2026 14:55:31 -0700 Subject: [PATCH] playbooks: fix drop-in filename collision in esh NFS boot-ordering override.conf already existed on esh-docker-vm (dockerd ExecStart), so the creates: guard skipped the step and the After=remote-fs.target directive was never written. Use a distinct filename (10-after-remote-fs.conf) that systemd merges alongside override.conf, and guard on content rather than file existence so a stale file can't silently skip. --- playbooks/fix-esh-nfs-boot-ordering.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/playbooks/fix-esh-nfs-boot-ordering.yaml b/playbooks/fix-esh-nfs-boot-ordering.yaml index e5b8530..077bc53 100644 --- a/playbooks/fix-esh-nfs-boot-ordering.yaml +++ b/playbooks/fix-esh-nfs-boot-ordering.yaml @@ -38,12 +38,17 @@ steps: when: "grep -qE '^10\\.0\\.50\\.50:.* nfs defaults ' /etc/fstab" - name: Install docker.service drop-in to order after remote-fs.target + # Use a DISTINCT filename — esh-docker-vm already ships an + # override.conf (dockerd ExecStart/containerd socket); systemd merges + # all *.conf drop-ins, so a separate file augments rather than + # clobbers it. Guard on CONTENT, not file existence, so a stale/empty + # file can't make this silently skip. shell: | install -d -m 0755 /etc/systemd/system/docker.service.d printf '[Unit]\nAfter=remote-fs.target\nWants=remote-fs.target\n' \ - > /etc/systemd/system/docker.service.d/override.conf + > /etc/systemd/system/docker.service.d/10-after-remote-fs.conf sudo: true - creates: /etc/systemd/system/docker.service.d/override.conf + when: "! grep -qs remote-fs.target /etc/systemd/system/docker.service.d/10-after-remote-fs.conf" - name: Reload systemd so the drop-in takes effect next boot shell: systemctl daemon-reload