add some code to check if the nodes exist in /etc/hosts. bug2689638
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3060 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
ec05a6c0b4
commit
233b67e87e
@ -166,7 +166,16 @@ sub process_request {
|
||||
my %unknownnodes;
|
||||
foreach (@nodes) {
|
||||
$unknownnodes{$_}=1;
|
||||
my $packed_ip = undef;
|
||||
$packed_ip = gethostbyname($_);
|
||||
if( !defined $packed_ip) {
|
||||
my %rsp;
|
||||
$rsp{name}=[$_];
|
||||
$rsp{data} = [ "Please make sure $_ exists in /etc/hosts" ];
|
||||
$callback->({node=>[\%rsp]});
|
||||
}
|
||||
}
|
||||
|
||||
my $node;
|
||||
my $fping;
|
||||
open($fping,"fping ".join(' ',@nodes). " 2> /dev/null|") or die("Can't start fping: $!");
|
||||
|
Loading…
Reference in New Issue
Block a user