add an error message if mn's hostname can not be resolved.
This commit is contained in:
parent
0f9cd87b13
commit
3e71a82741
@ -621,9 +621,11 @@ sub process_request {
|
||||
$ctx->{resolver} = Net::DNS::Resolver->new(nameservers=>['127.0.0.1']);
|
||||
}
|
||||
|
||||
add_or_delete_records($ctx);
|
||||
my $ret = add_or_delete_records($ctx);
|
||||
unless($ret) {
|
||||
xCAT::SvrUtils::sendmsg("DNS setup is completed", $callback);
|
||||
}
|
||||
|
||||
xCAT::SvrUtils::sendmsg("DNS setup is completed", $callback);
|
||||
umask($oldmask);
|
||||
}
|
||||
|
||||
@ -1077,7 +1079,11 @@ sub add_or_delete_records {
|
||||
}
|
||||
my $zone;
|
||||
foreach $zone (keys %{$ctx->{updatesbyzone}}) {
|
||||
my $ip = xCAT::NetworkUtils->getipaddr($ctx->{nsmap}->{$zone});
|
||||
my $ip = xCAT::NetworkUtils->getipaddr($ctx->{nsmap}->{$zone});
|
||||
if( !defined $ip) {
|
||||
xCAT::SvrUtils::sendmsg([1,"Please make sure $ctx->{nsmap}->{$zone} exist either in /etc/hosts or DNS."], $callback);
|
||||
return 1;
|
||||
}
|
||||
|
||||
my $resolver = Net::DNS::Resolver->new(nameservers=>[$ip]);
|
||||
my $entry;
|
||||
|
Loading…
Reference in New Issue
Block a user