[Bug 1442828] Re: ifup-wait-all-auto does not wait for interfaces to be fully up

Martin Pitt martin.pitt at ubuntu.com
Sun Apr 12 11:28:59 UTC 2015


In the future we need to clean up the ifupdown integration, and use
something like https://people.debian.org/~biebl/ifupdown-wait-
online.tar.gz to wait properly without this active shell waiting loop.
(This is similar to /etc/network/if-up.d/upstart).

For vivid, an unintrusive fix is to extend the waiting loop to wait
until all /run/network/ifup-*.pid files are gone, i. e. to wait until
ifup is done, not just wait until all of them have started.

** Changed in: ifupdown (Ubuntu)
       Status: New => In Progress

** Also affects: ifupdown (Ubuntu Vivid)
   Importance: High
     Assignee: Martin Pitt (pitti)
       Status: In Progress

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ifupdown in Ubuntu.
https://bugs.launchpad.net/bugs/1442828

Title:
  ifup-wait-all-auto does not wait for interfaces to be fully up

Status in ifupdown package in Ubuntu:
  In Progress
Status in ifupdown source package in Vivid:
  In Progress

Bug description:
  
  The change to ifup at .service done as part of LP 1425376 appears to break the ordering of units marked as "After=network-online.target".  In my specific case, a new service script with "After=network-online.target" is erroneously run concurrently with dhclient.  As the new script depends on networking configuration being complete, it fails as the IP addresses and routes from DHCP are not configured.  This functioned correctly on vivid daily images from a few days ago, and appears to break starting with the vivid daily from approximately 0409.

  Infinity suggested this change as a likely suspect:

  diff -Nru systemd-219/debian/extra/units/ifup at .service systemd-219/debian/extra/units/ifup at .service
  --- systemd-219/debian/extra/units/ifup at .service	2015-04-02 08:08:56.000000000 +0000
  +++ systemd-219/debian/extra/units/ifup at .service	2015-04-07 14:38:38.000000000 +0000
  @@ -6,10 +6,8 @@
   DefaultDependencies=no
   
   [Service]
  -Type=oneshot
  -ExecStart=/sbin/ifup --allow=hotplug %I
  -ExecStartPost=/sbin/ifup --allow=auto %I
   # only fail if ifupdown knows about the iface AND it's not up
  -ExecStartPost=/bin/sh -c 'if ifquery %I >/dev/null; then ifquery --state %I >/dev/null; fi'
  +ExecStart=/bin/sh -ec 'ifup --allow=hotplug %I; ifup --allow=auto %I; \
  +    if ifquery %I >/dev/null; then ifquery --state %I >/dev/null; fi'
   ExecStop=/sbin/ifdown %I
   RemainAfterExit=true

  and, indeed, reverting this (copying ifup at .service from a few-days old
  vivid image to a current image) resolves the problem.

  The affected version is  ubuntu-vivid-daily-amd64-server-20150409.2
  (installed via AWS).

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/1442828/+subscriptions



More information about the foundations-bugs mailing list