Page MenuHomeVyOS Platform

Slave interfaces fall out from bonding during configuration change
Closed, ResolvedPublicBUG

Description

If we change the configuration for a slave interface, it falls out from a bonding.
How to reproduce:

set interfaces bonding bond0 member interface 'eth1'
set interfaces bonding bond0 member interface 'eth2'
commit
ip -d l
cat /proc/net/bonding/bond0

set interfaces ethernet eth2 description 'TEST'
commit
ip -d l
cat /proc/net/bonding/bond0

Output:

[edit]
vyos@vyos# set interfaces bonding bond0 member interface 'eth1'
[edit]
vyos@vyos# set interfaces bonding bond0 member interface 'eth2'
[edit]
vyos@vyos# commit
[edit]
vyos@vyos# ip -d l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 promiscuity 0 minmtu 0 maxmtu 0 addrgenmode none numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether 0c:dc:3c:17:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 minmtu 68 maxmtu 65535 addrgenmode none numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 
3: eth1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 state UP mode DEFAULT group default qlen 1000
    link/ether 0c:dc:3c:17:00:01 brd ff:ff:ff:ff:ff:ff promiscuity 0 minmtu 68 maxmtu 65535 
    bond_slave state ACTIVE mii_status UP link_failure_count 0 perm_hwaddr 0c:dc:3c:17:00:01 queue_id 0 ad_aggregator_id 1 ad_actor_oper_port_state 69 ad_actor_oper_port_state_str <active,aggregating,defaulted> ad_partner_oper_port_state 1 ad_partner_oper_port_state_str <active> addrgenmode none numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 
4: eth2: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 state UP mode DEFAULT group default qlen 1000
    link/ether 0c:dc:3c:17:00:01 brd ff:ff:ff:ff:ff:ff permaddr 0c:dc:3c:17:00:02 promiscuity 0 minmtu 68 maxmtu 65535 
    bond_slave state BACKUP mii_status UP link_failure_count 0 perm_hwaddr 0c:dc:3c:17:00:02 queue_id 0 ad_aggregator_id 2 ad_actor_oper_port_state 69 ad_actor_oper_port_state_str <active,aggregating,defaulted> ad_partner_oper_port_state 1 ad_partner_oper_port_state_str <active> addrgenmode none numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 
5: eth3: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
    link/ether 0c:dc:3c:17:00:03 brd ff:ff:ff:ff:ff:ff promiscuity 0 minmtu 68 maxmtu 65535 addrgenmode none numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 
6: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 0c:dc:3c:17:00:01 brd ff:ff:ff:ff:ff:ff promiscuity 0 minmtu 68 maxmtu 65535 
    bond mode 802.3ad miimon 100 updelay 0 downdelay 0 peer_notify_delay 0 use_carrier 1 arp_interval 0 arp_validate none arp_all_targets any primary_reselect always fail_over_mac none xmit_hash_policy layer2 resend_igmp 1 num_grat_arp 1 all_slaves_active 0 min_links 0 lp_interval 1 packets_per_slave 1 lacp_rate slow ad_select stable ad_aggregator 1 ad_num_ports 1 ad_actor_key 0 ad_partner_key 1 ad_partner_mac 00:00:00:00:00:00 tlb_dynamic_lb 1 addrgenmode none numtxqueues 16 numrxqueues 16 gso_max_size 65536 gso_max_segs 65535 
[edit]
vyos@vyos# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v5.10.110-amd64-vyos

Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Transmit Hash Policy: layer2 (0)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Peer Notification Delay (ms): 0

802.3ad info
LACP rate: slow
Min links: 0
Aggregator selection policy (ad_select): stable

Slave Interface: eth1
MII Status: up
Speed: Unknown
Duplex: Unknown
Link Failure Count: 0
Permanent HW addr: 0c:dc:3c:17:00:01
Slave queue ID: 0
Aggregator ID: 1
Actor Churn State: monitoring
Partner Churn State: monitoring
Actor Churned Count: 0
Partner Churned Count: 0

Slave Interface: eth2
MII Status: up
Speed: Unknown
Duplex: Unknown
Link Failure Count: 0
Permanent HW addr: 0c:dc:3c:17:00:02
Slave queue ID: 0
Aggregator ID: 2
Actor Churn State: monitoring
Partner Churn State: monitoring
Actor Churned Count: 0
Partner Churned Count: 0
[edit]
vyos@vyos# 
[edit]
vyos@vyos# set interfaces ethernet eth2 description 'TEST'
[edit]
vyos@vyos# commit
[edit]
vyos@vyos# ip -d l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 promiscuity 0 minmtu 0 maxmtu 0 addrgenmode none numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether 0c:dc:3c:17:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 minmtu 68 maxmtu 65535 addrgenmode none numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 
3: eth1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 state UP mode DEFAULT group default qlen 1000
    link/ether 0c:dc:3c:17:00:01 brd ff:ff:ff:ff:ff:ff promiscuity 0 minmtu 68 maxmtu 65535 
    bond_slave state ACTIVE mii_status UP link_failure_count 0 perm_hwaddr 0c:dc:3c:17:00:01 queue_id 0 ad_aggregator_id 1 ad_actor_oper_port_state 69 ad_actor_oper_port_state_str <active,aggregating,defaulted> ad_partner_oper_port_state 1 ad_partner_oper_port_state_str <active> addrgenmode none numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 
4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether 0c:dc:3c:17:00:02 brd ff:ff:ff:ff:ff:ff promiscuity 0 minmtu 68 maxmtu 65535 addrgenmode none numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 
    alias TEST
5: eth3: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
    link/ether 0c:dc:3c:17:00:03 brd ff:ff:ff:ff:ff:ff promiscuity 0 minmtu 68 maxmtu 65535 addrgenmode none numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 
6: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 0c:dc:3c:17:00:01 brd ff:ff:ff:ff:ff:ff promiscuity 0 minmtu 68 maxmtu 65535 
    bond mode 802.3ad miimon 100 updelay 0 downdelay 0 peer_notify_delay 0 use_carrier 1 arp_interval 0 arp_validate none arp_all_targets any primary_reselect always fail_over_mac none xmit_hash_policy layer2 resend_igmp 1 num_grat_arp 1 all_slaves_active 0 min_links 0 lp_interval 1 packets_per_slave 1 lacp_rate slow ad_select stable ad_aggregator 1 ad_num_ports 1 ad_actor_key 0 ad_partner_key 1 ad_partner_mac 00:00:00:00:00:00 tlb_dynamic_lb 1 addrgenmode none numtxqueues 16 numrxqueues 16 gso_max_size 65536 gso_max_segs 65535 
[edit]
vyos@vyos# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v5.10.110-amd64-vyos

Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Transmit Hash Policy: layer2 (0)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Peer Notification Delay (ms): 0

802.3ad info
LACP rate: slow
Min links: 0
Aggregator selection policy (ad_select): stable

Slave Interface: eth1
MII Status: up
Speed: Unknown
Duplex: Unknown
Link Failure Count: 0
Permanent HW addr: 0c:dc:3c:17:00:01
Slave queue ID: 0
Aggregator ID: 1
Actor Churn State: monitoring
Partner Churn State: monitoring
Actor Churned Count: 0
Partner Churned Count: 0

Details

Difficulty level
Unknown (require assessment)
Version
1.4-rolling-202204100814, 1.3.1-S1
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

For some reason is_bond_member is not in the configuration after the description
eth2 with option is_bond_member
eth3 without option is_bond_member

############## MY DEBUG START: 
{'description': 'fofof',
 'duplex': 'auto',
 'hw_id': '50:08:00:01:00:03',
 'ifname': 'eth3',
 'ip': {'arp_cache_timeout': '30'},
 'mtu': '1500',
 'speed': 'auto'}
####### MY DEBUG END #######

############## MY DEBUG START: 
{'description': 'fofof',
 'duplex': 'auto',
 'hw_id': '50:08:00:01:00:02',
 'ifname': 'eth2',
 'ip': {'arp_cache_timeout': '30'},
 'is_bond_member': {'bond0': {}},
 'mtu': '1500',
 'speed': 'auto'}
####### MY DEBUG END #######

The issue with this check
A possible original issue with the function exists as it checks the only first value

bond
  member
    - eth2
    - eth3

It returns only eth2 as a member of the bonding

c-po triaged this task as High priority.
c-po edited projects, added VyOS 1.3 Equuleus (1.3.2); removed VyOS 1.3 Equuleus.
c-po moved this task from Need Triage to Finished on the VyOS 1.3 Equuleus (1.3.2) board.