summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-06-04 14:35:19 +0200
committerGitHub <noreply@github.com>2020-06-04 14:35:19 +0200
commitb2d98015b152528ee5ef81ddafa5d03ab059f883 (patch)
tree54a36d0c495d8756a3d3b0be6748d1b2d4d834e2 /src
parent9b08d0b881d205c2c137ff2094759c775dfdb399 (diff)
parentf60a1e3d5802f8abdd720947c6e39d1dfc9478cd (diff)
downloadvyos-1x-b2d98015b152528ee5ef81ddafa5d03ab059f883.tar.gz
vyos-1x-b2d98015b152528ee5ef81ddafa5d03ab059f883.zip
Merge pull request #442 from L6NqLW/T2527
bonding: T2527: delete the last interface from bond
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/interfaces-bonding.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/conf_mode/interfaces-bonding.py b/src/conf_mode/interfaces-bonding.py
index c2081b8c3..a16c4e105 100755
--- a/src/conf_mode/interfaces-bonding.py
+++ b/src/conf_mode/interfaces-bonding.py
@@ -128,16 +128,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'):