implement timeout in xdsh -K

This commit is contained in:
lissav 2013-08-29 09:12:50 -04:00
parent 856dd30fae
commit f2ded51dec
3 changed files with 4 additions and 7 deletions

View File

@ -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);
}

View File

@ -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'}) {

View File

@ -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);