alias network interfaces sometimes dont start on boot

Bug #678425 reported by gollum53
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
ifupdown
New
Undecided
Unassigned
ifupdown (Debian)
Fix Released
Unknown
ifupdown (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: upstart

Hello,
I have 4 virtual network interfaces configured for autostart on two of my servers. All of them are bound to the same network interface eth0 and have static IP addresses. When I restart the server, sometimes some of them is down after restart and I have to start it manually with ifup. The physical network interface is always up correctly after reboot.
It does not happen after every reboot and it is not always the same virtual interface which is left down.
I cannot find any relevant information in syslog regarding this issue. This is a big problem as I have to manually check if all interfaces are running after every restart.
I dont know what other info/logfiles should I provide but please feel free to ask.
Does anyone have similar issue?
My distro is Ubuntu 10.04.1 Server 64bit.

Thanx
Roman Smid

Revision history for this message
gollum53 (smid) wrote :

One more comment - the affected hardware is HP ProLiant DL 380 G5 server.

Revision history for this message
Stephan Rügamer (sruegamer) wrote :

@gollum53:

you are using lucid or later and you should have the following exmaple as bonding config in your /etc/network/interfaces

auto bond0
iface bond0 inet static
   address 192.168.1.10
   netmask 255.255.255.0
   gateway 192.168.1.1
   bond-slaves none
   bond-mode 1 # active-passive
   bond-miimon 100

auto eth0
iface eth0 inet manual
    bond-primary bond0
    bond-slaves eth0 eth1

auto eth1
iface eth1 inet manual
   bond-primary bond0
   bond-slaves eth0 eth1

Why is that?

Upstart brings most of the time first the bond0 interface up.
But in most cases at this time, the hardware interfaces are not ready (udev didn't signal that to upstart)
So, the bonding of the hardware interfaces to the bond interface needs to be done on hardware nic level.

Can you come back and try that, pls?
It works here on several hundreds of servers of HP without any problem.

REgards,

\sh

Revision history for this message
gollum53 (smid) wrote :

@Stephan Adig:

Thank you for your comment.
I'm using lucid 64 bit, and I don't use bonding at all. My /etc/network/interfaces file looks similar to this:

auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
  address xxx.xxx.xxx.89
  netmask 255.255.255.224
  network xxx.xxx.xxx.xxx
  broadcast xxx.xxx.xxx.xxx
  gateway xxx.xxx.xxx.xxx
  dns-nameservers xxx.xxx.xxx.xxx
  dns-search foobar.com

#first virtual interface
auto eth0:0
iface eth0:0 inet static
    address xxx.xxx.xxx.73
    netmask 255.255.255.224
    gateway xxx.xxx.xxx.xxx

#second virtual interface
auto eth0:1
iface eth0:1 inet static
    address xxx.xxx.xxx.74
    netmask 255.255.255.224
    gateway xxx.xxx.xxx.xxx

-------end of file

Is there something bad in this configuration?

Thanx
Roman Smid

Revision history for this message
gollum53 (smid) wrote :

Another update:
This morning my ubuntu servers automatically restarted after auto updates, and I realised that on one server the primary network interface eth0 was left down. But interfaces eth0:0 and eth0:1 were up and working correctly! Thats really weird I think. I use a workaround now - I put
ifup eth0
ifup eth0:0
ifup eth0:1

in my /etc/rc.local file, thus ensuring that every interface will wake up at the end of the boot sequence. But this is just a dirty workaround....I would like to see a better solution.

Regards
Roman Smid

Revision history for this message
al1dfr (alain-delbot) wrote :

Have you find another workaround ?

Regards

Revision history for this message
gollum53 (smid) wrote :

Unfortunatelly not. This is the only workaround I have found so far. Did you encounter a similar issue?
RS

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Redirecting to ifupdown package. upstart really isn't involved here, as the script that responds to udev events, /etc/init/network-interface.conf, is part of ifupdown. The way these would normally be brought up is by /etc/init/networking.conf which will bring up any interfaces not already up after udev has done all it can.

Changed in ifupdown (Ubuntu):
status: New → Confirmed
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Also I was recently shown an alternative way to add addresses to interfaces which may become the recommended way:

iface eth0 inet manual
  up ip link set dev $IFACE up
  up ip address add dev $IFACE brd + x.x.x.x/26
  up ip address add dev $IFACE brd + 192.168.155.20/24
  up ip address add dev $IFACE brd + 192.168.155.21/24
  up ip address add dev $IFACE brd + 192.168.155.211/24
  down ip address flush dev $IFACE
  down ip link set dev $IFACE down

This leverages iproute2 and is probably the more straightforward way to do complex setups. Note that I haven't tested this, it was just an idea somebody else showed me.

affects: upstart (Ubuntu) → ifupdown (Ubuntu)
Changed in ifupdown (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
summary: - virtual network interfaces sometimes dont start on startup
+ alias network interfaces sometimes dont start on boot
Changed in ifupdown (Debian):
status: Unknown → New
Changed in ifupdown (Debian):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (4.2 KiB)

This bug was fixed in the package ifupdown - 0.7~beta2ubuntu1

---------------
ifupdown (0.7~beta2ubuntu1) precise; urgency=low

  * Resynchronise with Debian experimental. Remaining changes
    (LP: #905660, LP: #850566, LP: #611877, LP: #678425):
    - ifupdown.nw: Use 100 as default route metric unless an explicit metric
      parameter is set in /etc/network/interface.
    - Add iniparser3.0b sources (dictionary.c, dictionary.h, iniparser.c,
      iniparser.h), to let ifupdown avoid auto-up/down of interfaces if
      network-manager's ifupdown plugin is in managed=true mode.
    - Add a new query interface, 'ifquery', that can be used by upstart
      hooks to ask for the list of possible interfaces that they might need
      to bring up.
    - debian/ifupdown.network-interface.upstart: Replace the init scripts
      with a per-interface Upstart job.
    - debian/ifupdown.networking.upstart: Add a "networking" job that
      partially replaces the networking init script from netbase.
    - debian/control: Bump build-dependency on debhelper for Upstart-aware
      dh_installinit.
    - debian/rules: Due to debhelper always adding /etc/init.d symlinks, we
      must manually remove /etc/init.d/networking for as long as netbase
      still provides it.
    - Add if-up and if-down scripts to emit Upstart events when interfaces
      come up and go down.
    - debian/ifupdown.network-interface-security.upstart: Ensure apport is
      started before interfaces are brought up by either ifupdown or
      network-manager.
    - debian/postinst: If the loopback interface is missing from the config
      in /etc/network/interfaces, add it on upgrade.
    - debian/ifupdown.preinst: Since files in /etc were not conffiles in
      lucid, and /etc/network/if-up.d/upstart and
      /etc/init/network-interface.conf changed between lucid final and
      maverick, add extra handling to avoid spurious conffile prompts.
    - invoke dhclient3 with '-1', meaning it should exit failure if it does
      not receive a response in 60 seconds. (LP: #838968)
    - contrib/ifstate-check: Use /run/ntework/ifstate instead of
      /etc/network/run/ifstate
    - ifup.8: Update man page to indicate that Ubuntu uses /run
      and that it's always writable as it's a temporary filesystem
  * ifupdown.nw: When calling dhclient3, also use /var/lib/dhcp as
    dhclient3 is now a symlink to dhclient and /var/lib/dhcp3 no longer
    exists. (LP: #900234)
  * Mark ifupdown as Multi-Arch foreign
  * Replace remaining references to /var/run/network by /run/network
    (LP: #885506)

ifupdown (0.7~beta2) experimental; urgency=low

  * Put interfaces down in the reverse order than they were
    brought up (Closes: #477650).
  * Fix postinst issues with loopback interface naming
    (Closes: #572396, #545250).
  * Remove old .dpkg-old symlink (Closes: #639612).
  * Document some details on processing /etc/network/if-*.d directories.
  * Terminate ifup if it's still running when doing ifdown.
  * Finally migrate to /run/network.
  * Use FHS names for wvdial pid files (Closes: #255222).
  * Stop on run-parts failure (Closes: #547587).
  * Execute scripts before interface options on *...

Read more...

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.