Description
There is no validation, so it’s acceptable to specify either negative or large positive value for --min-links key in the config portchannel add command.
Steps to reproduce the issue
1.# config portchannel add PortChannel0001 --min-links **-3**
2.# config portchannel add PortChannel0001 --min-links **9999**
Describe the results you received
Both scenarios cause teamd crashes.
Syslog:
Teamd crashes with :
Jan 28 21:27:10.651036 sonic ERR teamd#teammgrd: :- main: Runtime error: stoi
Jan 28 21:27:11.654010 sonic INFO teamd#supervisor-proc-exit-listener: Process teammgrd exited unxepectedly. Terminating supervisor...
Jan 28 21:27:13.795446 sonic INFO containerd[563]: time="2020-01-28T21:27:13.795281836Z" level=info msg="shim reaped" id=a898a3ab008c14c65b0e7227e8592eedb59e570861218f2cb00cb645a8fdeb60
Jan 28 21:27:13.805514 sonic INFO dockerd[751]: time="2020-01-28T21:27:13.805388382Z" level=info msg="ignoring event" module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
Jan 28 21:27:13.878407 sonic INFO teamd.sh[7074]: 0
Jan 28 21:27:13.926660 sonic INFO teamd.sh[11288]: teamd```
Docker containers:
root@r-qa-sw-eth-21138:/home/admin# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6f4b64f1b66b docker-sonic-telemetry:latest "/usr/bin/supervisord" 33 hours ago Up 55 seconds telemetry
6785b1121b84 docker-sonic-mgmt-framework:latest "/usr/bin/supervisord" 33 hours ago Up 4 minutes mgmt-framework
6f73266b584d docker-snmp-sv2:latest "/usr/bin/supervisord" 4 days ago Up 53 seconds snmp
bef5fc1a17d9 docker-dhcp-relay:latest "/usr/bin/docker_ini…" 4 days ago Up 4 minutes dhcp_relay
8e4bf2266117 docker-lldp-sv2:latest "/usr/bin/supervisord" 4 days ago Up 4 minutes lldp
54ba15383712 docker-platform-monitor:latest "/usr/bin/docker_ini…" 4 days ago Up 4 minutes pmon
46fc9bbe2307 docker-router-advertiser:latest "/usr/bin/supervisord" 4 days ago Up 4 minutes radv
64c529471167 docker-sflow:latest "/usr/bin/supervisord" 4 days ago Up 4 minutes sflow
efec372f0742 docker-syncd-mlnx:latest "/usr/bin/supervisord" 4 days ago Up 4 minutes syncd
7704a37bfdcc docker-orchagent:latest "/usr/bin/supervisord" 4 days ago Up 4 minutes swss
e8a9ab9fb647 docker-fpm-frr:latest "/usr/bin/supervisord" 4 days ago Up 4 minutes bgp
1a672ab3c428 docker-database:latest "/usr/local/bin/dock…" 4 days ago Up 4 minutes database
Describe the results you expected
Config utility should prevent from assigning either negative or large positive value for --min-links key in the config portchannel add command.
Description There is no validation, so it’s acceptable to specify either negative or large positive value for
--min-links
key in theconfig portchannel add
command.1-st case: # config portchannel add PortChannel0001 --min-links -3 2-nd case: # config portchannel add PortChannel0001 --min-links 9999
Steps to reproduce the issue 1.
# config portchannel add PortChannel0001 --min-links **-3**
2.# config portchannel add PortChannel0001 --min-links **9999**
Describe the results you received Both scenarios cause teamd crashes. Syslog: Teamd crashes with :
Docker containers:
Describe the results you expected Config utility should prevent from assigning either negative or large positive value for
--min-links
key in theconfig portchannel add
command.Output of
show version
sonic_dump_r-qa-sw-eth-21138_20200128_211943.tar.gz sonic_dump_r-qa-sw-eth-21138_20200128_212736.tar.gz