mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-09-06 02:08:25 +00:00
Provide error message should fping be missing
This commit is contained in:
@@ -797,7 +797,9 @@ sub process_request_port {
|
||||
my $node;
|
||||
my $fping;
|
||||
open($fping, "fping " . join(' ', @nodes) . " 2> /dev/null|") or die("Can't start fping: $!");
|
||||
my $havefping = 0;
|
||||
while (<$fping>) {
|
||||
$havefping = 1;
|
||||
my %rsp;
|
||||
my $node = $_;
|
||||
$node =~ s/ .*//;
|
||||
@@ -810,6 +812,12 @@ sub process_request_port {
|
||||
$status->{$node}->{'status'} = "nosuchhost";
|
||||
}
|
||||
}
|
||||
unless ($havefping) {
|
||||
my $rsp = {};
|
||||
$rsp->{error}->[0] =
|
||||
"Unable to find fping on system, must install fping package to use nodestat -f";
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback, 1);
|
||||
}
|
||||
}
|
||||
|
||||
return $status;
|
||||
|
Reference in New Issue
Block a user