From a95937d111f8c65def0f6d6f158431ee95a30ad4 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Sun, 29 Jul 2018 10:14:00 -0500 Subject: [PATCH] roles/dch-storage-net: Add After device dependency This commit adds an *after* ordering dependency on the network device unit to the *wait-global-address@.service* template unit. Without this dependency, the service will wait forever for a global address if the device does not exist. With the dependency, though, if the device does not appear within the default timeout, the wait service will never start, causing all dependent services to fail, but allowing the boot process to continue. --- roles/dch-storage-net/files/wait-global-address.service | 1 + roles/dch-storage-net/tasks/main.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/roles/dch-storage-net/files/wait-global-address.service b/roles/dch-storage-net/files/wait-global-address.service index 86cb769..7cc9a49 100644 --- a/roles/dch-storage-net/files/wait-global-address.service +++ b/roles/dch-storage-net/files/wait-global-address.service @@ -1,6 +1,7 @@ [Unit] Description=Wait for global address on %I Requires=sys-subsystem-net-devices-%i.device +After=sys-subsystem-net-devices-%i.device After=network-pre.target Before=network-online.target diff --git a/roles/dch-storage-net/tasks/main.yml b/roles/dch-storage-net/tasks/main.yml index 4da1957..49d56e2 100644 --- a/roles/dch-storage-net/tasks/main.yml +++ b/roles/dch-storage-net/tasks/main.yml @@ -10,6 +10,7 @@ mode=0644 notify: reload systemd +- meta: flush_handlers - name: ensure wait-global-address service starts at boot service: name=wait-global-address@{{ storage_iface }}.service