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
This commit is contained in:
Julia Kreger 2017-08-04 16:07:43 +00:00 committed by Ian Wienand
parent 058debc7dd
commit 6d64a2aee6

View File

@ -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