From 293d1c02099e3a0c479798285d028a2a9d9cdb9f Mon Sep 17 00:00:00 2001 From: ligc Date: Mon, 17 Sep 2012 09:17:23 +0000 Subject: [PATCH] fix for bug 3567955: parse the hostname to ip address before indicating more than one xcatmaster for HA SN git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13828 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/aixinstall.pm | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/aixinstall.pm b/xCAT-server/lib/xcat/plugins/aixinstall.pm index e06de7e68..478782a3f 100644 --- a/xCAT-server/lib/xcat/plugins/aixinstall.pm +++ b/xCAT-server/lib/xcat/plugins/aixinstall.pm @@ -11060,11 +11060,20 @@ sub mkdsklsnode if (scalar(keys %xcatmasterhash) ne 1) { - $setuphanfserr++; - my $rsp; - my $xcatmasterstr = join(',', keys %xcatmasterhash); - push @{$rsp->{data}}, "There are more than one xcatmaster for the nodes, the xcatmasters are $xcatmasterstr.\n"; - xCAT::MsgUtils->message("E", $rsp, $callback); + my %masteriphash = (); + foreach my $master (keys %xcatmasterhash) + { + my $xcatmasterip = xCAT::NetworkUtils->getipaddr($master); + $masteriphash{$xcatmasterip} = 1; + } + if (scalar(keys %masteriphash) ne 1) + { + $setuphanfserr++; + my $rsp; + my $xcatmasterstr = join(',', keys %xcatmasterhash); + push @{$rsp->{data}}, "There are more than one xcatmaster for the nodes, the xcatmasters are $xcatmasterstr.\n"; + xCAT::MsgUtils->message("E", $rsp, $callback); + } } my $xcatmasterip = xCAT::NetworkUtils->getipaddr((keys %xcatmasterhash)[0]); my @allips = xCAT::NetworkUtils->gethost_ips();