Foreman DNS Problem

I am having some issues when provisioning a new server with foreman and it
appears that the problem is related to the DNS configuration.

My error message is similar to the one described here:
http://projects.theforeman.org/issues/3531

The recommendation from Dominic was: This suggests one of your
authoritative DNS servers is unavailable. Double check NS addresses in your
zones, as well as the server specified in the zone SOA and ensure they're
answering queries from Foreman.

Problem is that I don't know how to validate that my DNS is working
correctly.

I did install the DNS service via the katello-intall as follows:

katello-installer --foreman-authentication=true --capsule-tftp=true
–capsule-tftp-servername="192.168.2.150" --capsule-dhcp=true
–capsule-dhcp-gateway="10.10.10.10" --capsule-dhcp-interface="eth1"
–capsule-dhcp-range="10.10.10.20 10.10.10.200" *–capsule-dns=true
–capsule-dns-forwarders "10.10.10.10" --capsule-dns-interface="eth1"
–capsule-dns-reverse="10.10.10.in-addr.arpa" --capsule-dns-zone "hq.ltg" *

This machine has two interfaces: 192.168.2.150 eth0 and 10.10.10.10 eth1

And the foreman-proxy/proxy.log states:
When selecting the network, it looks for an available IP
D, [2014-06-12T00:56:11.229797 #10222] DEBUG – : Reading config file
/etc/dhcp/dhcpd.conf
D, [2014-06-12T00:56:11.230044 #10222] DEBUG – : Reading config file
/etc/dhcp/dhcpd.hosts
D, [2014-06-12T00:56:11.230207 #10222] DEBUG – : Loading subnets for
127.0.0.1
D, [2014-06-12T00:56:11.230356 #10222] DEBUG – : Added
10.10.10.0/255.255.255.0 to 127.0.0.1
D, [2014-06-12T00:56:11.230609 #10222] DEBUG – : Loading subnet data for
10.10.10.0/255.255.255.0
I, [2014-06-12T00:56:11.230924 #10222] INFO – : Enumerated hosts on
10.10.10.0
D, [2014-06-12T00:56:11.231003 #10222] DEBUG – : Lazy loaded
10.10.10.0/255.255.255.0 records
D, [2014-06-12T00:56:11.231101 #10222] DEBUG – : trying to find an ip
address, we got {:to=>"10.10.10.50", :from=>"10.10.10.20",
:mac=>"00:50:56:83:DA:EF"}
D, [2014-06-12T00:56:11.233591 #10222] DEBUG – : Searching for free IP -
pinging 10.10.10.23
D, [2014-06-12T00:56:13.258717 #10222] DEBUG – : Found free IP 10.10.10.23
out of a total of 31 free IPs

And when hitting submit to create the Host, it gives me the error:
D, [2014-06-12T00:57:31.295306 #10222] DEBUG – : Reading config file
/etc/dhcp/dhcpd.conf
D, [2014-06-12T00:57:31.295976 #10222] DEBUG – : Reading config file
/etc/dhcp/dhcpd.hosts
D, [2014-06-12T00:57:31.296242 #10222] DEBUG – : Loading subnets for
127.0.0.1
D, [2014-06-12T00:57:31.296428 #10222] DEBUG – : Added
10.10.10.0/255.255.255.0 to 127.0.0.1
D, [2014-06-12T00:57:31.296729 #10222] DEBUG – : Loading subnet data for
10.10.10.0/255.255.255.0
I, [2014-06-12T00:57:31.297127 #10222] INFO – : Enumerated hosts on
10.10.10.0
D, [2014-06-12T00:57:31.297228 #10222] DEBUG – : Lazy loaded
10.10.10.0/255.255.255.0 records

E, [2014-06-12T00:57:31.297416 #10222] ERROR – : Record
10.10.10.0/00:50:56:83:da:ef not found
D, [2014-06-12T00:57:31.361010
#10222] DEBUG – : Reading config file /etc/dhcp/dhcpd.conf
D, [2014-06-12T00:57:31.361270 #10222] DEBUG – : Reading config file
/etc/dhcp/dhcpd.hosts
D, [2014-06-12T00:57:31.361454 #10222] DEBUG – : Loading subnets for
127.0.0.1
D, [2014-06-12T00:57:31.361626 #10222] DEBUG – : Added
10.10.10.0/255.255.255.0 to 127.0.0.1
D, [2014-06-12T00:57:31.362011 #10222] DEBUG – : Loading subnet data for
10.10.10.0/255.255.255.0
I, [2014-06-12T00:57:31.362305 #10222] INFO – : Enumerated hosts on
10.10.10.0
D, [2014-06-12T00:57:31.362408 #10222] DEBUG – : Lazy loaded
10.10.10.0/255.255.255.0 records

E, [2014-06-12T00:57:31.362642 #10222] ERROR – : Record
10.10.10.0/10.10.10.23 not found

Hope you can guide me in the correct direction.

IB

Hey,

I don't follow full conversation, but if you ask this:

> Problem is that I don't know how to validate that my DNS is working
> correctly.

Then my answer would be:

foreman_host$ host www.google.com
www.google.com has address 173.194.112.83

If that does not work, check your /etc/resolv.conf…

··· -- Later,

Lukas “lzap” Zapletal
irc: lzap #theforeman

I should have explained better my setup :slight_smile:

The foreman server has two NICs, connected to two different networks. The first NIC eth0 is connected to the internal office network and gets it name resolution from another DNS server. Thus the foreman server is able to find google and such.

The second NIC is connected to a restricted network that does not have connectivity to the external world. The idea is that foreman is able to provision the servers in this network and that the katello plugin installed on the foreman server provides the content for this restricted network as well. To do this, I enabled smart proxy on the foreman server with DHCP, DNS and TFTP services that supposedly provide these services through the eth1 interface only.

A new server installed in the restricted network obtains DHCP from foreman proxy and downloads the images in the TFTP server. But when trying to provision the server that's when the error appears.

IB

··· > On Jun 12, 2014, at 7:43 AM, Lukas Zapletal wrote: > > Hey, > > I don't follow full conversation, but if you ask this: > >> Problem is that I don't know how to validate that my DNS is working >> correctly. > > Then my answer would be: > > foreman_host$ host www.google.com > www.google.com has address 173.194.112.83 > > If that does not work, check your /etc/resolv.conf... > > -- > Later, > > Lukas "lzap" Zapletal > irc: lzap #theforeman > > -- > You received this message because you are subscribed to a topic in the Google Groups "Foreman users" group. > To unsubscribe from this topic, visit https://groups.google.com/d/topic/foreman-users/25DDQyaORsA/unsubscribe. > To unsubscribe from this group and all its topics, send an email to foreman-users+unsubscribe@googlegroups.com. > To post to this group, send email to foreman-users@googlegroups.com. > Visit this group at http://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/d/optout.

Hmmm, try to locate 10.10.10.0/00:50:56:83:da:ef record in your subnet.
Also paste Foreman logs to see if this error occurred when DHCP
reservation was done.

··· -- Later,

Lukas “lzap” Zapletal
irc: lzap #theforeman