-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Executing 'config load_minigraph' got the session stuck forever #145
Comments
Can you upload the minigraph file? |
This is the default minigraph file that was there when i installed sonic in my Z9100. changed the hostname in line 1042 then in line 1077. Have highlighted the same in the attached file as well. |
@Anandaraj-Maharajan: It sounds like the the first call to Could you please run the following command and post the output: |
I just did config load_minigraph with the uploaded file and it works on my Z9100 unit with a different image.
Please provide the output requested by Joe. |
@prsunny switch1 is the default hostname. change it to some other name in line 1042, try config load_minigraph you will see the error. subsequent changes in minigraph and config load_minigraph will fail.. @jleveque here is redis-cli output before and after getting the error root@switch1:~# redis-cli -n 4 keys *
|
@Anandaraj-Maharajan: Thanks for the reply. Unfortunately, I didn't get the information I was looking for due to the "ERR wrong number of arguments for 'keys' command" error. Please run the following command (note the addition of single quotes around the asterisk) and post the output: |
retried the command with single quotes root@switch1:/etc/sonic# config load_minigraph |
The database is empty after the first call to Try running the following command: After running this command, I will submit an issue for this, as the ConfigDB should never get into a broken state like this, even if |
The command config load_minigraph works but again crashes and database is empty like the first time. root@switch1:/etc/sonic# redis-cli -n 4 SET CONFIG_DB_INITIALIZED true
|
The crash appears to be due to a problem parsing your minigraph:
Double-check the minigraph is formatted correctly. |
As I mentioned earlier, I changed only hostname key in one place and landed in this state. I went ahead replaced the default hostname 'switch1' to a custom name 'Z9100-17' in all the places, reinitialized the DB and load_minigraph. Now the command is stuck in a different location. root@switch1:/etc/sonic# vi minigraph.xml
|
Well, now it appears to have loaded the minigraph properly. If |
I rebooted the device, now the config load_minigraph doesn't hang anymore. The hostname is changed as well. Thanks. |
You're welcome. Glad to hear everything's working! |
root@switch1:/home/admin# show version
SONiC Software Version: SONiC.HEAD.466-8cfa223
Distribution: Debian 8.10
Kernel: 3.16.0-4-amd64
Build commit: 8cfa223
Build date: Fri Jan 19 07:46:47 UTC 2018
Built by: johnar@jenkins-worker-4
Docker images:
REPOSITORY TAG IMAGE ID SIZE
docker-syncd-brcm HEAD.466-8cfa223 ba4f612f2f21 317.3 MB
docker-syncd-brcm latest ba4f612f2f21 317.3 MB
docker-orchagent-brcm HEAD.466-8cfa223 00b26f843707 258.3 MB
docker-orchagent-brcm latest 00b26f843707 258.3 MB
docker-lldp-sv2 HEAD.466-8cfa223 463421931d7f 255.4 MB
docker-lldp-sv2 latest 463421931d7f 255.4 MB
docker-dhcp-relay HEAD.466-8cfa223 33afa8dbdafd 252 MB
docker-dhcp-relay latest 33afa8dbdafd 252 MB
docker-database HEAD.466-8cfa223 12d8072fd2be 250.7 MB
docker-database latest 12d8072fd2be 250.7 MB
docker-teamd HEAD.466-8cfa223 a02ee624f33a 255.4 MB
docker-teamd latest a02ee624f33a 255.4 MB
docker-snmp-sv2 HEAD.466-8cfa223 388d5998f08d 290.5 MB
docker-snmp-sv2 latest 388d5998f08d 290.5 MB
docker-router-advertiser HEAD.466-8cfa223 636ac6b4cf17 248.3 MB
docker-router-advertiser latest 636ac6b4cf17 248.3 MB
docker-platform-monitor HEAD.466-8cfa223 4f5b3285c8c5 270 MB
docker-platform-monitor latest 4f5b3285c8c5 270 MB
docker-fpm-quagga HEAD.466-8cfa223 86070843448c 261.9 MB
docker-fpm-quagga latest 86070843448c 261.9 MB
root@switch1:/home/admin#
In a vanilla box, tried changing the hostname in minigraph. Changed it under Device tag and ran config load_minigraph
root@switch1:/etc/sonic# config load_minigraph
Reload config from minigraph? [y/N]: y
Running command: sonic-cfggen -m -j /etc/sonic/init_cfg.json --write-to-db
Traceback (most recent call last):
File "/usr/local/bin/sonic-cfggen", line 220, in
main()
File "/usr/local/bin/sonic-cfggen", line 165, in main
deep_update(data, parse_xml(minigraph, data['platform']))
File "/usr/local/lib/python2.7/dist-packages/minigraph.py", line 389, in parse_xml
'type': devices[hostname]['type']
KeyError: 'switch1'
root@switch1:/etc/sonic#
After the error changed it in another place at the end and executed the command again, but the command is stuck forever. Only ctrl+c works to get out of this.
root@switch1:/etc/sonic# vi minigraph.xml
Z9100-17 <<<< Force10-Z9100root@switch1:/etc/sonic# config load_minigraph
Reload config from minigraph? [y/N]: y
^C
Aborted!
root@switch1:/etc/sonic# vi minigraph.xml
root@switch1:/etc/sonic# config load_minigraph
Reload config from minigraph? [y/N]: y
^C
Aborted!
root@switch1:/etc/sonic#
The text was updated successfully, but these errors were encountered: