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:
@@ -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 {
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user