use ip instead of hostname to new the resolver.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14426 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
sjing 2012-11-26 08:12:39 +00:00
parent 6b8379c8ba
commit 92a8d070c2

View File

@ -1003,7 +1003,8 @@ sub add_or_delete_records {
}
my $zone;
foreach $zone (keys %{$ctx->{updatesbyzone}}) {
my $resolver = Net::DNS::Resolver->new(nameservers=>[$ctx->{nsmap}->{$zone}]);
my $ip = xCAT::NetworkUtils->getipaddr($ctx->{nsmap}->{$zone});
my $resolver = Net::DNS::Resolver->new(nameservers=>[$ip]);
my $entry;
my $numreqs = 300; # limit to 300 updates in a payload, something broke at 644 on a certain sample, choosing 300 for now
my $update = Net::DNS::Update->new($zone);