sonic-utilities
sonic-utilities copied to clipboard
[chassis] [MA] PFC commands does not support multi-asic platforms
Description
Issue:
$sudo config interface -n asic1 pfc priority Ethernet80 3 on
Cannot find interface Ethernet80
$ sudo config interface -n asic0 pfc priority Ethernet80 3 on
Cannot find interface Ethernet80
Root cause is this https://github.com/sonic-net/sonic-utilities/blob/master/pfc/main.py file does not take any namespace as input, thus all the config db in this file is the host's config db, so the execution of all PFC commands in this file are incorrect if it depends on asic's config db.. e.g. config pfc priority is finding table 'PORT_QOS_MAP' which only exists in asic's config db.
The solution is hard to achieve, because the file itself is called by utilities_common.cli, need to find a way to pass additional arguments such as ctx
or namespace
Workaround:
$ sudo ip netns exec asic0 config interface -n asic0 pfc priority Ethernet0 1 on
Interface Lossless priorities
----------- ---------------------
Ethernet0 1,3,4
Steps to reproduce the issue
Describe the results you received
Describe the results you expected
Additional information you deem important (e.g. issue happens only occasionally)
Output of show version
(paste your output here)