fix for bug 3991: if the node can not be resolved or ip address is not valid, print warning message and ignore the node

This commit is contained in:
ligc 2014-02-21 12:39:57 -06:00
parent 56e8e8b0d5
commit 54982068cf

View File

@ -288,9 +288,16 @@ sub add_hosts_content {
}
else
{
my $rsp;
push @{$rsp->{data}}, "Invalid IP Addr \'$ref->{ip}\' for node \'$ref->{node}\'.";
xCAT::MsgUtils->message("E", $rsp, $callback);
my $rsp;
if (!$ip)
{
push @{$rsp->{data}}, "Ignoring node \'$nodename\', it can not be resolved.";
}
else
{
push @{$rsp->{data}}, "Ignoring node \'$nodename\', its ip address \'$ip\' is not valid.";
}
xCAT::MsgUtils->message("W", $rsp, $callback);
}
if (defined($ref->{otherinterfaces}))