From d5609b9ca85ef4f67015ea6aee2682e77e4ce3ce Mon Sep 17 00:00:00 2001 From: immarvin Date: Thu, 8 Aug 2013 21:32:03 -0700 Subject: [PATCH] fix defect 3734 makehosts throw exceptions when node ip is not illegal --- xCAT-server/lib/xcat/plugins/hosts.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/hosts.pm b/xCAT-server/lib/xcat/plugins/hosts.pm index 1c46e4ed3..c17b48584 100644 --- a/xCAT-server/lib/xcat/plugins/hosts.pm +++ b/xCAT-server/lib/xcat/plugins/hosts.pm @@ -252,6 +252,13 @@ sub add_hosts_content { { addnode $callback, $nodename, $ip, $ref->{hostnames}, $domain; } + else + { + my $rsp; + push @{$rsp->{data}}, "Invalid IP Addr \'$ref->{ip}\' for node \'$ref->{node}\'."; + xCAT::MsgUtils->message("E", $rsp, $callback); + } + if (defined($ref->{otherinterfaces})) { addotherinterfaces $callback, $nodename, $ref->{otherinterfaces}, $domain;