Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sub-interface created using short parent interface name failed to bind to VRF #10802

Closed
Hedgehog-Guru opened this issue May 10, 2022 · 4 comments
Assignees
Labels
BRCM Triaged this issue has been triaged

Comments

@Hedgehog-Guru
Copy link

Hedgehog-Guru commented May 10, 2022

Description

Sub-interface created using short parent interface name failed to bind to VRF. Long name form works OK.

Steps to reproduce the issue:

  1. Create any VRF
  2. Create any subinterface using short form
  3. Try to bind subinterface to VRF
  4. Check subinterface status

Describe the results you received:

Sub-interface disappear from "show subinterfaces status" output. Linux interface is missed

Describe the results you expected:

Normal bind like any other interface

Output of show version:

root@qa-eth-vt03-4-3700v:/home/admin# show ver

SONiC Software Version: SONiC.202111_rc_11_20220503.1-dcd5b93ce_Internal
Distribution: Debian 11.3
Kernel: 5.10.0-8-2-amd64
Build commit: dcd5b93ce
Build date: Wed May  4 16:14:17 UTC 2022
Built by: sw-r2d2-bot@r-build-sonic02-006

Platform: x86_64-mlnx_msn3700-r0
HwSKU: ACS-MSN3700
ASIC: mellanox
ASIC Count: 1
Serial Number: MT1932X22252
Model Number: MSN3700-VS2F
Hardware Revision: A1
Uptime: 18:29:35 up 15 min,  1 user,  load average: 0.29, 0.26, 0.20

Output of show techsupport:

attached

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

root@qa-eth-vt03-4-3700v:/home/admin# config subinterface add Ethernet48.10 10
root@qa-eth-vt03-4-3700v:/home/admin# config subinterface add Eth48.11 11
root@qa-eth-vt03-4-3700v:/home/admin# config vrf add Vrf_RED
root@qa-eth-vt03-4-3700v:/home/admin# show subinterfaces status
  Sub port interface    Speed    MTU    Vlan    Admin                  Type
--------------------  -------  -----  ------  -------  --------------------
            Eth48.11     200G   9100      11     down  802.1q-encapsulation
       Ethernet48.10     200G   9100      10     down  802.1q-encapsulation
root@qa-eth-vt03-4-3700v:/home/admin# ip link show Ethernet48.10
71: Ethernet48.10@Ethernet48: <BROADCAST,MULTICAST,M-DOWN> mtu 9100 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether b8:59:9f:a8:e2:00 brd ff:ff:ff:ff:ff:ff
root@qa-eth-vt03-4-3700v:/home/admin# ip link show Eth48.11
72: Eth48.11@Ethernet48: <BROADCAST,MULTICAST,M-DOWN> mtu 9100 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether b8:59:9f:a8:e2:00 brd ff:ff:ff:ff:ff:ff
root@qa-eth-vt03-4-3700v:/home/admin# config interface vrf bind Ethernet48.10 Vrf_RED
root@qa-eth-vt03-4-3700v:/home/admin# show subinterfaces status
  Sub port interface    Speed    MTU    Vlan    Admin                  Type
--------------------  -------  -----  ------  -------  --------------------
            Eth48.11     200G   9100      11     down  802.1q-encapsulation
       Ethernet48.10     200G   9100      10     down  802.1q-encapsulation
root@qa-eth-vt03-4-3700v:/home/admin# show vrf
VRF      Interfaces
-------  ------------
Vrf_RED
root@qa-eth-vt03-4-3700v:/home/admin# config interface vrf bind Eth48.11 Vrf_RED
root@qa-eth-vt03-4-3700v:/home/admin# show subinterfaces status
  Sub port interface    Speed    MTU    Vlan    Admin                  Type
--------------------  -------  -----  ------  -------  --------------------
       Ethernet48.10     200G   9100      10     down  802.1q-encapsulation
root@qa-eth-vt03-4-3700v:/home/admin# show vrf
VRF      Interfaces
-------  ------------
Vrf_RED
root@qa-eth-vt03-4-3700v:/home/admin# ip link show Ethernet48.10
74: Ethernet48.10@Ethernet48: <BROADCAST,MULTICAST,M-DOWN> mtu 9100 qdisc noop master Vrf_RED state DOWN mode DEFAULT group default qlen 1000
    link/ether b8:59:9f:a8:e2:00 brd ff:ff:ff:ff:ff:ff
root@qa-eth-vt03-4-3700v:/home/admin# ip link show Eth48.11
Device "Eth48.11" does not exist.
root@qa-eth-vt03-4-3700v:/home/admin# 

sonic_dump_qa-eth-vt03-4-3700v_20220510_183041.tar.gz

@dgsudharsan
Copy link
Collaborator

@preetham-singh @adyeung @prsunny FYI

@preetham-singh
Copy link
Contributor

From captured dump, short name subinterface Eth48.11 fields are being overwritten with vrf binding information after vrf bind operation. Due to this vlan encap information is getting deleted after vrf binding.
In contrast, long name subinterfaces vlan encap is derived from subinterface index in intfmgrd, hence the issue not observed for long name subinterfaces.
I will fix this by updating vrf binding click CLI.

From the config dump captured:
"VLAN_SUB_INTERFACE|Eth48.11": {
"expireat": 1652196677.6583672,
"ttl": -0.001,
"type": "hash",
"value": {
"vrf_name": "Vrf_RED" <<< Vlan field,value are overwritten with vrf information causing subinterface deletion. Fix is add vrf information instead of overwriting.
}
},

@zhangyanzhao zhangyanzhao added BRCM Triaged this issue has been triaged labels May 11, 2022
preetham-singh added a commit to preetham-singh/sonic-utilities that referenced this issue Jun 11, 2022
1. Short Format Subinterface getting deleted after vrf binding . Issue
10802:sonic-net/sonic-buildimage#10802
2. Do not allow short format subinterface to be created without encap
vlan configuration. Issue 10878:
sonic-net/sonic-buildimage#10878
preetham-singh added a commit to preetham-singh/sonic-utilities that referenced this issue Jun 13, 2022
1. Short Format Subinterface getting deleted after vrf binding . Issue
10802:sonic-net/sonic-buildimage#10802
2. Do not allow short format subinterface to be created without encap
vlan configuration. Issue 10878:
sonic-net/sonic-buildimage#10878
@adyeung
Copy link
Collaborator

adyeung commented Jun 14, 2022

Fix available in sonic-net/sonic-utilities#2211

preetham-singh added a commit to preetham-singh/sonic-utilities that referenced this issue Jul 26, 2022
1. Short Format Subinterface getting deleted after vrf binding . Issue
10802:sonic-net/sonic-buildimage#10802
2. Do not allow short format subinterface to be created without encap
vlan configuration. Issue 10878:
sonic-net/sonic-buildimage#10878
preetham-singh added a commit to preetham-singh/sonic-utilities that referenced this issue Jul 26, 2022
1. Short Format Subinterface getting deleted after vrf binding . Issue
10802:sonic-net/sonic-buildimage#10802
2. Do not allow short format subinterface to be created without encap
vlan configuration. Issue 10878:
sonic-net/sonic-buildimage#10878
@adyeung
Copy link
Collaborator

adyeung commented Sep 8, 2022

Close ticket, fix has merged

@adyeung adyeung closed this as completed Sep 8, 2022
preetham-singh added a commit to preetham-singh/sonic-utilities that referenced this issue Nov 21, 2022
1. Short Format Subinterface getting deleted after vrf binding . Issue
10802:sonic-net/sonic-buildimage#10802
2. Do not allow short format subinterface to be created without encap
vlan configuration. Issue 10878:
sonic-net/sonic-buildimage#10878
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BRCM Triaged this issue has been triaged
Projects
None yet
Development

No branches or pull requests

5 participants