cancel
Showing results for 
Search instead for 
Did you mean: 

Upgrade failed, script: download failed

Upgrade failed, script: download failed

KD
New Contributor
Exos auto Upgrade script using TCL.

I wanted to upgrade the OS automatically using default.xsf.
The script information seems to be correct, but the log is generated in the last download command and can not be processed.

The TFTP server is OK.
Upgrading to command works well.

I need help. please help me.

script description " default.xsf"////

enable dhcp vlan mgmt
enable cli scripting

set var CLI.OUT " "

set var wait $TCL(after 10)

set var TFTPserver "10.1.112.129"
set var Switchtype "{X440-8p} {X440-48p}"
set var UpgradeOS "summitX-16.1.4.2-patch1-9.xos"

show switch
set var Temp1 $TCL(split ${CLI.OUT} "\n")
set var Temp2 $tcl(lindex $Temp1 1)
set var Temp3 $tcl(split $Temp2 " ")
set var Switch $tcl(lindex $Temp3 10)
delete var Temp2
delete var Temp3

set var Temp2 $tcl(lindex $Temp1 20)
set var Temp3 $tcl(split $Temp2 " ")
set var BootPartition $tcl(lindex $temp3 6)
delete var Temp1
delete var Temp2
delete var Temp3

if ({$BootPartition} == "primary") then
show version image primary
set var temp1 $tcl(split ${CLI.OUT} "\n")
set var temp2 $tcl(lindex $temp1 2)
set var BootpriOS $tcl(lindex $temp2 9)
delete var temp1
delete var temp2
endif
if ({$BootpriOS} == {$UpgradeOS}) then
use image secondary
reboot
endif
if ({$BootPartition} == "secondary") then
show version image secondary
set var temp1 $tcl(split ${CLI.OUT} "\n")
set var temp2 $tcl(lindex $temp1 2)
set var BootsecOS $tcl(lindex $temp2 9)
delete var temp1
delete var temp2
endif
if ({$BootsecOS} == {$UpgradeOS}) then
use image primary
reboot
endif

set var SwitchNum $tcl(llength $Switchtype)

set var i 0

while ($i < $SwitchNum) do
set var switchlist $tcl(lindex $Switchtype $i)
if ({$switchlist} == {$Switch}) then
download image {$TFTPserver} {$downOS} vr vr-mgmt
yes
yes
endif
set var i ($i + 1)
endwhile

if ($i == $SwitchNum) then
disable cli scripting
endif

/// show logs
04/14/2017 02:09:01.60 Download of image finished with status failure -tftp: server error: (2) Could not open requested file for reading

04/14/2017 02:09:01.44 Upgrade failed, script: download failed
04/14/2017 02:09:01.17 Download image from hostname ip address 10.1.112.129 file name summitX-16.1.4.2-patch1-9.xos VR VR-Mgmt

4 REPLIES 4

Stephane_Grosj1
Extreme Employee
Hi,

are you sure you already have an ip on the Mgmt vlan from DHCP? Try to write logs with some info like that to be sure... check also if there's no funny character in the filename (looks the same but ascii code different...).

sorry edit script files.
I have not uploaded the modified script file.
I removed the while statement from the first file.

There is also a problem that the current OS and the target OS can not be compared. it seems to be possible to fix that part.However,it is difficult to find the part where the upgrade does not proceed like the first problem.
// edit script file

enable dhcp vlan mgmt
enable cli scripting

set var CLI.OUT " "

set var wait $TCL(after 30)

set var TFTPserver "10.1.112.129"
set var Switchtype "X440-8p"
set var UpgradeOS "summitX-16.1.4.2-patch1-9.xos"

show switch
set var Temp1 $TCL(split ${CLI.OUT} "\n")
set var Temp2 $tcl(lindex $Temp1 1)
set var Temp3 $tcl(split $Temp2 " ")
set var Switch $tcl(lindex $Temp3 10)
delete var Temp2
delete var Temp3

set var Temp2 $tcl(lindex $Temp1 20)
set var Temp3 $tcl(split $Temp2 " ")
set var BootPartition $tcl(lindex $temp3 6)
delete var Temp1
delete var Temp2
delete var Temp3

if ({$BootPartition} == "primary") then
show version image primary
set var temp1 $tcl(split ${CLI.OUT} "\n")
set var temp2 $tcl(lindex $temp1 2)
set var BootpriOS $tcl(lindex $temp2 9)
delete var temp1
delete var temp2
endif
if ({$BootpriOS} == {$UpgradeOS}) then
use image secondary
endif
if ({$BootPartition} == "secondary") then
show version image secondary
set var temp1 $tcl(split ${CLI.OUT} "\n")
set var temp2 $tcl(lindex $temp1 2)
set var BootsecOS $tcl(lindex $temp2 9)
delete var temp1
delete var temp2
endif
if ({$BootsecOS} == {$UpgradeOS}) then
use image primary
endif

if ({$switch} == {$Switchtype}) then
download image $TFTPserver $UpgradeOS vr vr-mgmt
end if

In your script, the command is: download image {$TFTPserver} {$downOS} vr vr-mgmt $downOS ?

hi,

Yes, MGMT vlan have ip address from dhcp server.

--- log
X440-8p.32 # show vlan-----------------------------------------------------------------------------------------------
Name VID Protocol Addr Flags Proto Ports Virtual
Active router
/Total
-----------------------------------------------------------------------------------------------
Default 1 --------------------------------T---------------- ANY 0 /12 VR-Default
Mgmt 4095 10.1.112.120 /24 ----------------------------- ANY 1 /1 VR-Mgmt
-----------------------------------------------------------------------------------------------

and I guess there is a problem with this syntax.
if ({$switch} == {$Switchtype}) then
download image $TFTPserver $UpgradeOS vr vr-mgmt
end if

because .....

--- log
440-8p.37 # show var----------------------------------------
Count : 15
----------------------------------------

------------------------------------------------------------------
variableName variableValue
-------------------------------- --------------------------------
BootPartition secondary
BootpriOS SIGNATURE_NOT_CHECKED_summitX-15.1.2.12-patch1-6.xos
BootsecOS summitX-15.6.4.2-patch1-7.xos
CLI.ARGC 0
CLI.ARGV0 default.xsf
CLI.OUT No log messages were displayed.

CLI.SCRIPT_TIME_REMAINING 0
CLI.SESSION_TYPE serial
CLI.USER admin
STATUS 0
Switch X440-8p
Switchtype X440-8p
TFTPserver 10.1.112.129
UpgradeOS summitX-16.1.4.2-patch1-9.xos
wait
------------------------------------------------------------------

// From "show var" the values ​​seem to be ok. So i think that the last part of the command is not working properly. But typing command runs ok.

--- log
X440-8p.38 # download image $TFTPserver $UpgradeOS vr vr-mgmt
Note: The inactive partition (primary) will be used for installation.
Do you want to install image after downloading? (y - yes, n - no, - cancel)
Installation cancelled
(ps.I canceled it.)

I do not know why. ㅠ_ㅠ

GTM-P2G8KFN