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

[Vlan] config vlan del command results in traceback with supervisorctl status ndppd command failing in swss #16542

Closed
dgsudharsan opened this issue Sep 13, 2023 · 3 comments · Fixed by sonic-net/sonic-utilities#2982
Assignees

Comments

@dgsudharsan
Copy link
Collaborator

Description

When vlan is added and removed, the del call results in traceback as below

root@qa-eth-vt02-3-2700a0:/home/admin# config vlan add 3456
root@qa-eth-vt02-3-2700a0:/home/admin# 
root@qa-eth-vt02-3-2700a0:/home/admin# 
root@qa-eth-vt02-3-2700a0:/home/admin# show vlan brief
+-----------+--------------+---------+----------------+-------------+-----------------------+
|   VLAN ID | IP Address   | Ports   | Port Tagging   | Proxy ARP   | DHCP Helper Address   |
+===========+==============+=========+================+=============+=======================+
|      3456 |              |         |                | disabled    |                       |
+-----------+--------------+---------+----------------+-------------+-----------------------+
root@qa-eth-vt02-3-2700a0:/home/admin# 
root@qa-eth-vt02-3-2700a0:/home/admin# config vlan del 3456
Traceback (most recent call last):
  File "/usr/local/bin/config", line 8, in <module>
    sys.exit(config())
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/config/vlan.py", line 132, in del_vlan
    _, rc = clicommon.run_command(docker_exec_cmd.format("supervisorctl status ndppd"), ignore_error=True, return_cmd=True)
  File "/usr/local/lib/python3.9/dist-packages/utilities_common/cli.py", line 545, in run_command
    proc = subprocess.Popen(command, shell=shell, text=True, stdout=subprocess.PIPE)
  File "/usr/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.9/subprocess.py", line 1823, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'docker exec -i swss supervisorctl status ndppd'
root@qa-eth-vt02-3-2700a0:/home/admin# show vlan brief
+-----------+--------------+---------+----------------+-------------+-----------------------+
| VLAN ID   | IP Address   | Ports   | Port Tagging   | Proxy ARP   | DHCP Helper Address   |
+===========+==============+=========+================+=============+=======================+
+-----------+--------------+---------+----------------+-------------+-----------------------+

Steps to reproduce the issue:

  1. config vlan add
  2. config vlan del

Describe the results you received:

config vlan del results in traceback

Describe the results you expected:

No traceback when calling config vlan del

Output of show version:


SONiC Software Version: SONiC.202305_RC.1-ca3667ac0_Internal
SONiC OS Version: 11
Distribution: Debian 11.7
Kernel: 5.10.0-18-2-amd64
Build commit: ca3667ac0
Build date: Thu Aug 31 08:08:59 UTC 2023
Built by: sw-r2d2-bot@r-build-sonic-ci03-244

Platform: x86_64-mlnx_msn3700-r0
HwSKU: ACS-MSN3700
ASIC: mellanox
ASIC Count: 1
Serial Number: MT1949X06182
Model Number: MSN3700-VS2F
Hardware Revision: A3
Uptime: 18:32:46 up 7 min,  1 user,  load average: 0.39, 0.41, 0.25
Date: Thu 07 Sep 2023 18:32:46

Docker images:
REPOSITORY                                         TAG                              IMAGE ID       SIZE
docker-orchagent                                   202305_RC.1-ca3667ac0_Internal   eea7e5499baf   328MB
docker-orchagent                                   latest                           eea7e5499baf   328MB
docker-platform-monitor                            202305_RC.1-ca3667ac0_Internal   e900cb12e21a   859MB
docker-platform-monitor                            latest                           e900cb12e21a   859MB
docker-nat                                         202305_RC.1-ca3667ac0_Internal   2179d6fe9058   319MB
docker-nat                                         latest                           2179d6fe9058   319MB
docker-teamd                                       202305_RC.1-ca3667ac0_Internal   526d2e82e919   317MB
docker-teamd                                       latest                           526d2e82e919   317MB
docker-sflow                                       202305_RC.1-ca3667ac0_Internal   dc2a4b5005ea   318MB
docker-sflow                                       latest                           dc2a4b5005ea   318MB
docker-fpm-frr                                     202305_RC.1-ca3667ac0_Internal   68295485543a   348MB
docker-fpm-frr                                     latest                           68295485543a   348MB
docker-syncd-mlnx                                  202305_RC.1-ca3667ac0_Internal   6346ad2d0073   870MB
docker-syncd-mlnx                                  latest                           6346ad2d0073   870MB
docker-macsec                                      latest                           27ca898ade3a   319MB
docker-snmp                                        202305_RC.1-ca3667ac0_Internal   4f7178d22f96   338MB
docker-snmp                                        latest                           4f7178d22f96   338MB
docker-sonic-telemetry                             202305_RC.1-ca3667ac0_Internal   ab21c6b604b7   599MB
docker-sonic-telemetry                             latest                           ab21c6b604b7   599MB
docker-dhcp-relay                                  latest                           1c536017f212   306MB
docker-eventd                                      202305_RC.1-ca3667ac0_Internal   05ec40cf1898   299MB
docker-eventd                                      latest                           05ec40cf1898   299MB
docker-lldp                                        202305_RC.1-ca3667ac0_Internal   760bf2209a2e   341MB
docker-lldp                                        latest                           760bf2209a2e   341MB
docker-router-advertiser                           202305_RC.1-ca3667ac0_Internal   8a56229f873b   299MB
docker-router-advertiser                           latest                           8a56229f873b   299MB
docker-database                                    202305_RC.1-ca3667ac0_Internal   2766cb678d20   299MB
docker-database                                    latest                           2766cb678d20   299MB
docker-mux                                         202305_RC.1-ca3667ac0_Internal   14cc6ecdbc5a   348MB
docker-mux                                         latest                           14cc6ecdbc5a   348MB
docker-sonic-mgmt-framework                        202305_RC.1-ca3667ac0_Internal   182387b4f331   415MB
docker-sonic-mgmt-framework                        latest                           182387b4f331   415MB
urm.nvidia.com/sw-nbu-sws-sonic-docker/sonic-wjh   1.0.0-202305-1                   da0d5011c828   432MB
urm.nvidia.com/sw-nbu-sws-sonic-docker/doai        1.0.0-202305-1                   17676f080268   277MB


Output of show techsupport:

(paste your output here or download and attach the file here )

sonic_dump_r-anaconda-51_20230907_183233 (1).tar.gz

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

@dgsudharsan
Copy link
Collaborator Author

@prsunny @theasianpianist Can you please check this. Is it related to changes done to address #14231 ?

@dgsudharsan
Copy link
Collaborator Author

@maipbui @qiluo-msft This issue is because the supervisortctl status commands were not replaced for del vlan command in sonic-net/sonic-utilities#2718
The changes were done in add vlan flow. Can you please raise PR to fix it?

maipbui added a commit to sonic-net/sonic-utilities that referenced this issue Sep 15, 2023
Resolves sonic-net/sonic-buildimage#16542
#### What I did
Update str -> list[str] commands which were missed in #2718
#### How I did it
#### How to verify it
Pass UT. Manual test, issue resolved, tested in internal.79435802-3bbd91c86e version
Signed-off-by: Mai Bui <maibui@microsoft.com>
@maipbui
Copy link
Contributor

maipbui commented Sep 15, 2023

@dgsudharsan Fix PR has been merged. Thank you for your bug report!

yaqiangz pushed a commit to yaqiangz/sonic-utilities that referenced this issue Sep 20, 2023
Resolves sonic-net/sonic-buildimage#16542
Update str -> list[str] commands which were missed in sonic-net#2718
Pass UT. Manual test, issue resolved, tested in internal.79435802-3bbd91c86e version
Signed-off-by: Mai Bui <maibui@microsoft.com>
JunhongMao pushed a commit to JunhongMao/sonic-utilities that referenced this issue Oct 4, 2023
Resolves sonic-net/sonic-buildimage#16542
#### What I did
Update str -> list[str] commands which were missed in sonic-net#2718
#### How I did it
#### How to verify it
Pass UT. Manual test, issue resolved, tested in internal.79435802-3bbd91c86e version
Signed-off-by: Mai Bui <maibui@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants