From 6d64a2aee6eda33753bd47ca834cf5e416425f08 Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Fri, 4 Aug 2017 16:07:43 +0000 Subject: [PATCH] Fix cylical systemd config for dhcp-all-interfaces In Ubuntu/Debian, the default dependencies cannot be relied upon as we enter into a cyclical dependency relationship which prevents the unit from starting. Added the required configuration to the systemd unit file. This issue has also been observed in glean[0], which has a nearly identical unit file for interface start-up. [0]: https://review.openstack.org/#/c/485748 Closes-Bug: #1708685 Change-Id: I23ac9510d1a21c7073bd33f76ba66fa04a8be035 --- .../dhcp-all-interfaces/install.d/dhcp-interface@.service | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/diskimage_builder/elements/dhcp-all-interfaces/install.d/dhcp-interface@.service b/diskimage_builder/elements/dhcp-all-interfaces/install.d/dhcp-interface@.service index b066aed6..3cf9f0d6 100644 --- a/diskimage_builder/elements/dhcp-all-interfaces/install.d/dhcp-interface@.service +++ b/diskimage_builder/elements/dhcp-all-interfaces/install.d/dhcp-interface@.service @@ -3,6 +3,10 @@ Description=DHCP interface %i # We want to run after network.target so it doesn't try to bring # up the interfaces a second time, but network-online should not # be reached until after we've brought up the interfaces. +# We also need to break the default dependencies which prevents +# this from operating on Ubuntu/Debian as the unit gets stuck +# into a cyclical dependency loop. +DefaultDependencies=no After=network.target Before=network-online.target Wants=network-online.target