Existing allow-hotplug devices do not come up

Bug #1307429 reported by Benjamin Drung on 2014-04-14
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ifupdown (Ubuntu)
Wishlist
Unassigned
Precise
Undecided
Unassigned
Saucy
Undecided
Unassigned
Trusty
Wishlist
Unassigned

Bug Description

SRU Justification:
[Impact]
Devices that are listed with allow-hotplug in /etc/network/interfaces do not come up when they are hotplugged. "ip addr" shows that these devices are down.

[Test Case]
Steps to reproduce:

1) Install Ubuntu 12.04, 13.10, or 14.04 in a virtual machine (e.g. with libvirt) with one network device.
2) Modify /etc/network/interfaces to

auto lo
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet dhcp
allow-hotplug eth1
iface eth1 inet dhcp
allow-hotplug eth2
iface eth2 inet dhcp

3) Boot your virtual machine.
4) Type "ip addr" to show your network devices. It should show eth0 which should be up (but isn't)
5) Add/Hotplug one NIC to your virtual machine.
6) "ip addr" should show that eth1 is up too (but isn't)

[Regression Potential]
Patch is already in Utopic.

Benjamin Drung (bdrung) wrote :

Here's a proposed patch.

tags: added: patch
Stéphane Graber (stgraber) wrote :

As far as I know, Ubuntu never supported the allow-hotplug syntax, we instead treat everything as hotplug so long as they are marked auto.

I believe we have this documented somewhere though I'm failing to find it at the moment...

Anyway, making allow-hotplug considered as equivalent to auto should be fine though it's not really urgent as I believe this just never worked (so can wait till next cycle probably).

Changed in ifupdown (Ubuntu):
status: New → Triaged
importance: Undecided → Wishlist
Benjamin Drung (bdrung) wrote :

The difference between auto and allow-hotplug is the behaviour on boot. When a device is marked as auto, it will be tried to be activated on boot and the boot will wait for the device to come up. Following interface config

-----
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet dhcp
auto eth2
iface eth2 inet dhcp
-----

will cause these plymouth output:

-----
waiting for network configuration
waiting an additional 60 seconds for network configuration
-----

So allow-hotplug is not equivalent to auto and is bug which should be fixed in a SRU. Side note: allow-hotplug works on Debian.

tags: added: precise saucy trusty
Stéphane Graber (stgraber) wrote :

I'll take care of the utopic side of this when merging ifupdown, hopefully in the next couple of days.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ifupdown - 0.7.48.1ubuntu1

---------------
ifupdown (0.7.48.1ubuntu1) utopic; urgency=medium

  [ Stéphane Graber ]
  * Merge from Debian. Remaining changes:
    - Add transition code for moving /etc/init.d/networking from netbase
      to ifupdown.
    - On upgrade from 0.7.5ubuntu4, handle the fact that our unmodified
      conffile may have a mismatch in the dpkg database and manually
      shuffle the file around on upgrade. LP: #1217263.
    - Always call dhclient with -1, Ubuntu carries a patch so that renewal
      won't time out.
    - Allow setting the MTU and HWADDR on manual interfaces. (LP: #1294807)
    - The above change also means that manual interfaces will now be
      brought up and down (ias many users expected until now).
    - Disable link.defn as it's not covering all the cases supported by
      the vlan and bridge hooks and so causes more harm than good at this
      point. (LP: #1295304)
    - Also enable network-interface-container for OpenVZ. (LP: #1294155)
    - Update networking.init to exit 1 on reload when on an upstart system.
    - Pass --force to ifdown in network-interface to silence errors on
      non-existing interfaces. (LP: #1295620)
    - Prevent the ability to stop or restart networking service
      interactively. As that is not supported. Networking job is only stopped
      during shutdown sequence. (LP: #1072518)
  * Dropped NetworkManager.conf support, the NetworkManager
    ifupdown:managed mode was never really supported and this causes quite a
    massive delta on ifupdown's side.
    If you do use that option at the moment, you will need to decide
    between managing the interface with NetworkManager (removing it from
    interfaces) or managing it with ifupdown (removing ifupdown:managed=true
    and the interface from NM).
  * Stopped removing /etc/default/networking. The file still won't be
    used as the upstart jobs don't parse it but there wasn't a good reason
    to carry this as a delta.

  [ Benjamin Drung ]
  * Fix network-interface upstart job to bring up allow-hotplug devices.
    (LP: #1307429)

ifupdown (0.7.48.1) unstable; urgency=low

  * Add --ignore-errors option.
  * Handle errors correctly during interface deconfiguration.

ifupdown (0.7.48) unstable; urgency=low

  * Ignore statuses on down, don't ignore them on up.
      When configuring an interface, it's important for all commands
      to succeed, so if anything fails, interface isn't marked as
      configured. When deconfiguring it, however, we should do our
      best we can to deconfigure it, so if something fails, that's
      not the reason to stop trying.
      Closes: #360806, #547587, #562962, #700811.
  * Disable tests for DAD.
  * Fix hurd static script with IPv6 support (Closes: #737084).
  * Support preferred lifetime setting for tunnels (Closes: #735534).
  * Provide an alternative iproute dependency to make backporting easier.
  * Default to accept_ra=2 for inet6/auto (Closes: #739993, LP: #1260241)
 -- Stephane Graber <email address hidden> Thu, 01 May 2014 19:01:35 -0400

Changed in ifupdown (Ubuntu):
status: Triaged → Fix Released
Chris J Arges (arges) on 2014-05-05
description: updated
Chris J Arges (arges) wrote :

The trusty diff has two issues:

1) The version needs to be adjusted to ubuntu4.1

2) The patch above removed the --force lines, which doesn't match what in Utopic:

post-stop script
    ifdown --force --allow auto $INTERFACE
    ifdown --force --allow hotplug $INTERFACE
end script

Please fix this and resubscribe sponsors

Benjamin Drung (bdrung) wrote :

Debdiff for Ubuntu 14.04 (trusty) attached.

Benjamin Drung (bdrung) wrote :

Debdiff for Ubuntu 13.10 (trusty) attached.

Benjamin Drung (bdrung) wrote :

Debdiff for Ubuntu 12.04 (precise) attached. "ifquery --allow hotplug --list" does not work on precise, but "ifquery --list" lists all auto interfaces. Therefore I had to modify the patch for precise.

Note that the debdiffs differ from the initial patch, because I had to integrate the fix for LP #1315756.

Benjamin Drung (bdrung) wrote :

<stgraber> [18:35:53] bdrung: hey, so with that last change you did to ifupdown we can actually start using exec ifup/ifdown again and so probably should. I rejected the upload for now, would be nice if you could re-upload with exec

Here are the updated debdiffs

Benjamin Drung (bdrung) wrote :
Benjamin Drung (bdrung) wrote :

Hello Benjamin, or anyone else affected,

Accepted ifupdown into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/ifupdown/0.7.47.2ubuntu4.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in ifupdown (Ubuntu Trusty):
status: Triaged → Fix Committed
tags: added: verification-needed
Changed in ifupdown (Ubuntu Saucy):
status: New → Fix Committed
Brian Murray (brian-murray) wrote :

Hello Benjamin, or anyone else affected,

Accepted ifupdown into saucy-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/ifupdown/0.7.44ubuntu3.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in ifupdown (Ubuntu Precise):
status: New → Fix Committed
Brian Murray (brian-murray) wrote :

Hello Benjamin, or anyone else affected,

Accepted ifupdown into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/ifupdown/0.7~beta2ubuntu11.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Benjamin Drung (bdrung) wrote :

Update verified on Ubuntu 12.04:

root@ubuntu:~# apt-cache policy ifupdown
ifupdown:
  Installed: 0.7~beta2ubuntu11.1
  Candidate: 0.7~beta2ubuntu11.1
  Version table:
 *** 0.7~beta2ubuntu11.1 0
        500 http://de.archive.ubuntu.com/ubuntu/ precise-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     0.7~beta2ubuntu11 0
        500 http://de.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
     0.7~beta2ubuntu8 0
        500 http://de.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp

allow-hotplug eth1
iface eth1 inet dhcp

allow-hotplug eth2
iface eth2 inet dhcp

allow-hotplug eth3
iface eth3 inet dhcp

allow-hotplug eth4
iface eth4 inet dhcp

allow-hotplug eth5
iface eth5 inet dhcp
# reboot
# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 64000 qdisc pfifo_fast state UP qlen 1000
    link/ether 02:01:17:ff:c5:58 brd ff:ff:ff:ff:ff:ff
    inet 78.137.97.61/32 brd 78.137.97.61 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::1:17ff:feff:c558/64 scope link
       valid_lft forever preferred_lft forever

Benjamin Drung (bdrung) wrote :

Update verified for Ubuntu 13.10:

# reboot
# apt-cache policy ifupdown
ifupdown:
  Installed: 0.7.44ubuntu3.1
  Candidate: 0.7.44ubuntu3.1
  Version table:
 *** 0.7.44ubuntu3.1 0
        500 http://de.archive.ubuntu.com/ubuntu/ saucy-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     0.7.44ubuntu3 0
        500 http://de.archive.ubuntu.com/ubuntu/ saucy/main amd64 Packages
# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp

allow-hotplug eth1
iface eth1 inet dhcp

allow-hotplug eth2
iface eth2 inet dhcp

allow-hotplug eth3
iface eth3 inet dhcp

allow-hotplug eth4
iface eth4 inet dhcp

allow-hotplug eth5
iface eth5 inet dhcp
# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 64000 qdisc pfifo_fast state UP qlen 1000
    link/ether 02:01:eb:44:b8:79 brd ff:ff:ff:ff:ff:ff
    inet 78.137.99.241/32 brd 78.137.99.241 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::1:ebff:fe44:b879/64 scope link
       valid_lft forever preferred_lft forever

Benjamin Drung (bdrung) wrote :

Also verified for Ubuntu 14.04:

root@ubuntu:~# apt-cache policy ifupdown
ifupdown:
  Installed: 0.7.47.2ubuntu4.1
  Candidate: 0.7.47.2ubuntu4.1
  Version table:
 *** 0.7.47.2ubuntu4.1 0
        500 http://de.archive.ubuntu.com/ubuntu/ trusty-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     0.7.47.2ubuntu4 0
        500 http://de.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
root@ubuntu:~# reboot
root@ubuntu:~# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp

allow-hotplug eth1
iface eth1 inet dhcp

allow-hotplug eth2
iface eth2 inet dhcp

allow-hotplug eth3
iface eth3 inet dhcp

allow-hotplug eth4
iface eth4 inet dhcp

allow-hotplug eth5
iface eth5 inet dhcp
root@ubuntu:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 64000 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 02:01:aa:45:bd:5e brd ff:ff:ff:ff:ff:ff
    inet 78.137.99.36/32 brd 78.137.99.36 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::1:aaff:fe45:bd5e/64 scope link
       valid_lft forever preferred_lft forever

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ifupdown - 0.7.47.2ubuntu4.1

---------------
ifupdown (0.7.47.2ubuntu4.1) trusty-proposed; urgency=medium

  * Fix network-interface upstart job to bring up allow-hotplug devices.
    (LP: #1307429)
 -- Benjamin Drung <email address hidden> Thu, 08 May 2014 16:41:11 +0200

Changed in ifupdown (Ubuntu Trusty):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for ifupdown has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ifupdown - 0.7~beta2ubuntu11.1

---------------
ifupdown (0.7~beta2ubuntu11.1) precise-proposed; urgency=medium

  * Fix network-interface upstart job to bring up allow-hotplug devices.
    (LP: #1307429)
 -- Benjamin Drung <email address hidden> Thu, 08 May 2014 17:00:41 +0200

Changed in ifupdown (Ubuntu Precise):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ifupdown - 0.7.44ubuntu3.1

---------------
ifupdown (0.7.44ubuntu3.1) saucy-proposed; urgency=medium

  * Fix network-interface upstart job to bring up allow-hotplug devices.
    (LP: #1307429)
 -- Benjamin Drung <email address hidden> Thu, 08 May 2014 16:52:07 +0200

Changed in ifupdown (Ubuntu Saucy):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers