2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-07-28 07:11:11 +00:00

Stop rinstall processing if runimage is invalid (#5447)

This commit is contained in:
Mark Gurevich
2018-08-13 10:53:22 -04:00
committed by yangsong
parent d1bf861f7b
commit ecec67cfca
2 changed files with 9 additions and 1 deletions

View File

@@ -603,7 +603,7 @@ sub setdestiny {
my $cmd = "wget --spider --timeout 3 --tries=1 $path";
my @output = xCAT::Utils->runcmd("$cmd", -1);
unless (grep /^Remote file exists/, @output) {
$callback->({ error => ["Cannot get $path with wget. Could you confirm it's downloadable by wget?"], errorcode => [1], errorabort => [1]});
$callback->({ error => ["Cannot wget $path. Verify it's downloadable."], errorcode => [1], errorabort => [1]});
return;
}
} else {

View File

@@ -365,6 +365,14 @@ sub rinstall {
xCAT::MsgUtils->message("E", $rsp, $callback);
return 1;
}
if ($line =~ /Cannot wget/) {
# If nodeset returns error that runimage can not be downloaded by wget,
# display the error from nodeset (if not alredy displayed by VERBOSE above), stop processing and return.
unless ($VERBOSE) {
xCAT::MsgUtils->message("I", $rsp, $callback);
}
return 1;
}
xCAT::MsgUtils->message("I", $rsp, $callback);
}