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