- status: open --> closed
Bugs seen while testing
Problem 1 - when not using all mandatory options with the command the script fails with a traceback
kashishg-mac:AU kashishg$ ./accelerated_upgrade.py -l admin -p C1sco123 -d 10.52.234.37 -f /
Mandatory option 'Repository path' is missing
['10.52.234.37']
['10.52.234.37']
Connecting to 10.52.234.37 using telnet 10.52.234.37
Sending login admin 0 Trying 10.52.234.37...
Connected to bdlk1-b12-asr9006-02.cisco.com.
Escape character is '^]'.
User Access Verification
Username:
^Ccommand file is None
^]q
^C^C
Setting term len to zero 1
++++++++++++++++++++ (1) (('PreUpgrade', 'PostUpgrade')) Check ++++++++++++++++++++
Starting => Node Status Check......
Checking states of all nodes...
Node should be in one of the following state:
a) IOS XR RUN
b) PRESENT
c) UNPOWERED
^C^C^]q
^^^^^^^^^C^C^CAll nodes are in correct state...
Passed => Node Status Check..
++++++++++++++++++++ (2) (PreUpgrade) Check ++++++++++++++++++++
Starting => Ping Check......
Couldn't ping, package repository path is not provided
Failed => Ping Check..
Traceback (most recent call last):
File "./accelerated_upgrade.py", line 518, in <module>
main()
File "./accelerated_upgrade.py", line 89, in main
threads[i].join()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 664, in join
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 244, in wait
KeyboardInterrupt
kashishg-mac:AU kashishg$
Problem 2 - WHen an incorrect path was given to the -r option the script aborts with a traceback
kashishg-mac:AU kashishg$ ./accelerated_upgrade.py -l admin -p C1sco123 -d 10.52.234.37 -r ./Repository/ -f ./Packagelist.rtf --pre-upgrade-checks-only
['10.52.234.37']
['10.52.234.37']
Connecting to 10.52.234.37 using telnet 10.52.234.37
Sending login admin 0 Trying 10.52.234.37...
Connected to bdlk1-b12-asr9006-02.cisco.com.
Escape character is '^]'.
User Access Verification
Username:
command file is None
Setting term len to zero 1
++++++++++++++++++++ (1) (('PreUpgrade', 'PostUpgrade')) Check ++++++++++++++++++++
Starting => Node Status Check......
Checking states of all nodes...
Node should be in one of the following state:
a) IOS XR RUN
b) PRESENT
c) UNPOWERED
All nodes are in correct state...
Passed => Node Status Check..
++++++++++++++++++++ (2) (PreUpgrade) Check ++++++++++++++++++++
Starting => Ping Check......
Exception in thread command_exec:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 552, in __bootstrap_inner
File "./accelerated_upgrade.py", line 461, in run
apply(self.func, self.args)
File "./accelerated_upgrade.py", line 356, in command_exec
run_status = blast_plugins(host, options)
File "./accelerated_upgrade.py", line 508, in blast_plugins
status=PluginsManager.start(kwargs)
File "/Users/kashishg/AU/lib/plugins_manager.py", line 247, in start
status = i.start(kwargs)
File "/Users/kashishg/AU/plugins/ping_test.py", line 52, in start
cmd = "ping "+ipaddr[0]
IndexError: list index out of range
Total host that passed 1
10.52.234.37 Total elapsed time : 1m 57s
kashishg-mac:AU kashishg$
Problem 3 - If we cannot reach the tftp server it does not give more error information as to why the Ping test failed.
kashishg-mac:AU kashishg$ ./accelerated_upgrade.py -l admin -p C1sco123 -d 10.52.234.37 -r tftp://10.52.230.63 -f ./Packagelist.rtf --pre-upgrade-checks-only
['10.52.234.37']
['10.52.234.37']
Connecting to 10.52.234.37 using telnet 10.52.234.37
Sending login admin 0 Trying 10.52.234.37...
Connected to bdlk1-b12-asr9006-02.cisco.com.
Escape character is '^]'.
User Access Verification
Username:
command file is None
Setting term len to zero 1
++++++++++++++++++++ (1) (('PreUpgrade', 'PostUpgrade')) Check ++++++++++++++++++++
Starting => Node Status Check......
Checking states of all nodes...
Node should be in one of the following state:
a) IOS XR RUN
b) PRESENT
c) UNPOWERED
All nodes are in correct state...
Passed => Node Status Check..
++++++++++++++++++++ (2) (PreUpgrade) Check ++++++++++++++++++++
Starting => Ping Check......
Failed => Ping Check..
Total host that passed 1
10.52.234.37 Total elapsed time : 1m 57s
FIXED THIS BY CHANGING ping_test.py file.
if (out.find('Success rate is 0') != -1 or out.find('Bad hostname or protocol not running') != -1 or out.find('UUUUU') != -1): print "Could not ping the TFTP server address.Check connectivity" ( newline added) return -1
Problem 4 - No where to specify the vrf to use to reach the TFTP server. Used a workaround but need a better solution to pass the VRF.
I fixed this manually by changing the ping_test.py script.
if ( len(list[0]) if list[0] else list[1] in protocol): #cmd="run ping -p 0xf -z 0xa "+ipaddr[0] cmd = "ping vrf Mgmt-intf"+ipaddr[0]