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)
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().
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?
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!