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

Script crashes if switch is using EOS version 4.23 #6

Open
kosichd opened this issue Apr 7, 2023 · 3 comments
Open

Script crashes if switch is using EOS version 4.23 #6

kosichd opened this issue Apr 7, 2023 · 3 comments

Comments

@kosichd
Copy link

kosichd commented Apr 7, 2023

Trying to use ZTP to boot switches that are running 4.23 out of the box. Boostrap.py crashes with this error:

Apr 6 20:13:02 ZeroTouch: %ZTP-4-EXEC_SCRIPT_FAIL: Config script exited with an error. Error code: 1. Output: =============== Exception raised in '/usr/bin/python /tmp/zt-download ' (PID 29599; PPID 2096) ===============. Local variables by frame (innermost frame last):. File "/tmp/zt-download", line 90, in . cvAddr = 'www.arista.io'. cvproxy = ''. e = ImportError('No module named SysdbHelperUtils',). enrollmentToken =

Which seems to point to point to the below portion of the code. Does this just not work with EOS <4.24? Many switches are still coming out of the box running <4.24. When we upgraded the switch to 4.28, then tried again, the script worked. But this somewhat defeats the purpose of ZTP, where we are using CVaaS to upgrade the EOS once it is moved to the undefinied container.

82 ############## SysdbHelperUtils IMPORT HANDLING ##############
83 # SysdbHelperUtils library is not present in most EOS versions <4.24. Thus in such a
84 # case, we locally upgrade the EOS version and reboot the device. After the upgrade,
85 # EOS version of device must be upgraded and import for SysdbHelperUtils will not fail.
86 try:
87 from SysdbHelperUtils import SysdbPathHelper
88 except ImportError as e:

@toddhsimmons
Copy link

toddhsimmons commented Apr 7, 2023 via email

@sujeethvs
Copy link
Collaborator

sujeethvs commented Jun 2, 2023

Workaround for this is, you could populate eosUrl. This needs to be a http URL pointing to a SWI image hosted on the local network. If eosUrl is populated, the switch gets upgraded with the pointed SWI image if eos version is less than 4.24 during ZTP.

@kosichd
Copy link
Author

kosichd commented Jun 2, 2023

Thanks for the replies on this. I wish Arista would stop shipping new switches with such dated code from manufacturing. However, our account team gave us the workaround that Sujeethvs mentioned and it works fine. Here is the EOS CLI syntax in case others come across this thread and do not have a HTTP server -- you can use a switch to serve up the image. This is executed on the switch that owns 1.1.1.1that you want to use as a HTTP server. Then the ZTP script needs to be populated with 1.1.1.1 for eosURL: as Sujeethvs mentioned:

switch#cli vrf mgmt
switchvrf:mgmt)#bash sudo python3 -m http.server 80 --bind 1.1.1.1 --directory /mnt/flash/
Serving HTTP on 1.1.1.1 port 80 (http://1.1.1.1:80/) ..

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

No branches or pull requests

3 participants