Page MenuHomeVyOS Platform

Deleting a parent interface does not delete its underlying VLAN interfaces
Closed, ResolvedPublicBUG

Description

Vlans does not delete if we delete the parent interface
Initial configuration:

set interfaces ethernet eth1 vif 21 description 'Vif-21'
set interfaces ethernet eth1 vif 22 description 'Vif-22'
commit

Delete interface eth1, but vlan interfaces does not delete

vyos@r14# delete interfaces ethernet eth1
[edit]
vyos@r14# commit
[edit]
vyos@r14# run show int
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface        IP Address                        S/L  Description
---------        ----------                        ---  -----------
eth0             192.168.122.14/24                 u/u  WAN
eth1             -                                 A/D  
eth1.21          -                                 A/D  Vif-21
eth1.22          -                                 A/D  Vif-22

Add a description to interface eth1, and we get VLANs again that is not expected behavior

vyos@r14# set interfaces ethernet eth1 description LAN
[edit]
vyos@r14# commit
[edit]
vyos@r14# run show int
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface        IP Address                        S/L  Description
---------        ----------                        ---  -----------
eth0             192.168.122.14/24                 u/u  WAN
eth1             -                                 u/u  LAN
eth1.21          -                                 u/u  Vif-21
eth1.22          -                                 u/u  Vif-22


vyos@r14# sudo ip link show type vlan
5: eth1.21@eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 52:54:00:c7:31:bc brd ff:ff:ff:ff:ff:ff
    alias Vif-21
6: eth1.22@eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 52:54:00:c7:31:bc brd ff:ff:ff:ff:ff:ff
    alias Vif-22
[edit]
vyos@r14#

If I delete the parent interface, I'm also expecting the subinterfaces also must deleted

Details

Difficulty level
Normal (likely a few hours)
Version
VyOS 1.4-rolling-202208220217
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

dmbaturin added a project: VyOS 1.5 Circinus.
dmbaturin added a subscriber: dmbaturin.

Still reproducible in the latest rolling release.

dmbaturin renamed this task from Vlans does not delete if we delete the parent interface to Deleting a parent interface does not delete its underlying VLAN interfaces.Jan 10 2024, 10:41 PM
c-po moved this task from Need Triage to Finished on the VyOS 1.5 Circinus board.
c-po moved this task from Need Triage to Finished on the VyOS 1.4 Sagitta board.