Commit 3ed87a0f authored by David Johnson's avatar David Johnson

Control yet another systemd/udev race/dependency on Ubuntu 16.

The stock Ubuntu 16 networking.service only runs `udevadm settle` if
there are 'auto ...' stanzas in /etc/network/interfaces .  Well, we got
rid of that a few commits ago, and now let udev rules populate
/etc/network/interfaces (really /run/emulab-interfaces.d-auto-added/*).
So, it's either hack the networking.service unit file to force udev to
settle, and have it blown away on package update; or add a
networking-emulab.service that has to run before networking.service to
force udev to settle.  We *always* want udev to settle on any Emulab
node before bringing up interfaces, just in case the control net NIC is
slow for whatever reason.
parent b6abcfd2
......@@ -74,6 +74,7 @@ dir-install:
$(INSTALL) -m 755 -o root -g root -d $(SYSETCDIR)/systemd
$(INSTALL) -m 755 -o root -g root -d $(SYSETCDIR)/systemd/system
$(INSTALL) -m 755 -o root -g root -d $(SYSETCDIR)/systemd/system/
$(INSTALL) -m 755 -o root -g root -d $(SYSETCDIR)/systemd/system/networking.service.wants
$(INSTALL) -m 755 -o root -g root -d $(SYSETCDIR)/systemd/system/
$(INSTALL) -m 755 -o root -g root -d $(SYSETCDIR)/udev
$(INSTALL) -m 755 -o root -g root -d $(SYSETCDIR)/udev/rules.d
......@@ -127,6 +128,12 @@ systemd-install: dir-install
rm -f $(SYSETCDIR)/systemd/system/
ln -sf ../ifup-wait-emulab-cnet.service \
$(INSTALL) -m 644 $(SRCDIR)/networking-emulab.service \
ln -sf ../networking-emulab.service \
ln -sf ../networking-emulab.service \
$(INSTALL) -m 644 $(SRCDIR)/ntp.service $(SYSETCDIR)/systemd/system
ln -sf $(SYSETCDIR)/systemd/system/ntp.service \
Description=Force udev to settle before Raise network interfaces
DefaultDependencies=no apparmor.service systemd-sysctl.service systemd-modules-load.service networking.service
ExecStart=/bin/sh -c 'udevadm settle'
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment