From dab5a33b3f5b40b2ad2c09c9023371d9a59ca44a Mon Sep 17 00:00:00 2001 From: immarvin Date: Thu, 1 Aug 2013 01:23:45 -0700 Subject: [PATCH] fix defect 3724 makehosts should report error/warning messages when entrys in hosts table are not correct --- xCAT-server/lib/xcat/plugins/hosts.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/hosts.pm b/xCAT-server/lib/xcat/plugins/hosts.pm index c5d34d775..d5e100f5b 100644 --- a/xCAT-server/lib/xcat/plugins/hosts.pm +++ b/xCAT-server/lib/xcat/plugins/hosts.pm @@ -254,6 +254,12 @@ sub add_hosts_content { { addnode $callback, $nodename, $ip, $ref->{hostnames}, $domain; } + else + { + my $rsp; + push @{$rsp->{data}}, "Invalid IP Addr \'$_->{ip}\' for node \'$_->{node}\'."; + xCAT::MsgUtils->message("E", $rsp, $callback); + } if (defined($ref->{otherinterfaces})) { addotherinterfaces $callback, $nodename, $ref->{otherinterfaces}, $domain;