Hi Adam,

Thank you for reporting this bug, yes, I believe it's worth a code fix - 
"my_ip_facing" in NetworkUtils.pm should return all addresses that matches 
the criteria. I opened xcat bug https://sourceforge.net/p/xcat/bugs/3969/ 
to address this issue.

For your scenario, I think you can try this:

Remove networks.nameservers for the entry as below, networks.nameservers 
is blank, which means to use site.nameservers by default, then makedns can 
work.

"MLAN","10.0.0.0","255.255.0.0","eth0","10.0.0.1","10.0.0.1","10.0.0.1","","10.0.0.1","10.0.0.1","10.0.250.2-10.0.250.254",,,,"<dnsdomain>",,,,


Thx.
Sun Jing






Adam Emerich <aemer...@us.ibm.com> 
2014/01/15 03:09
Please respond to
xCAT Users Mailing list <xcat-user@lists.sourceforge.net>


To
xCAT Users Mailing list <xcat-user@lists.sourceforge.net>, 
cc

Subject
[xcat-user] Makedns seems to be broken in High Availability configured 
xCAT 2.8.3 cluster






"makedns <nodename>" fails with the following message:

"Ignoring host wbire1-en01, it does not belong to any nets defined in 
networks
table or the net it belongs to is configured to use an external 
nameserver."

After doing some digging, I discovered that the subroutine "my_ip_facing" 
in 
NetworkUtils.pm only returns the first address that matches the criteria.
In our case we have eth0 set to 10.0.10.10 on mgmt01 and 10.0.10.11 on 
mgmt02.
We also have a virtual ip on eth0 (etho:xCAT) that moves with the active 
mgmt node
and it is set to 10.0.0.1.  10.0.0.1 is the IP of the xCAT manager in the 
tab files.  In addition,
the nameservers field in the site tab file is set to 
"10.0.0.1,10.0.10.11,10.1.10.10" which
causes the logic in this block of code in ddns.pm:

foreach (@networks)
   {
       if ($_ and $_->{nameservers})
       {
           my $myip = xCAT::NetworkUtils->my_ip_facing($_->{net});
           xCAT::SvrUtils::sendmsg("DEBUG: $_->{net} $myip $sitens 
$_->{nameservers}", $callback);
           unless (($_->{nameservers} eq $myip) || ($_->{nameservers} eq 
'<xcatmaster>') || ($_->{nameservers} eq $sitens))
           {
               $_ = undef;
           }
       }
   }

to return undef for the 10.0.0.0/16 network.

Here is the entry in the networks table for this network:

"MLAN","10.0.0.0","255.255.0.0","eth0","10.0.0.1","10.0.0.1","10.0.0.1","10.0.0.1","10.0.0.1","10.0.0.1","10.0.250.2-10.0.250.254",,,,"<dnsdomain>",,,,

This works on our xCAT 2.6.8 cluster, but the subroutines in 
NetworkUtils.pm have changed significantly from that release.

Thanks
Adam
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
xCAT-user mailing list
xCAT-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xcat-user

<<image/jpeg>>

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
xCAT-user mailing list
xCAT-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xcat-user

Reply via email to