From 1d2bec57085303420b3e12dc61a44edd62c4c490 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 10 Sep 2019 21:40:10 +0200 Subject: ethernet: T1637: handle VLAN interface exception on system startup On system bootup the above condition is true but the interface does not exists, which throws an exception, but that's legal. Simply pass the exception! With this change VyOS boots up and configures ethernet VLAN interfaces as expected. --- src/conf_mode/interface-ethernet.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/conf_mode/interface-ethernet.py b/src/conf_mode/interface-ethernet.py index a12980bfe..3091e0717 100755 --- a/src/conf_mode/interface-ethernet.py +++ b/src/conf_mode/interface-ethernet.py @@ -299,7 +299,12 @@ def apply(eth): # QoS priority mapping can only be set during interface creation # so we delete the interface first if required. if vif['egress_qos_changed'] or vif['ingress_qos_changed']: - e.del_vlan(vif['id']) + try: + # on system bootup the above condition is true but the interface + # does not exists, which throws an exception, but that's legal + e.del_vlan(vif['id']) + except: + pass vlan = e.add_vlan(vif['id'], ingress_qos=vif['ingress_qos'], egress_qos=vif['egress_qos']) apply_vlan_config(vlan, vif) -- cgit v1.2.3