No DNS in host being provisioned

Ok, I am probably having a special moment here.

When I try and provision a host (I am using both bare-metal and oVirt) it
fails to download the provision file.

RHEL type distros give me the option to change the URL. I thus change the
FQDN of my Foreman host to its IP address, then the install continues as
I'd expect. It registers with the Puppet master and everything is fine and
dandy. Debian type distros do not give me that option; once the download
fails you have to continue by hand, which sucks.

I have got Bind/ISC DHCP on my network, and they work perfectly. Everything
else gets its DNS info, apart from when in the PXE environment.

For now I am not using a Smart Proxy for DNS/DHCP, is that required for
this? I do not see why, but I'm happy to be enlightened/

OK first of sounds liek you have 2 dhcp servers , does the one you setup
provide a dns server , in other words did you check if what all is provided
by DHCP is enough and also provides all you need ?

I simply think you either get no DNS server entry from your DHCP server or
the wrong one that can not resolve the foreman/pupept server to an ip
adddress.

To the second part ofcourse you can use an otehr DHCP server DNS server
setup , however you can not control the entries directlly then you would
requere a few more steps to "auto" provision.

··· On Saturday, January 4, 2014 7:37:21 PM UTC+1, Chris Cowley wrote: > > Ok, I am probably having a special moment here. > > When I try and provision a host (I am using both bare-metal and oVirt) it > fails to download the provision file. > > RHEL type distros give me the option to change the URL. I thus change the > FQDN of my Foreman host to its IP address, then the install continues as > I'd expect. It registers with the Puppet master and everything is fine and > dandy. Debian type distros do not give me that option; once the download > fails you have to continue by hand, which sucks. > > I have got Bind/ISC DHCP on my network, and they work perfectly. > Everything else gets its DNS info, apart from when in the PXE environment. > > For now I am not using a Smart Proxy for DNS/DHCP, is that required for > this? I do not see why, but I'm happy to be enlightened/ >

Nope, only the one (just ran nmap to make sure).

Even so, if that were the case I'd still expect the issue to intermittent,
but it is not. 100% of the time, my PXE environment has no DNS :-/

I can feel in my bones that this is going to be something so incredibly
stupid

··· On Sunday, 5 January 2014 00:02:37 UTC+1, Jelle B. wrote: > > OK first of sounds liek you have 2 dhcp servers , does the one you setup > provide a dns server , in other words did you check if what all is provided > by DHCP is enough and also provides all you need ? > > I simply think you either get no DNS server entry from your DHCP server or > the wrong one that can not resolve the foreman/pupept server to an ip > adddress. > > To the second part ofcourse you can use an otehr DHCP server DNS server > setup , however you can not control the entries directlly then you would > requere a few more steps to "auto" provision. > > On Saturday, January 4, 2014 7:37:21 PM UTC+1, Chris Cowley wrote: >> >> Ok, I am probably having a special moment here. >> >> When I try and provision a host (I am using both bare-metal and oVirt) it >> fails to download the provision file. >> >> RHEL type distros give me the option to change the URL. I thus change the >> FQDN of my Foreman host to its IP address, then the install continues as >> I'd expect. It registers with the Puppet master and everything is fine and >> dandy. Debian type distros do not give me that option; once the download >> fails you have to continue by hand, which sucks. >> >> I have got Bind/ISC DHCP on my network, and they work perfectly. >> Everything else gets its DNS info, apart from when in the PXE environment. >> >> For now I am not using a Smart Proxy for DNS/DHCP, is that required for >> this? I do not see why, but I'm happy to be enlightened/ >> >

Would you mind posting your dhcpd config? Replacing your ip ranges and
other sensitive data of course…

Do you have manual bindings in your config, eg host {} parts? Maybe you
have different subnets and forgot to provide domain-name-servers in one of
them?
I often find myself typing -server instead of -servers… did you check for
typos? :slight_smile: What does your dhcp log / syslog say when you do a complete
restart of the daemon?

··· On Sunday, January 5, 2014 11:09:35 AM UTC+1, Chris Cowley wrote: > > Nope, only the one (just ran nmap to make sure). > > Even so, if that were the case I'd still expect the issue to intermittent, > but it is not. 100% of the time, my PXE environment has no DNS :-/ > > I can feel in my bones that this is going to be something so incredibly > stupid > > On Sunday, 5 January 2014 00:02:37 UTC+1, Jelle B. wrote: >> >> OK first of sounds liek you have 2 dhcp servers , does the one you setup >> provide a dns server , in other words did you check if what all is provided >> by DHCP is enough and also provides all you need ? >> >> I simply think you either get no DNS server entry from your DHCP server >> or the wrong one that can not resolve the foreman/pupept server to an ip >> adddress. >> >> To the second part ofcourse you can use an otehr DHCP server DNS server >> setup , however you can not control the entries directlly then you would >> requere a few more steps to "auto" provision. >> >> On Saturday, January 4, 2014 7:37:21 PM UTC+1, Chris Cowley wrote: >>> >>> Ok, I am probably having a special moment here. >>> >>> When I try and provision a host (I am using both bare-metal and oVirt) >>> it fails to download the provision file. >>> >>> RHEL type distros give me the option to change the URL. I thus change >>> the FQDN of my Foreman host to its IP address, then the install continues >>> as I'd expect. It registers with the Puppet master and everything is fine >>> and dandy. Debian type distros do not give me that option; once the >>> download fails you have to continue by hand, which sucks. >>> >>> I have got Bind/ISC DHCP on my network, and they work perfectly. >>> Everything else gets its DNS info, apart from when in the PXE environment. >>> >>> For now I am not using a Smart Proxy for DNS/DHCP, is that required for >>> this? I do not see why, but I'm happy to be enlightened/ >>> >>

You could try setting "foreman_url" to the ip of the machine instead of the
name, if you're having DNS issues (note this is now "unattended_url" in the
latest nightlies). You'll find this setting in Settings menu in the UI, and
you'll need to regenerate the PXE file once changed (easiest way is to
cancel build and then re-enable build, from the Host page, to re-write the
file).

This is what I do on setups with no DNS (eg. libvirt virtual networks).

HTH,
Greg