-
Notifications
You must be signed in to change notification settings - Fork 1.8k
config interface will erase configuration in configDB? #2240
Description
Description
Steps to reproduce the issue:
-
load config_db.json which has this in PORT section:
PORT: {
"Ethernet112": {
"alias": "Eth29/1",
"lanes": "113,114",
"speed": "50000",
"index": "28"
},
....
}
sudo config interface Ethernet112 startup
- sonic-cfggen -d --print-data
PORT: {
"Ethernet112": {
"admin_status": "up"
},
..
}
This will break any other subsequence commands like "show version"
File "/usr/bin/show", line 9, in
load_entry_point('sonic-utilities==1.2', 'console_scripts', 'show')()
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 561, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2631, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2291, in load
return self.resolve()
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2297, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/usr/lib/python2.7/dist-packages/show/main.py", line 193, in
iface_alias_converter = InterfaceAliasConverter()
File "/usr/lib/python2.7/dist-packages/show/main.py", line 58, in init
self.port_dict[port_name]['alias']):
KeyError: 'alias'
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`:**
914d5c74519418a4f9430493b169d36c4474c75d
```
(paste your output here)
```
**Attach debug file `sudo generate_dump`:**
```
(paste your output here)
```