sonic-utilities icon indicating copy to clipboard operation
sonic-utilities copied to clipboard

It is possible to delete a vlan without it warning that a vxlan is mapped to it

Open ITJamie opened this issue 3 years ago • 0 comments

Description

There is currently no check to see if a vlan is mapped to a vxlan when its being deleted via config cli

There are checks to see if is a member of an interface or has an ip assigned to it. https://github.com/sonic-net/sonic-utilities/blob/master/config/vlan.py#L39

Steps to reproduce the issue

  1. add a vlan
  2. add a vxlan map to the vlan
  3. delete vlan

Describe the results you received

vlan was deleted

Describe the results you expected

It should not be possible to delete a vlan that has a vxlan mapping configured

Additional information you deem important (e.g. issue happens only occasionally)

An additional check to see if the vlan is mentioned in VXLAN_TUNNEL_MAP table would be wise

Output of show version

(paste your output here)

ITJamie avatar Sep 19 '22 16:09 ITJamie