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] CLI should throw an error if short name format is called without vlan when adding a sub-interface #10878

Closed
congh-nvidia opened this issue May 19, 2022 · 4 comments
Labels
BRCM Triaged this issue has been triaged

Comments

@congh-nvidia
Copy link

Description

The CLI should throw an error if short name format is called without vlan when adding a sub-interface, because the vid is a must parameter when using short names.
Currently the CLI accepts short name without a vid which will cause errors.

Steps to reproduce the issue:

  1. Create a sub interface in short name but don't assign the vid in the cli command:
admin@r-bulldog-04:~$ sudo config subinterface Eth20.20 
  1. Try to show the status of the subinterface but see nothing:
admin@r-bulldog-04:~$ show subinterface status
  Sub port interface    Speed    MTU    Vlan    Admin    Type
--------------------  -------  -----  ------  -------  ------
admin@r-bulldog-04:~$ show subinterface status Eth20.20
  Sub port interface    Speed    MTU    Vlan    Admin    Type
--------------------  -------  -----  ------  -------  ------
  1. Delete the subinterface:
admin@r-bulldog-04:~$ sudo config subinterface del Eth20.20

Describe the results you received:

Deleting the sub-interface will casue some dockers to exit:

admin@r-bulldog-04:~$ docker ps -a
CONTAINER ID   IMAGE                                COMMAND                  CREATED          STATUS                      PORTS     NAMES
a118c95ef54e   71e107d8aea8                         "/usr/local/bin/supe…"   42 minutes ago   Exited (0) 11 seconds ago             what-just-happened
dfbe9539366f   docker-sonic-telemetry:latest        "/usr/local/bin/supe…"   42 minutes ago   Up 18 minutes                         telemetry
121e66c0b9b3   docker-sonic-mgmt-framework:latest   "/usr/local/bin/supe…"   42 minutes ago   Up 18 minutes                         mgmt-framework
80c1ca509b44   docker-snmp:latest                   "/usr/local/bin/supe…"   42 minutes ago   Up 18 minutes                         snmp
a6c6847c8905   8e77bb641c0e                         "/usr/bin/docker_ini…"   44 minutes ago   Exited (0) 15 seconds ago             dhcp_relay
68c777814c1a   docker-lldp:latest                   "/usr/bin/docker-lld…"   47 minutes ago   Up 21 minutes                         lldp
619c9449a8d1   docker-router-advertiser:latest      "/usr/bin/docker-ini…"   47 minutes ago   Exited (0) 18 seconds ago             radv
aea0a1392f53   docker-platform-monitor:latest       "/usr/bin/docker_ini…"   47 minutes ago   Up 21 minutes                         pmon
8f1369743721   docker-syncd-mlnx:latest             "/usr/local/bin/supe…"   47 minutes ago   Up 21 minutes                         syncd
3cb4799c61fb   docker-teamd:latest                  "/usr/local/bin/supe…"   47 minutes ago   Exited (0) 21 seconds ago             teamd
c9f88ddc8846   docker-orchagent:latest              "/usr/bin/docker-ini…"   47 minutes ago   Exited (0) 30 seconds ago             swss
105baf8dd64d   docker-fpm-frr:latest                "/usr/bin/docker_ini…"   47 minutes ago   Up 21 minutes                         bgp
2d008c872aa5   docker-database:latest               "/usr/local/bin/dock…"   48 minutes ago   Up 21 minutes                         database

errors in syslog:

admin@r-bulldog-04:~$ sudo tail -F /var/log/syslog | egrep "ERR|WARN"
May 12 03:53:46.981992 r-bulldog-04 ERR swss#intfmgrd: :- setIntfVrf: Command '/sbin/ip link set "Eth20.20" nomaster' failed with rc 1
May 12 03:53:47.062357 r-bulldog-04 ERR swss#intfmgrd: :- main: Runtime error: /sbin/ip link del "Eth20.20" : 
May 12 03:53:48.941659 r-bulldog-04 INFO swss#supervisord 2022-05-12 03:53:48,940 WARN received SIGTERM indicating exit request
May 12 03:53:59.110455 r-bulldog-04 INFO teamd#supervisord 2022-05-12 03:53:59,109 WARN received SIGTERM indicating exit request
May 12 03:54:06.054105 r-bulldog-04 INFO radv#supervisord 2022-05-12 03:54:06,052 WARN received SIGTERM indicating exit request
May 12 03:54:08.738688 r-bulldog-04 INFO dhcp_relay#supervisord 2022-05-12 03:54:08,737 WARN received SIGTERM indicating exit request
May 12 03:54:12.057070 r-bulldog-04 INFO supervisord 2022-05-12 03:54:12,055 WARN received SIGTERM indicating exit request
May 12 03:54:16.786550 r-bulldog-04 INFO pmon#supervisord 2022-05-12 03:54:16,785 WARN received SIGTERM indicating exit request
May 12 03:54:19.460615 r-bulldog-04 ERR snmp#snmp-subagent [ax_interface] ERROR: MIBUpdater.start() caught an unexpected exception during update_data()#012Traceback (most recent call last):#012  File "/usr/local/lib/python3.7/dist-packages/ax_interface/mib.py", line 43, in start#012    self.update_data()#012  File "/usr/local/lib/python3.7/dist-packages/sonic_ax_impl/mibs/ietf/rfc3433.py", line 617, in update_data#012    self.update_xcvr_dom_data()#012  File "/usr/local/lib/python3.7/dist-packages/sonic_ax_impl/mibs/ietf/rfc3433.py", line 427, in update_xcvr_dom_data#012    if  transceiver_info_entry_data['type'] == RJ45_PORT_TYPE:#012KeyError: 'type'
May 12 03:54:27.481458 r-bulldog-04 INFO syncd#supervisord 2022-05-12 03:54:27,480 WARN received SIGTERM indicating exit request
May 12 03:54:31.430023 r-bulldog-04 WARNING kernel: [ 1319.271755] Deinit char dev: 00000000143abb48 , usage:1

Describe the results you expected:

CLI throws an error when adding a sub-interface in short name without a vid

Output of show version:

SONiC Software Version: SONiC.master.351-dee765552_Internal
Distribution: Debian 11.3
Kernel: 5.10.0-12-2-amd64
Build commit: dee765552
Build date: Wed May 11 21:52:53 UTC 2022
Built by: sw-r2d2-bot@r-build-sonic-ci02-244

Platform: x86_64-mlnx_msn2100-r0
HwSKU: ACS-MSN2100
ASIC: mellanox
ASIC Count: 1
Serial Number: MT1752X06332
Model Number: MSN2100-CB2F
Hardware Revision: A1
Uptime: 03:55:18 up 22 min,  2 users,  load average: 1.27, 0.87, 0.70
Date: Thu 12 May 2022 03:55:18

Docker images:
REPOSITORY                                         TAG                             IMAGE ID       SIZE
docker-dhcp-relay                                  latest                          8e77bb641c0e   444MB
docker-syncd-mlnx                                  latest                          67358ca11dfc   989MB
docker-syncd-mlnx                                  master.351-dee765552_Internal   67358ca11dfc   989MB
docker-sonic-telemetry                             latest                          f3a592778031   515MB
docker-sonic-telemetry                             master.351-dee765552_Internal   f3a592778031   515MB
docker-router-advertiser                           latest                          ab30e23693af   435MB
docker-router-advertiser                           master.351-dee765552_Internal   ab30e23693af   435MB
docker-platform-monitor                            latest                          e8c1dfa3562c   675MB
docker-platform-monitor                            master.351-dee765552_Internal   e8c1dfa3562c   675MB
docker-mux                                         latest                          5ce2b2bc4bcd   483MB
docker-mux                                         master.351-dee765552_Internal   5ce2b2bc4bcd   483MB
docker-macsec                                      latest                          8fba6a3ce95b   453MB
docker-macsec                                      master.351-dee765552_Internal   8fba6a3ce95b   453MB
docker-database                                    latest                          d82b8a530d11   435MB
docker-database                                    master.351-dee765552_Internal   d82b8a530d11   435MB
docker-teamd                                       latest                          b3693968a26d   420MB
docker-teamd                                       master.351-dee765552_Internal   b3693968a26d   420MB
docker-sonic-mgmt-framework                        latest                          6488f2ec6cd6   550MB
docker-sonic-mgmt-framework                        master.351-dee765552_Internal   6488f2ec6cd6   550MB
docker-snmp                                        latest                          8a380ed603a2   449MB
docker-snmp                                        master.351-dee765552_Internal   8a380ed603a2   449MB
docker-sflow                                       latest                          da1a5094663b   421MB
docker-sflow                                       master.351-dee765552_Internal   da1a5094663b   421MB
docker-orchagent                                   latest                          76bd03f46ad7   439MB
docker-orchagent                                   master.351-dee765552_Internal   76bd03f46ad7   439MB
docker-nat                                         latest                          b481e06c00a3   423MB
docker-nat                                         master.351-dee765552_Internal   b481e06c00a3   423MB
docker-lldp                                        latest                          66634c2f70d8   446MB
docker-lldp                                        master.351-dee765552_Internal   66634c2f70d8   446MB
docker-fpm-frr                                     latest                          5b9fa7921b42   439MB
docker-fpm-frr                                     master.351-dee765552_Internal   5b9fa7921b42   439MB
urm.nvidia.com/sw-nbu-sws-sonic-docker/sonic-wjh   1.0.0-master-internal-50        71e107d8aea8   453MB

Output of show techsupport:

[sonic_dump_r-bulldog-04_20220512_035451.tar.gz](https://github.com/Azure/sonic-buildimage/files/8723928/sonic_dump_r-bulldog-04_20220512_035451.tar.gz)

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

@zhangyanzhao zhangyanzhao added Triaged this issue has been triaged BRCM labels May 25, 2022
@zhangyanzhao
Copy link
Collaborator

@adyeung can you please help to find someone from BRCM to check? Thanks.

@adyeung
Copy link
Collaborator

adyeung commented Jun 10, 2022

@preetham-singh to followup next week

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 is 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 adyeung closed this as completed Sep 8, 2022
@adyeung
Copy link
Collaborator

adyeung commented Sep 8, 2022

Ticket close, fix has merged

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

3 participants