On 07/07/16 05:36 PM, Digimer wrote:> On 07/07/16 05:21 PM, Joe Smithian wrote: >> Hi All, >> >> I see an unexpected beahviour from NetworkManager on CentOS 7.1. >> Using nmcli tool, I create a bond with two slaves as explained in the Red >> Hat 7.1 Networking guide. I enable slaves and master; bond works as >> expected. >> When I restart NetworkManager, it creates a new bond with the same name but >> not connected to any device. Two bonds with the same name is confusing for >> my other monitoring scripts. >> I'm wondering why a second bond is created? Is it a bug in NetworkManger? >> >> >> #Create a bond with two slaves >> nmcli con add autoconnect no type bond con-name bond0 ifname bond0 >> nmcli con mod bond0 ipv6.method ignore ipv4.method manual ipv4.addresses >> ${BOND_IP}/${BOND_CIDR} ${BOND_GW} ${BOND_DNS} ${BOND_DNS_SEARCH} >> ipv4.never-default no ipv4.ignore-auto-dns no >> nmcli con add autoconnect no type bond-slave con-name bond-slave-eth0 >> ifname eth0 master bond0 >> nmcli con add autoconnect no type bond-slave con-name bond-slave-eth1 >> ifname eth1 master bond0 >> >> #Enable bond >> nmcli con mod bond-slave-eth0 connection.autoconnect yes >> nmcli con up bond-slave-eth0 >> >> nmcli con mod bond-slave-eth1 connection.autoconnect yes >> nmcli con up bond-slave-eth1 >> >> nmcli con mod bond0 connection.autoconnect yes >> nmcli con up bond0 >> >> systemctl restart NetworkManager >> systemctl restart iptables >> >> nmcli con | grep bond >> bond0 9942bdc6-df72-4723-b2ed-47a78e3a5c59 bond bond0 >> bond-slave-eth0 8b0fbbe1-a7f0-448c-8005-46d11599f57a 802-3-ethernet eth0 >> bond-slave-eth1 333dd1b9-15a4-4119-8e42-55ac3621a85d 802-3-ethernet eth1 >> *bond0 460dd9e8-bc0b-473e-9c89-41facda98b66 bond >> -- # Why this extra bond connections has been created?* >> >> >> I'd appreciate your comments and suggestions to fix the issue. >> >> >> Thanks, >> >> Joe > > To this day, on EL6, creating bonds always generates a spurious 'bond0' > interface with no slaved interfaces. It was reported to red hat bugzilla > ages ago but the issue was closed without resolution (sorry, I've been > looking for the rhbz# but haven't found it yet). > > digimerFound it: https://bugzilla.redhat.com/show_bug.cgi?id=1245440 ===Neil Horman 2015-07-22 14:30:57 EDT inserting the bonding module always creates the first bond interface, thats always how its been, and isn't a bug. Status: NEW ? CLOSED Resolution: --- ? NOTABUG Last Closed: 2015-07-22 14:30:57 === digimer -- Digimer Papers and Projects: https://alteeve.ca/w/ What if the cure for cancer is trapped in the mind of a person without access to education?
Joe Smithian
2016-Jul-11 14:47 UTC
[CentOS] NetworkManger creates extra bonds; is this a bug?
Hi Neil, Thanks for your comments. What's the purpose of creating spurious ?bond0?? It's confusing. Is it anywhere documented? Every time I restart NetworkManager it creates another bond0! Joe On Thu, Jul 7, 2016 at 5:44 PM, Digimer <lists at alteeve.ca> wrote:> On 07/07/16 05:36 PM, Digimer wrote: > > On 07/07/16 05:21 PM, Joe Smithian wrote: > >> Hi All, > >> > >> I see an unexpected beahviour from NetworkManager on CentOS 7.1. > >> Using nmcli tool, I create a bond with two slaves as explained in the > Red > >> Hat 7.1 Networking guide. I enable slaves and master; bond works as > >> expected. > >> When I restart NetworkManager, it creates a new bond with the same name > but > >> not connected to any device. Two bonds with the same name is confusing > for > >> my other monitoring scripts. > >> I'm wondering why a second bond is created? Is it a bug in > NetworkManger? > >> > >> > >> #Create a bond with two slaves > >> nmcli con add autoconnect no type bond con-name bond0 ifname bond0 > >> nmcli con mod bond0 ipv6.method ignore ipv4.method manual > ipv4.addresses > >> ${BOND_IP}/${BOND_CIDR} ${BOND_GW} ${BOND_DNS} ${BOND_DNS_SEARCH} > >> ipv4.never-default no ipv4.ignore-auto-dns no > >> nmcli con add autoconnect no type bond-slave con-name bond-slave-eth0 > >> ifname eth0 master bond0 > >> nmcli con add autoconnect no type bond-slave con-name bond-slave-eth1 > >> ifname eth1 master bond0 > >> > >> #Enable bond > >> nmcli con mod bond-slave-eth0 connection.autoconnect yes > >> nmcli con up bond-slave-eth0 > >> > >> nmcli con mod bond-slave-eth1 connection.autoconnect yes > >> nmcli con up bond-slave-eth1 > >> > >> nmcli con mod bond0 connection.autoconnect yes > >> nmcli con up bond0 > >> > >> systemctl restart NetworkManager > >> systemctl restart iptables > >> > >> nmcli con | grep bond > >> bond0 9942bdc6-df72-4723-b2ed-47a78e3a5c59 bond > bond0 > >> bond-slave-eth0 8b0fbbe1-a7f0-448c-8005-46d11599f57a 802-3-ethernet > eth0 > >> bond-slave-eth1 333dd1b9-15a4-4119-8e42-55ac3621a85d 802-3-ethernet > eth1 > >> *bond0 460dd9e8-bc0b-473e-9c89-41facda98b66 bond > >> -- # Why this extra bond connections has been created?* > >> > >> > >> I'd appreciate your comments and suggestions to fix the issue. > >> > >> > >> Thanks, > >> > >> Joe > > > > To this day, on EL6, creating bonds always generates a spurious 'bond0' > > interface with no slaved interfaces. It was reported to red hat bugzilla > > ages ago but the issue was closed without resolution (sorry, I've been > > looking for the rhbz# but haven't found it yet). > > > > digimer > > Found it: > > https://bugzilla.redhat.com/show_bug.cgi?id=1245440 > > ===> Neil Horman 2015-07-22 14:30:57 EDT > > inserting the bonding module always creates the first bond interface, > thats always how its been, and isn't a bug. > > Status: NEW ? CLOSED > Resolution: --- ? NOTABUG > Last Closed: 2015-07-22 14:30:57 > ===> > digimer > > -- > Digimer > Papers and Projects: https://alteeve.ca/w/ > What if the cure for cancer is trapped in the mind of a person without > access to education? > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos >
Yamaban
2016-Jul-11 16:23 UTC
[CentOS] Re: NetworkManger creates extra bonds; is this a bug?
On Mon, 11 Jul 2016 16:47, Joe Smithian wrote:> > Hi Neil, > > Thanks for your comments. What's the purpose of creating spurious ?bond0?? > It's confusing. Is it anywhere documented? > Every time I restart NetworkManager it creates another bond0! > > Joe[snip] For me the soution was to create a script that removes the "bond0" when NetworkManager is stopped, I have it integrated into the NetworkManager.service via a drop-in scriptlet into the dir "/etc/systemd/system/NetworkManager.service.d/" here is my scriptlet: /etc/systemd/system/NetworkManager.service.d/remove-bond0-at-stop [code] # remove "bond0" interface at stop, it will be re-created at start [Service] ExecStopPost=/usr/bin/bash /path/to/shellscript [/code] sadly the shell script has been lost since, with the move to a machine with 10GbE interfaces. - Yamaban.
Maybe Matching Threads
- NetworkManger creates extra bonds; is this a bug?
- NetworkManger creates extra bonds; is this a bug?
- NetworkManger creates extra bonds; is this a bug?
- Reliable way of having both LAN and WIFI on headless box
- Reliable way of having both LAN and WIFI on headless box