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
This commit is contained in:
ligc 2012-09-17 09:17:23 +00:00
parent 6fb54f8730
commit 293d1c0209

View File

@ -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();