diff options
author | Gabriel Skupien <g.skupien@vyos.io> | 2020-05-28 21:59:06 +0200 |
---|---|---|
committer | Gabriel Skupien <g.skupien@vyos.io> | 2020-05-28 21:59:06 +0200 |
commit | f60a1e3d5802f8abdd720947c6e39d1dfc9478cd (patch) | |
tree | e39bee8964b8bb3b494b29c7673f67d4dd256f5c /src | |
parent | 7962382808975ef136d1b1c5e5105f86f07d924c (diff) | |
download | vyos-1x-f60a1e3d5802f8abdd720947c6e39d1dfc9478cd.tar.gz vyos-1x-f60a1e3d5802f8abdd720947c6e39d1dfc9478cd.zip |
bonding: T2527: delete the last interface from bond
Diffstat (limited to 'src')
-rwxr-xr-x | src/conf_mode/interfaces-bonding.py | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/conf_mode/interfaces-bonding.py b/src/conf_mode/interfaces-bonding.py index bdca9d170..0c222c485 100755 --- a/src/conf_mode/interfaces-bonding.py +++ b/src/conf_mode/interfaces-bonding.py @@ -125,16 +125,15 @@ def get_config(): bond['mode'] = get_bond_mode(act_mode) # determine bond member interfaces (currently configured) - if conf.exists('member interface'): - bond['member'] = conf.return_values('member interface') - - # We can not call conf.return_effective_values() as it would not work - # on reboots. Reboots/First boot will return that running config and - # saved config is the same, thus on a reboot the bond members will - # not be added all (https://phabricator.vyos.net/T2030) - live_members = BondIf(bond['intf']).get_slaves() - if not (bond['member'] == live_members): - bond['shutdown_required'] = True + bond['member'] = conf.return_values('member interface') + + # We can not call conf.return_effective_values() as it would not work + # on reboots. Reboots/First boot will return that running config and + # saved config is the same, thus on a reboot the bond members will + # not be added all (https://phabricator.vyos.net/T2030) + live_members = BondIf(bond['intf']).get_slaves() + if not (bond['member'] == live_members): + bond['shutdown_required'] = True # Primary device interface if conf.exists('primary'): |