Ubuntu 13.10 support. makedns -n failed as below:
root@c111bc2n12:/iso# makedns -n
Handling c111bc2n12 in /etc/hosts.
Handling c111bc2n10 in /etc/hosts.
Handling c111bc2n09 in /etc/hosts.
Handling localhost.localdomain in /etc/hosts.
Handling c111bc2n11 in /etc/hosts.
Handling localhost6.localdomain6 in /etc/hosts.
Handling c111bc2mm1 in /etc/hosts.
Getting reverse zones, this may take several minutes for a large cluster.
Completed getting reverse zones.
Updating zones.
Completed updating zones.
Restarting bind9
Restarting named complete
Updating DNS records, this may take several minutes for a large cluster.
Error: ddns plugin bug, pid 16712, process description: 'xCATd SSL: makedns for root@localhost.localdomain: ddns instance' with error 'unexpected null domain label at /usr/lib/perl5/Net/DNS/Question.pm line 81
The debug result is as below:
libnet-dns-perl shipped in Ubuntu 13.10 is 0.68-1.2. And there is a bug of this package.
This bug is caused by the upgrade of package libnet-dns-perl, on ubuntu 12.04, its version is 0.66-2ubuntu3, while on ubuntu 13.10, it's 0.68-1.2.
The implementation is different for "sub new() " in /usr/lib/perl5/Net/DNS/Question.pm:
In 0.68-1.2:
$self->{name} = new Net::DNS::DomainName1035($qname);
$self->{type} = Net::DNS::typesbyname( $qtype || 'A' );
$self->{class} = Net::DNS::classesbyname( $qclass || 'IN' );
In 0.66-2ubuntu3:
$self->{qname} = $qname;
$self->{qtype} = ( $qtype || 'A' );
$self->{qclass} = ( $qclass || 'IN' );
So for the same xcat calls, ubuntu 13.10 reports the stack:
unexpected null domain label at /usr/lib/perl5/Net/DNS/Question.pm line 81
at /usr/lib/perl5/Net/DNS/Domain.pm line 106
Net::DNS::Domain::new('Net::DNS::DomainName1035', '.ppd.pok.ibm.com.') called at /usr/lib/perl5/Net/DNS/Question.pm line 81
Net::DNS::Question::new('Net::DNS::Question', '.ppd.pok.ibm.com.', 'NS') called at /usr/lib/perl5/Net/DNS/Packet.pm line 90
Net::DNS::Packet::new('Net::DNS::Packet', '.ppd.pok.ibm.com.', 'NS') called at /usr/lib/perl5/Net/DNS/Resolver/Base.pm line 1094
Net::DNS::Resolver::Base::make_query_packet('Net::DNS::Resolver=HASH(0x9f3faf8)', '.ppd.pok.ibm.com.', 'NS') called at /usr/lib/perl5/Net/DNS/Resolver/Base.pm line 487
Net::DNS::Resolver::Base::send('Net::DNS::Resolver=HASH(0x9f3faf8)', '.ppd.pok.ibm.com.', 'NS') called at /usr/lib/perl5/Net/DNS/Resolver/Base.pm line 478
Net::DNS::Resolver::Base::query('Net::DNS::Resolver=HASH(0x9f3faf8)', '.ppd.pok.ibm.com.', 'NS') called at /opt/xcat/lib/perl/xCAT_plugin/ddns.pm line 1239
xCAT_plugin::ddns::find_nameserver_for_dns('HASH(0x27f9e10)', '.ppd.pok.ibm.com.') called at /opt/xcat/lib/perl/xCAT_plugin/ddns.pm line 1134
xCAT_plugin::ddns::add_or_delete_records('HASH(0x27f9e10)') called at /opt/xcat/lib/perl/xCAT_plugin/ddns.pm line 681
xCAT_plugin::ddns::process_request('HASH(0x926be0)', 'CODE(0x1052b60)', 'CODE(0x103e650)') called at /opt/xcat/lib/perl/xCAT/Client.pm line 800
xCAT::Client::dispatch_request('HASH(0x926be0)', 'CODE(0x1052b60)', 'ddns') called at /opt/xcat/lib/perl/xCAT/Client.pm line 676
xCAT::Client::plugin_command('HASH(0x926be0)', undef, 'CODE(0x1052b60)') called at /opt/xcat/lib/perl/xCAT/Client.pm line 192
xCAT::Client::submit_request('HASH(0x926be0)', 'CODE(0x1052b60)') called at /opt/xcat/sbin/makedns line 101
I think this should be a ubuntu bug, but since 13.10 is not a LTS, could you use the latest libnet-dns-perl and have a try? If it can work with the latest version, then we can document this as a known issue and provide the users a workaround.
Thx.
I tested 0.66 version on 13.10, it works.
root@c111bc2n12:/home# dpkg -i libnet-dns-perl_0.66-2ubuntu3_amd64.deb
dpkg: warning: downgrading libnet-dns-perl from 0.68-1.2 to 0.66-2ubuntu3
(Reading database ... 70033 files and directories currently installed.)
Preparing to replace libnet-dns-perl 0.68-1.2 (using libnet-dns-perl_0.66-2ubuntu3_amd64.deb) ...
Unpacking replacement libnet-dns-perl ...
Setting up libnet-dns-perl (0.66-2ubuntu3) ...
Processing triggers for man-db ...
root@c111bc2n12:/home# dpkg -l |grep libnet-dns-perl
ii libnet-dns-perl 0.66-2ubuntu3 amd64 Perform DNS queries from a Perl script
root@c111bc2n12:/home# makedns -n
Handling c111bc2n12 in /etc/hosts.
Handling c111bc2n10 in /etc/hosts.
Handling c111bc2n09 in /etc/hosts.
Handling localhost.localdomain in /etc/hosts.
Handling c111bc2n11 in /etc/hosts.
Handling localhost6.localdomain6 in /etc/hosts.
Handling c111bc2mm1 in /etc/hosts.
Getting reverse zones, this may take several minutes for a large cluster.
Completed getting reverse zones.
Updating zones.
Completed updating zones.
Restarting bind9
Restarting named complete
Updating DNS records, this may take several minutes for a large cluster.
Completed updating DNS records.
Nodes can be resolved on this mn.
YinLe,
Please add this known issue into xcat release note once we announce the support for the Ubuntu 13.10, and list the workaround together.
Thx.
hi, this defect can be reproduced on rhels7.0-snapshot 6, which ships
perl-Net-DNS-0.72-5.el7.ppc64
This problem can be workarounded if the first "." in domain string ".ppd.pok.ibm.com." is deleted.
Can someone take a look at our makedns code to see if it is appropriate to delete the starting "." ?
I have taken a look at this issue yesterday, I have listed my debug informations in #1961, so the main changes is redhat7 and ubuntu13 are expecting the domain as for example, "cluster.com", but originally it's ".cluster.com", so I think a easy fix could be to check
if the os is ubuntu13 or redhat7 or above, then do not add '.' before $domain.
For example
in ddns.pm
unless ($domain =~ /^./) { $domain = '.'.$domain; }
if the os is ubuntu13 or redhat7 or above, then do not add '.' before $domain.
But on the other way, I'm thinking maybe we need to know why the interface of libnet-dns-perl changes, I assume the interface should be backward compatible even the version is upgraded, so maybe it's worth to get an official reply about this change from LTC ?
I found make the domain name has not '.' at beginning of name can work for both old and new version of Net-DNS perl module, so I made the change that keep domain name to be without . at beginning.
d8dedfb
4abeecb
Xiao Peng please verify and close