Ifenslave pre-up doesn't wait for slaves when usr is a seperate partition

Bug #1065077 reported by Jolrael on 2012-10-10
22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ifenslave-2.6 (Ubuntu)
High
Stéphane Graber
Precise
Medium
Unassigned
Quantal
Medium
Unassigned

Bug Description

SRU Justification:

[Impact]

 * There is an error in the pre-up script in ifenslave that will cause problems if /usr is in a separate partition. This is because the script uses /usr/bin/seq, and the /usr filesystem may not be available yet.
 * This means that configured bonds may not come up properly during boot.

[Test Case]

 * Put /usr on a separate partition, configure bonded interfaces, and boot. Check for errors in /var/log/upstart/network-interface-bond*.log
 * Alternately one could just move /usr/bin/seq and see if
  sudo service network-interface stop INTERFACE=bond0
  sudo service network-interface start INTERFACE=bond0
 works properly with no errors in the upstart logs.

[Regression Potential]

 * This has already been fixed in raring and beyond but not in P/Q.

--

Description: Ubuntu 12.04.1 LTS
Release: 12.04
Ifenslave-2.6 version: 1.1.0-19ubuntu5

First of all; I am not 100% sure this bug is in ifenslave-2.6, but ifenslave-2.6 is definately affected by the bug in general.

I have installed a system using PXE and preseed, which automatically partitions seperate /, /usr, /var, /tmp and swap partitions. After installing ifenslave and configuring it using the configuration example in /usr/share/doc/ifenslave-2.6/examples/two_hotplug_ethernet, I reboot the server to test if it comes up after booting.

The result is a bond0 that came up, but eth0 and eth1 haven't joined in as slaves.

In /var/log/upstart/network-interface-bond0.log, I noticed the following:

Waiting for a slave to join bond0 (will timeout after 60s)
/etc/network/if-pre-up.d/ifenslave: 240: /etc/network/if-pre-up.d/ifenslave: seq: not found
No slave joined bond0, continuing anyway
Failed to bring up bond0.

It seems that seq is not available at the time /etc/network/if-pre-up.d/ifenslave is ran. To verify, I added a 'df -h' at the top of the script, and rebooted, noticing indeed only my root filesystem is mounted when the script runs:

Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rootvg-root 3.8G 631M 3.0G 18% /
udev 5.9G 260K 5.9G 1% /dev
tmpfs 2.4G 240K 2.4G 1% /run
none 5.0M 0 5.0M 0% /run/lock
Waiting for a slave to join bond0 (will timeout after 60s)
/etc/network/if-pre-up.d/ifenslave: 240: /etc/network/if-pre-up.d/ifenslave: seq: not found
No slave joined bond0, continuing anyway
Failed to bring up bond0.

Naturally, after booting is done, all filesystems are available. When running ifdown -a; ifup -a when this was the case, the bond actually does come up.

Eventually, I made a quick-fix for myself by copying /usr/bin/seq to /bin/seq, which solves the issue.

Now, I'm quite new to Ubuntu (we are figuring out if we can and want to migrate our servers from Debian to Ubuntu), and especially upstart, but from what I can see, the networking upstart script only starts on 'local-filesystems', which I assume is emited only when all filesystems are actually mounted (but here is where my knowledge pretty much ends).

If further information is needed, just let me know!

Launchpad Janitor (janitor) wrote :

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

Changed in ifenslave-2.6 (Ubuntu):
status: New → Confirmed
Changed in ifenslave-2.6 (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → High
assignee: nobody → Stéphane Graber (stgraber)
Changed in ifenslave-2.6 (Ubuntu):
status: Triaged → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ifenslave-2.6 - 1.1.0-20ubuntu3

---------------
ifenslave-2.6 (1.1.0-20ubuntu3) raring; urgency=low

  * Update documentation to match the way ifenslave-2.6 works in Ubuntu.
    (LP: #1087876, LP: #1073820)
  * Don't use seq in pre-up as it's in /usr, instead replace by a while
    loop. (LP: #1065077)
 -- Stephane Graber <email address hidden> Tue, 11 Dec 2012 11:38:07 -0500

Changed in ifenslave-2.6 (Ubuntu):
status: Fix Committed → Fix Released
Chris J Arges (arges) on 2013-11-08
Changed in ifenslave-2.6 (Ubuntu Precise):
assignee: nobody → Chris J Arges (arges)
Changed in ifenslave-2.6 (Ubuntu Quantal):
assignee: nobody → Chris J Arges (arges)
Changed in ifenslave-2.6 (Ubuntu Precise):
importance: Undecided → Medium
Changed in ifenslave-2.6 (Ubuntu Quantal):
importance: Undecided → Medium
Changed in ifenslave-2.6 (Ubuntu Precise):
status: New → In Progress
Changed in ifenslave-2.6 (Ubuntu Quantal):
status: New → In Progress
Chris J Arges (arges) on 2013-11-13
description: updated
Chris J Arges (arges) on 2014-05-15
Changed in ifenslave-2.6 (Ubuntu Precise):
assignee: Chris J Arges (arges) → nobody
Changed in ifenslave-2.6 (Ubuntu Quantal):
assignee: Chris J Arges (arges) → nobody
Rolf Leggewie (r0lf) wrote :

quantal has seen the end of its life and is no longer receiving any updates. Marking the quantal task for this ticket as "Won't Fix".

Changed in ifenslave-2.6 (Ubuntu Quantal):
status: In Progress → Won't Fix
Ivan Suzdal (isuzdal) on 2016-02-15
Changed in ifenslave-2.6 (Ubuntu Precise):
status: In Progress → Confirmed
status: Confirmed → In Progress
Changed in ifenslave-2.6 (Ubuntu Precise):
status: In Progress → Triaged
Changed in ifenslave-2.6 (Ubuntu Precise):
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers