Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 379575 - sys-apps/openrc-0.8.3-r1: Cannot find device "bond0" upon stopping the interface
Summary: sys-apps/openrc-0.8.3-r1: Cannot find device "bond0" upon stopping the interface
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: OpenRC Team
URL: http://forums.gentoo.org/viewtopic-p-...
Whiteboard: openrc:oldnet
Keywords: InVCS
Depends on:
Blocks: 382299
  Show dependency tree
 
Reported: 2011-08-17 13:52 UTC by Yun Zheng Hu
Modified: 2013-04-25 23:08 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch for iproute2.sh that checks if the interface exists before perfoming the iproute2_post_stop() steps (iproute2.patch,320 bytes, patch)
2011-08-17 13:53 UTC, Yun Zheng Hu
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yun Zheng Hu 2011-08-17 13:52:02 UTC
When you have defined a bond interface and you stop it it will try the following command in iproute2.sh

ip route flush table cache dev "${IFACE}

This command is run by the iproute2_post_stop() function, before we went OpenRC the function first checked if the interface existed.


Reproducible: Always

Steps to Reproduce:
1. create a bond interface
2. stop the interface via /etc/init.d
3. it will print "Cannot find device XXX"

Actual Results:  
"Cannot find device bond0" is printed when stopping the bond interface.

Expected Results:  
It should not show the error (it should not run the command that causes the error, because the interface does not exist anymore)
Comment 1 Yun Zheng Hu 2011-08-17 13:53:46 UTC
Created attachment 283667 [details, diff]
Patch for iproute2.sh that checks if the interface exists before perfoming the iproute2_post_stop() steps

not sure if we also need to check if interface exists in iproute2_post_start().
Comment 2 Christian Ruppert (idl0r) gentoo-dev 2011-09-18 16:35:09 UTC
I can't reproduce your issue, can you please post more details?

Do you stop the interface by hand or does anything else stop it?
Can you show me the related part of your conf.d/net please as well?
Comment 3 Christian Ruppert (idl0r) gentoo-dev 2011-09-18 22:08:22 UTC
Ok, I am able to reproduce it now with e.g.:
# /etc/conf.d/modules
modules="bonding"
module_bonding_args="mode=6"

# /etc/conf.d/net
config_eth0="null"
config_eth1="null"
slaves_bond0="eth0 eth1"
config_bond0="192.168.1.200/24"
routes_bond0="default via 192.168.1.160"
rc_need_bond0="net.eth0 net.eth1"

So slaves are required to be able to reproduce it.

This has been added by commit bf49e59.
http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commitdiff;h=bf49e59

You can apply the patch by doing:
# wget 'http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=patch;h=bf49e59' -O /tmp/bonding.patch
# cd /lib/rc/net/
# patch -p2 < /tmp/bonding.patch

Thanks!