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

[DPB] python error is not handled in the DPB CLI #6332

Closed
vadymhlushko-mlnx opened this issue Dec 31, 2020 · 3 comments
Closed

[DPB] python error is not handled in the DPB CLI #6332

vadymhlushko-mlnx opened this issue Dec 31, 2020 · 3 comments

Comments

@vadymhlushko-mlnx
Copy link
Contributor

vadymhlushko-mlnx commented Dec 31, 2020

Description

The Dynamic Port Breakout CLI print python error Failed to break out Port. Error: 'str' object has no attribute 'decode', but the actual result of execution DPB command was successful

Steps to reproduce the issue:
Run the command config interface breakout <interface> <breakout_mode>

Describe the results you received:

root@arc-switch1038:/usr/local/yang-models# config interface breakout Ethernet4 2x100G[50G,40G,25G,10G,1G] -v -y

Running Breakout Mode : 1x200G[100G,50G,40G,25G,10G,1G]
Target Breakout Mode : 2x100G[50G,40G,25G,10G,1G]

Ports to be deleted :
 {
    "Ethernet4": "200000"
}
Ports to be added :
 {
    "Ethernet4": "100000",
    "Ethernet6": "100000"
}

After running Logic to limit the impact

Final list of ports to be deleted :
 {
    "Ethernet4": "200000"
}
Final list of ports to be added :
 {
    "Ethernet4": "100000",
    "Ethernet6": "100000"
}
Loaded below Yang Models
['sonic-acl', 'sonic-breakout_cfg', 'sonic-device_metadata', 'sonic-device_neighbor', 'sonic-extension', 'sonic-flex_counter', 'sonic-interface', 'sonic-loopback-interface', 'sonic-port', 'sonic-portchannel', 'sonic-types', 'sonic-versions', 'sonic-vlan']
Note: Below table(s) have no YANG models:
BGP_NEIGHBOR, FEATURE, CRM, TELEMETRY,
Below Config can not be verified, It may cause harm to the system
 {}
Do you wish to Continue? [y/N]: y
Failed to break out Port. Error: 'str' object has no attribute 'decode'

Describe the results you expected:

root@arc-switch1038:/usr/local/yang-models# config interface breakout Ethernet0 2x100G[50G,40G,25G,10G,1G] -v -y

Running Breakout Mode : 1x200G[100G,50G,40G,25G,10G,1G]
Target Breakout Mode : 2x100G[50G,40G,25G,10G,1G]

Ports to be deleted :
 {
    "Ethernet0": "200000"
}
Ports to be added :
 {
    "Ethernet0": "100000",
    "Ethernet2": "100000"
}

After running Logic to limit the impact

Final list of ports to be deleted :
 {
    "Ethernet0": "200000"
}
Final list of ports to be added :
 {
    "Ethernet0": "100000",
    "Ethernet2": "100000"
}
Loaded below Yang Models
['sonic-acl', 'sonic-breakout_cfg', 'sonic-device_metadata', 'sonic-device_neighbor', 'sonic-extension', 'sonic-interface', 'sonic-loopback-interface', 'sonic-port', 'sonic-portchannel', 'sonic-types', 'sonic-versions', 'sonic-vlan']
Note: Below table(s) have no YANG models:
BGP_NEIGHBOR, FEATURE, TELEMETRY,
Do you wish to Continue? [y/N]: y
Breakout process got successfully completed.
Please note loaded setting will be lost after system reboot. To preserve setting, run `config save`.

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

**Output of `show version`:**
root@arc-switch1038:/home/admin# show version

SONiC Software Version: SONiC.dpb_qa_image_draft.0-1cdf86d6
Distribution: Debian 10.7
Kernel: 4.19.0-9-2-amd64
Build commit: 1cdf86d6
Build date: Wed Dec 30 00:08:54 UTC 2020
Built by: vadymh@r-build-sonic02

Platform: x86_64-mlnx_msn3700-r0
HwSKU: ACS-MSN3700
ASIC: mellanox
ASIC Count: 1
Serial Number: MT1851X02961
Uptime: 13:03:37 up  2:07,  1 user,  load average: 0.70, 0.98, 0.91

Docker images:
REPOSITORY                    TAG                             IMAGE ID            SIZE
docker-syncd-mlnx             dpb_qa_image_draft.0-1cdf86d6   e438f97b84ff        624MB
docker-syncd-mlnx             latest                          e438f97b84ff        624MB
docker-teamd                  dpb_qa_image_draft.0-1cdf86d6   c551495d6919        524MB
docker-teamd                  latest                          c551495d6919        524MB
docker-nat                    dpb_qa_image_draft.0-1cdf86d6   f6cd6923a0cc        527MB
docker-nat                    latest                          f6cd6923a0cc        527MB
docker-sonic-mgmt-framework   dpb_qa_image_draft.0-1cdf86d6   d12ec3b88aee        681MB
docker-sonic-mgmt-framework   latest                          d12ec3b88aee        681MB
docker-router-advertiser      dpb_qa_image_draft.0-1cdf86d6   c8ad45b01878        480MB
docker-router-advertiser      latest                          c8ad45b01878        480MB
docker-platform-monitor       dpb_qa_image_draft.0-1cdf86d6   bab065afbda6        687MB
docker-platform-monitor       latest                          bab065afbda6        687MB
docker-lldp                   dpb_qa_image_draft.0-1cdf86d6   cc383ca46a4c        520MB
docker-lldp                   latest                          cc383ca46a4c        520MB
docker-snmp                   dpb_qa_image_draft.0-1cdf86d6   3286280b4087        525MB
docker-snmp                   latest                          3286280b4087        525MB
docker-dhcp-relay             dpb_qa_image_draft.0-1cdf86d6   df2677ca38ed        487MB
docker-dhcp-relay             latest                          df2677ca38ed        487MB
docker-database               dpb_qa_image_draft.0-1cdf86d6   6c78a351a07b        480MB
docker-database               latest                          6c78a351a07b        480MB
docker-orchagent              dpb_qa_image_draft.0-1cdf86d6   93bb56fc8e02        554MB
docker-orchagent              latest                          93bb56fc8e02        554MB
docker-sonic-telemetry        dpb_qa_image_draft.0-1cdf86d6   93cf2cec0c87        554MB
docker-sonic-telemetry        latest                          93cf2cec0c87        554MB
docker-fpm-frr                dpb_qa_image_draft.0-1cdf86d6   0c9d1641a997        540MB
docker-fpm-frr                latest                          0c9d1641a997        540MB
docker-sflow                  dpb_qa_image_draft.0-1cdf86d6   1790924a6134        525MB
docker-sflow                  latest                          1790924a6134        525MB

The list of PR's that are needed for the Dynamic Port Breakout feature
Mandatory PR for every platform - Extended regex patter for speeds
for SN2010
for SN2100
for SN2410
for SN2700
for SN3420
for SN3700
for SN3700C
for SN3800
for SN4410
for SN4600C
for SN4700

@vadymhlushko-mlnx
Copy link
Contributor Author

Latest system logs (reproduce starts from time - Dec 31 12:44:21.249494 arc-switch1038)
syslog.zip

@ghost
Copy link

ghost commented Jan 6, 2021

Dear @vadymhlushko-mlnx,

Looks like the root cause of the issue is the redundant ".decode" of "interface_name" variable inside function "breakout" in sonic-utilities/config/main.py.
It seems the issue should have been fixed with the next PR:
sonic-net/sonic-utilities#1223

Could you check the issue occurrence on a newer build?

@vadymhlushko-mlnx
Copy link
Contributor Author

Dear @vadymhlushko-mlnx,

Looks like the root cause of the issue is the redundant ".decode" of "interface_name" variable inside function "breakout" in sonic-utilities/config/main.py.
It seems the issue should have been fixed with the next PR:
Azure/sonic-utilities#1223

Could you check the issue occurrence on a newer build?

Yes, the issue is not reproducible on the latest master image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants