Dhcp not updating dns?

Hi,

After a fresh installation of foreman 1.5.2, it appears the dhcp entries
are not added to the dns.

Error: Host node1.test.nu failed: getaddrinfo: Name or service not known

In dhcpd.conf (deployed through foreman-installer, I see the following line:

ddns-update-style none;

Kind regards,

Jorick Astrego

Oh yeah, I tried it with:

ddns-update-style interim;
ignore client-updates;
authoritative;

As the manual instructions also, but it didn't work…

Kind regards,
Jorick

··· On 08/01/2014 04:00 PM, Jorick Astrego wrote: > Hi, > > After a fresh installation of foreman 1.5.2, it appears the dhcp > entries are not added to the dns. > > Error: Host node1.test.nu failed: getaddrinfo: Name or service not known > > In dhcpd.conf (deployed through foreman-installer, I see the following > line: > > ddns-update-style none; > > Kind regards, > > Jorick Astrego > >

I'm seeing the same behaviour on Fedora19 with Fedora 1.5.2, installation
done from a vanilla F19 build then as per the quickstart guide at
http://www.theforeman.org/manuals/1.5/index.html#2.Quickstart.

It looks like there's a variable '$dnsupdatekey' that isn't set that
results in the dhcpd.conf not being written fully.

/usr/share/foreman-installer/modules/dhcp/README.md
suggests that this should be set to to the full path to the keyfile
dnsupdatekey => "/etc/bind/keys.d/$ddnskeyname",

Looks like for me this would be /etc/rndc.key

Does anyone know where that should be set? manuals/google search don't
seem to have much to say about it.

I see that in /usr/share/foreman-installer/modules/dhcp/manifests/init.pp
$dnskeyname = 'rndc-key',
$dnsupdatekey = undef,

and /usr/share/foreman-installer/modules/dhcp/templates/dhcpd.conf.erb
<% if has_variable?( 'dnsupdatekey' ) and @dnsupdatekey -%>
ddns-updates on;
ddns-update-style interim;
update-static-leases on;
use-host-decl-names on;

Key from bind

include "<%= @dnsupdatekey %>";
<% @dnsdomain.each do |dom| -%>
zone <%= dom %>. {
primary <%= @nameservers.first %>;
key <%= @dnskeyname%>;
}
<% end -%>
<% else %>
ddns-update-style none;
<% end -%>

which is possibly why 'forman-installer --foreman-proxy-dhcp=true …' is
creating a dhcpd.conf with ddns-update-style none set

Here's the diff that got DDNS going for me, but I'm still digging as to how
to configure things properly.

[root@f19foreman foreman]# diff /etc/dhcp/dhcpd.conf*
8,13c8
< ddns-updates on;
< ddns-update-style interim;
< ignore client-updates;
< authoritative;
< include "/etc/rndc.key";
<

··· --- > ddns-update-style none;

then restart dhcpd and build a new node.

On Friday, 1 August 2014 15:19:22 UTC+1, Jorick Astrego wrote:

On 08/01/2014 04:00 PM, Jorick Astrego wrote:

Hi,

After a fresh installation of foreman 1.5.2, it appears the dhcp
entries are not added to the dns.

Error: Host node1.test.nu failed: getaddrinfo: Name or service not
known

In dhcpd.conf (deployed through foreman-installer, I see the following
line:

ddns-update-style none;

Kind regards,

Jorick Astrego

Oh yeah, I tried it with:

ddns-update-style interim;
ignore client-updates;
authoritative;

As the manual instructions also, but it didn’t work…

Kind regards,
Jorick