Description
Description
command " sudo config reload" has the option to load system default information,
but when running the command with this option the following trackback is printed and the switch is stuck afterward.
admin@r-lionfish-14:~$ sudo config reload -h
Usage: config reload [OPTIONS] [FILENAME]
Clear current configuration and import a previous saved config DB dump
file. <filename> : Names of configuration file(s) to load, separated by
comma with no spaces in between
Options:
-y, --yes
-l, --load-sysinfo load system default information (mac, portmap etc)
first.
-n, --no_service_restart Do not restart docker services
-d, --disable_arp_cache Do not cache ARP table before reloading (applies
to dual ToR systems only)
-?, -h, --help Show this message and exit.
admin@r-lionfish-14:~$ sudo config reload -l
Clear current config and reload config from the default config file(s) ? [y/N]: y
Traceback (most recent call last):
File "/usr/local/bin/sonic-cfggen", line 431, in <module>
main()
File "/usr/local/bin/sonic-cfggen", line 326, in main
_process_json(args, data)
File "/usr/local/bin/sonic-cfggen", line 236, in _process_json
with open(json_file, 'r') as stream:
FileNotFoundError: [Errno 2] No such file or directory: 'None'
Stopping SONiC target ...
Running command: /usr/local/bin/sonic-cfggen -H -k --write-to-db
usage: sonic-cfggen [-h] [-m [MINIGRAPH] | -M DEVICE_DESCRIPTION | -k HWSKU] [-n [NAMESPACE]] [-p [PORT_CONFIG]]
[-S [HWSKU_CONFIG]] [-y YAML] [-j JSON] [-a ADDITIONAL_DATA] [-d] [-H] [-s REDIS_UNIX_SOCK_FILE]
[-t TEMPLATE] [-T TEMPLATE_DIR] [-v VAR] [--var-json VAR_JSON] [--preset {t1,l2,empty}]
[--print-data | -w | -K KEY]
sonic-cfggen: error: argument -k/--hwsku: expected one argument
admin@r-lionfish-14:~$
Steps to reproduce the issue:
- sudo config reload -l
Describe the results you received:
traceback prints in the command output
sudo config reload -l
Clear current config and reload config from the default config file(s) ? [y/N]: y
Traceback (most recent call last):
File "/usr/local/bin/sonic-cfggen", line 433, in <module>
main()
File "/usr/local/bin/sonic-cfggen", line 328, in main
_process_json(args, data)
File "/usr/local/bin/sonic-cfggen", line 236, in _process_json
with open(json_file, 'r') as stream:
FileNotFoundError: [Errno 2] No such file or directory: 'None'
Disabling container monitoring ...
Stopping SONiC target ...
Running command: /usr/local/bin/sonic-cfggen -H -k --write-to-db
usage: sonic-cfggen [-h] [-m [MINIGRAPH] | -M DEVICE_DESCRIPTION | -k HWSKU]
[-n [NAMESPACE]] [-p [PORT_CONFIG]] [-S [HWSKU_CONFIG]]
[-y YAML] [-j JSON] [-a ADDITIONAL_DATA] [-d] [-H]
[-s REDIS_UNIX_SOCK_FILE] [-t TEMPLATE] [-T TEMPLATE_DIR]
[-v VAR] [--var-json VAR_JSON] [--preset {t1,l2,empty}]
[--print-data | -w | -K KEY]
sonic-cfggen: error: argument -k/--hwsku: expected one argument
there is no option to pass the hwsku parameter when running the config reload with -l.
admin@r-lionfish-14:~$ sudo config reload -l -k ACS-MSN3420
Usage: config reload [OPTIONS] [FILENAME]
Try "config reload -h" for help.
Error: no such option: -k
Describe the results you expected:
the command should execute: "/usr/local/bin/sonic-cfggen -H -k --write-to-db" successfully and apply reload.
Output of show version
:
show boot
Current: SONiC-OS-202012.72-193c376f_Internal
Next: SONiC-OS-202012.72-193c376f_Internal
Available:
SONiC-OS-202012.72-193c376f_Internal
Output of show techsupport
:
no techsupport as switch become stuck after the command is excuted