fix -v option in dsh
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2289 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
cdf30a4431
commit
c1043910cf
@ -4008,7 +4008,12 @@ sub runDsh_api
|
||||
$::DSH_API_MESSAGE = "";
|
||||
my $verbose_old = $::VERBOSE;
|
||||
$::VERBOSE = 0;
|
||||
#
|
||||
# execute dsh
|
||||
#
|
||||
$::RUNCMD_RC=0;
|
||||
$::RUNCMD_RC = xCAT::DSHCLI->execute_dsh($optionsRef);
|
||||
|
||||
$::DSH_API = 0;
|
||||
$::VERBOSE = $verbose_old;
|
||||
my $returnCode; #command will exit with this code
|
||||
@ -4045,7 +4050,7 @@ sub runDsh_api
|
||||
{
|
||||
$errmsg = $::DSH_API_MESSAGE;
|
||||
}
|
||||
if (!$DSHCLI::NO_MESSAGES)
|
||||
if ((!$DSHCLI::NO_MESSAGES) && ($::DSH_API_NODES_FAILED))
|
||||
{
|
||||
xCAT::MsgUtils->message(
|
||||
"E",
|
||||
|
@ -724,16 +724,17 @@ sub pping_hostnames
|
||||
|
||||
my $hostname_list = join ",", @hostnames;
|
||||
my @output =
|
||||
xCAT::Utils->runcmd("pping -H $hostname_list", -1);
|
||||
|
||||
xCAT::Utils->runcmd("pping $hostname_list", -1);
|
||||
$::RUNCMD_RC =0; # reset
|
||||
my @no_response = ();
|
||||
foreach my $line (@output)
|
||||
{
|
||||
my ($hostname, $result) = split ':', $line;
|
||||
my ($token, $status) = split ' ', $result;
|
||||
chomp($token);
|
||||
!(($token eq 'ping') && ($status eq '(alive)'))
|
||||
&& (push @no_response, $hostname);
|
||||
if ($token ne 'ping') {
|
||||
push @no_response, $hostname;
|
||||
}
|
||||
}
|
||||
|
||||
return @no_response;
|
||||
|
Loading…
Reference in New Issue
Block a user