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

ZTP Error (1) encountered while processing the command curl #15

Closed
Ezrickd opened this issue Jun 4, 2020 · 0 comments · Fixed by #17
Closed

ZTP Error (1) encountered while processing the command curl #15

Ezrickd opened this issue Jun 4, 2020 · 0 comments · Fixed by #17

Comments

@Ezrickd
Copy link

Ezrickd commented Jun 4, 2020

Sonic Image Based on 201911

ZTP process fail to execute ztp.json file.

return with Err "sonic ERR sonic-ztp[3572]: !Error (1) encountered while processing the command : /usr/bin/curl -f -v -s -o /var/run/ztp/ztp_data_opt67.json -A "SONiC-0"

issue related to extra characters parsing of EEPROM info at.
ZTP process collect the following decode-syseeprom -p / decode-syseeprom -s / decode-syseeprom -m for HTTP session unique info.
found that the add unique Info to the curl command break the file fetch.

attached syslog.

Jun 2 16:13:56.035865 sonic INFO sonic-ztp[3572]: ZTP service started.
Jun 2 16:13:56.036381 sonic INFO sonic-ztp[3572]: Checking running configuration to load ZTP configuration profile.
Jun 2 16:13:56.946697 sonic INFO sonic-ztp[3570]: Waiting for system online status before continuing ZTP. (This may take 30--120 seconds).
Jun 2 16:15:12.164409 sonic INFO sonic-ztp[3570]: System is ready to respond.
Jun 2 16:15:12.375346 sonic INFO sonic-ztp[3572]: Link up detected for interface eth0
Jun 2 16:15:12.376191 sonic INFO sonic-ztp[3572]: Restarting network discovery after link scan.
Jun 2 16:15:21.692716 sonic INFO sonic-ztp[3572]: Restarted network discovery after link scan.
Jun 2 16:15:31.769706 sonic INFO sonic-ztp[3572]: Downloading provisioning data from http://11.11.11.1/ZTP/4700-1-ztp.json to /var/run/ztp/ztp_data_opt67.json
Jun 2 16:15:32.011267 sonic ERR sonic-ztp[3572]: !Error (1) encountered while processing the command : /usr/bin/curl -f -v -s -o /var/run/ztp/ztp_data_opt67.json -A "SONiC-0
Jun 2 16:15:32.012177 sonic ERR sonic-ztp[3572]: Exception ['NoneType' object is not iterable] encountered while running the discovery logic.
Jun 2 16:15:32.017719 sonic WARNING sonic-ztp[3572]: Invalid provisioning data received. Waiting for 300 seconds before restarting ZTP.

we can see in decode-syseeprom that there are trailing Null in eeprom. when remove the Null ZTP works.

admin@l-csi-4700-02:~$ sudo decode-syseeprom -p | hexdump -c
0000000 M S N 4 7 0 0 \0 \0 \0 \0 \0 \0 \0 \0 \0
0000010 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
*
0000040 \n
0000041

when EEPROM has the following content it works.
root@AE-2700-5-Sonic:# decode-syseeprom -p | hexdump -c
0000000 M S N 2 7 0 0 \n
0000008
root@AE-2700-5-Sonic:#

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

Successfully merging a pull request may close this issue.

1 participant