ambiguous error message "sh: echo: I/O error"

Bug #1326854 reported by Karl-Philipp Richter
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ifenslave (Ubuntu)
Fix Released
Medium
Unassigned
Trusty
Fix Released
Medium
Eric Desrochers
Vivid
Fix Released
Low
Eric Desrochers

Bug Description

[SRU justification]

[Impact]

Without this patch, trying to add a bond when this one is already defined leads to the following error :

Example :

# ifenslave bond0 eth1 eth2
sh: echo: I/O error
eth1: could not add interface

[Test Case]

For info, the ambiguous message only appears when using ifenslave on a bond that is already configured :

# ifconfig eth1 up
# ifconfig eth2 up
# ifconfig bond0 up
# ifenslave bond0 eth1 eth2 <<<< No error on the first execution
# ifenslave bond0 eth1 eth2
sh: echo: I/O error
eth1: could not add interface

[Regression Potential]

None expected as the same commit is already in use in the ifenslave package for Wily and in the upstream debian package.

[Original description of the problem]

adding an interface to a bonding interface can result in the error message "sh: echo: I/O error" which is highly ambiguous (did the I/O error occur in sh, echo or is it an I/O error realted to the command/driver? - at least change this to "I/O error occured" which is still not helpful ("I/O occured in the kernel driver, please make sure it supports XY, check with <Z>" would be nice), but at least not confusing.

reproduction:
/etc/wpa_supplicant/wpa_supplicant.conf
<code>
network={
    ssid="assid"
    key_mgmt=WPA-EAP
    eap=TTLS
    proto=WPA RSN
    <email address hidden>"
    <email address hidden>"
    ca_cert="/etc/wpa_supplicant/deutsche-telekom-root-ca-2.crt"
    phase2="auth=PAP"
}
</code>
/etc/network/interfaces
<code>
iface main inet dhcp
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

iface bond0 inet manual
    down ifenslave -d bond0 wlan0 wlan1
    bond-mode active-backup
    bond-miimon 100
    bond-slaves wlan0 wlan1

allow-bond0 wlan0
iface wlan0 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
    bond-master bond0

allow-bond0 wlan1
iface wlan1 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
    bond-master bond0

iface eth1 inet dhcp
</code>
my commands
<code>
sudo modprobe bonding
sudo ifup wlan0
sudo ifup wlan1
sudo ifconfig bond0 # no DHCP example, so I've not idea how to get this running :( just providing a way to reproduce the error message (which should in no case be shown with its current content)
sudo ifenslave bond0 wlan0 wlan1
</code>

I'm not requesting support here, just to fix the bug which should make the former unnecessary anyway :)

Revision history for this message
Marcus Furlong (furlongm) wrote :

Also seeing this message. Can it be ignored?

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

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

Changed in ifenslave-2.6 (Ubuntu):
status: New → Confirmed
Louis Bouchard (louis)
Changed in ifenslave-2.6 (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Medium
assignee: nobody → Louis Bouchard (louis-bouchard)
tags: added: sts
Louis Bouchard (louis)
Changed in ifenslave-2.6 (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Louis Bouchard (louis) wrote :

As it turns out, this highlights a bug in the ifenslave script.

Starting with kernel 3.13 (commit http://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?id=5831d66e8097aedfa3bc35941cf265ada2352317), /sys/class/net/{bond}/slave_{ifname} (notice the slave_) no longer exist.

I am checking with a colleague to confirm but from what I can tell, it has been replaced by /sys/class/net/{bond}/lower_{ifname}.

If I am exact, I will bring up the bug to the author with a fix that seems to work on my side. Once that fix makes it into Wily, I will SRU to Trusty.

Revision history for this message
Louis Bouchard (louis) wrote :

For info, the ambiguous message only appears when using ifenslave on a bond that is already configured :

# ifconfig eth1 up
# ifconfig eth2 up
# ifconfig bond0 up
# ifenslave bond0 eth1 eth2 <<<< No error on the first execution
# ifenslave bond0 eth1 eth2
sh: echo: I/O error
eth1: could not add interface

Revision history for this message
Louis Bouchard (louis) wrote :

I have just opened a bug on the debian ifenslave package : http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=791906 with a proposed patch that seems to fix the issue.

Will wait to see if the maintainer responds.

Revision history for this message
Louis Bouchard (louis) wrote :

Quick update : the fix is now in Debian ifenslave-2.7 . It needs to be merged in Wily so we can backport the fix to trusty.

Louis Bouchard (louis)
Changed in ifenslave-2.6 (Ubuntu Trusty):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Louis Bouchard (louis) wrote :

The fixed ifenslave-2.7 is now in Wily. Marking it fixed released. Next step is to SRU to Trusty

Changed in ifenslave-2.6 (Ubuntu):
status: In Progress → Fix Released
assignee: Louis Bouchard (louis-bouchard) → nobody
Eric Desrochers (slashd)
Changed in ifenslave-2.6 (Ubuntu Trusty):
assignee: nobody → eric.desrochers (eric-desrochers-z)
status: Confirmed → In Progress
description: updated
Revision history for this message
Eric Desrochers (slashd) wrote :

debdiff from the fix in Wily

Eric Desrochers (slashd)
tags: added: verification-neede
tags: added: verification-needed
removed: sts verification-neede
tags: added: sts
Eric Desrochers (slashd)
tags: removed: sts
Revision history for this message
Eric Desrochers (slashd) wrote :

Here is a new copy of my .debdiff with the adjustment suggested by the SRU Team.

Thanks !

Revision history for this message
Brian Murray (brian-murray) wrote :

I've uploaded this to the Trusty SRU queue for review by the SRU team.

Revision history for this message
Chris J Arges (arges) wrote :

Does this need to be fixed in Vivid as well?

Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Karl-Philipp, or anyone else affected,

Accepted ifenslave into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ifenslave/2.4ubuntu1.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!

Revision history for this message
Eric Desrochers (slashd) wrote :

Yes, it need to be fixed in Vivid as well.

Will start the sru process for Vivid soon.

Changed in ifenslave-2.6 (Ubuntu Vivid):
assignee: nobody → eric.desrochers (eric-desrochers-z)
Eric Desrochers (slashd)
Changed in ifenslave-2.6 (Ubuntu Vivid):
importance: Undecided → Low
Revision history for this message
Eric Desrochers (slashd) wrote :

debdiff for Vivid

Changed in ifenslave-2.6 (Ubuntu Vivid):
status: New → In Progress
Revision history for this message
Simon Déziel (sdeziel) wrote :

Verified to work on Trusty, thanks!

tags: added: verification-done
removed: verification-needed
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for ifenslave 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 regressions.

Revision history for this message
Brian Murray (brian-murray) wrote :

I've uploaded this to the queue for the SRU team to review for Vivid.

tags: added: verification-done-trusty
removed: verification-done
affects: ifenslave-2.6 (Ubuntu) → ifenslave (Ubuntu)
Changed in ifenslave (Ubuntu Trusty):
status: In Progress → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote :

The bug task as not closed by janitor because it was about the wrong package name.

Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Karl-Philipp, or anyone else affected,

Accepted ifenslave into vivid-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ifenslave/2.5ubuntu1.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 ifenslave (Ubuntu Vivid):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote : [ifenslave/vivid] verification still needed

The fix for this bug has been awaiting testing feedback in the -proposed repository for vivid for more than 90 days. Please test this fix and update the bug appropriately with the results. In the event that the fix for this bug is still not verified 15 days from now, the package will be removed from the -proposed repository.

tags: added: removal-candidate
Eric Desrochers (slashd)
tags: added: verification-done-vivid
removed: verification-needed
tags: removed: removal-candidate
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ifenslave - 2.5ubuntu1.1

---------------
ifenslave (2.5ubuntu1.1) vivid; urgency=medium

  * Fix change in /sys/class/net/{bond}/slave_ naming after kernel v3.13
    (Closes: #791906)

    Starting in kernel 3.13, slave_{ifname} is no longer present and
    has been replaced by lower_{ifname}. Take this change into account
    to avoid ambiguous error when ifenslave is run with existing bond
    defined. (LP: #1326854)

 -- Eric Desrochers <email address hidden> Wed, 12 Aug 2015 14:08:15 -0400

Changed in ifenslave (Ubuntu Vivid):
status: Fix Committed → 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.