implement timeout in xdsh -K
This commit is contained in:
parent
ac79179400
commit
28fba7f066
@ -4185,7 +4185,7 @@ sub parse_and_run_dsh
|
||||
#
|
||||
# setup ssh keys on the nodes or ib switch
|
||||
#
|
||||
my $rc = xCAT::TableUtils->setupSSH($options{'nodes'});
|
||||
my $rc = xCAT::TableUtils->setupSSH($options{'nodes'},$options{'timeout'});
|
||||
my @results = "return code = $rc";
|
||||
return (@results);
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ package xCAT::RemoteShellExp;
|
||||
exit 2 - usage error
|
||||
|
||||
Examples:
|
||||
$rc=xCAT::RemoteShellExp->remoteshellexp("k",$callback,$remoteshellcmd,$timeout);
|
||||
$rc=xCAT::RemoteShellExp->remoteshellexp("k",$callback,$remoteshellcmd,$nodes,$timeout);
|
||||
$rc=xCAT::RemoteShellExp->remoteshellexp("s",$callback,$remoteshellcmd,$nodes,$timeout);
|
||||
$rc=xCAT::RemoteShellExp->remoteshellexp("t",$callback,$remoteshellcmd,$nodes,$timeout);
|
||||
|
||||
@ -96,10 +96,6 @@ sub remoteshellexp
|
||||
$expecttimeout=$timeout;
|
||||
}
|
||||
|
||||
my $rsp = {};
|
||||
$rsp->{data}->[0] =
|
||||
"Timeout is $expecttimeout.";
|
||||
xCAT::MsgUtils->message("D", $rsp, $::CALLBACK);
|
||||
# for -s flag must have nodes and a $to_userid password
|
||||
my $to_user_password;
|
||||
if ($ENV{'DSH_REMOTE_PASSWORD'}) {
|
||||
|
@ -350,8 +350,9 @@ sub setupSSH
|
||||
}
|
||||
|
||||
# generates new keys for root, if they do not already exist
|
||||
# nodes not used on this option but in there to preserve the interface
|
||||
my $rc=
|
||||
xCAT::RemoteShellExp->remoteshellexp("k",$::CALLBACK,$::REMOTE_SHELL,$expecttimeout);
|
||||
xCAT::RemoteShellExp->remoteshellexp("k",$::CALLBACK,$::REMOTE_SHELL,$n_str,$expecttimeout);
|
||||
if ($rc != 0) {
|
||||
$rsp->{data}->[0] = "remoteshellexp failed generating keys.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::CALLBACK);
|
||||
|
Loading…
Reference in New Issue
Block a user