"IP-address is invalid" when leaving it empty

I am in the middle of setting up a foreman POC environment. I am using the
build-in DNS service, but for dhcp i am using our existing infrastructure.
I had some problems getting the DNS to work, but finally (after finding out
i had to refresh the smart-proxy features and and the DNS-proxy to the
domain it now works.

But now a new problem (that did not occur before) has come:

When i add a new host, i do not want to set the ip (since foreman does not
control my dhcp-server) so i leave it empty. Before setting up dns that
worked fine, but now i get the error:

IP-address is invalid? I can just chose to ignore this, and provision the
server, but then it will come up as a second host with the same hostname as
the one created in foreman, and that aint optimal. Can somebody help me
here?

So the root issue is having DNS without DHCP. Let me walk you through it:

Foreman only mandates an IP when it needs the IP for some part of the
orchestration process. When you have neither DNS or DHCP, it doesn't
need one, so it happily lets you proceed.

When you have DNS, it needs to create the A & PTR DNS record, with is
a link between an IP and an FQDN. Without the IP, Foreman cannot
create the record, so it prompts you for one.

With both DNS and DHCP configured, Foreman can look for a free IP in
the range (by asking the DHCP proxy) and supply it for you, so that
you don't have to come up with one yourself. It then writes a host
reservation for that IP/MAC combination, before writing the DNS
records for the IP/FQDN combination.

In your case, Foreman has no way to save you the task of finding an IP
(via DHCP), but does still need an IP for the DNS, so it insists on
one before proceeding.

The next version of Foreman will contain support for querying IPs from
Foreman's own DB (i.e just <subnet range> - <IPs already in the DB>)
as an alternative to querying the proxy (which also tries to ping
potential IPs, to catch IPs that are taken but not in ISC's lease
file). This internal-db method won't require a DHPC proxy, and thus
may be of use to you.

Hope that explains it,
Greg

··· On 10 November 2014 10:31, Dennis Højgaard wrote: > I am in the middle of setting up a foreman POC environment. I am using the > build-in DNS service, but for dhcp i am using our existing infrastructure. I > had some problems getting the DNS to work, but finally (after finding out i > had to refresh the smart-proxy features and and the DNS-proxy to the domain > it now works. > > But now a new problem (that did not occur before) has come: > > When i add a new host, i do not want to set the ip (since foreman does not > control my dhcp-server) so i leave it empty. Before setting up dns that > worked fine, but now i get the error: > > IP-address is invalid? I can just chose to ignore this, and provision the > server, but then it will come up as a second host with the same hostname as > the one created in foreman, and that aint optimal. Can somebody help me > here?

I can accept that. Thank you very much for elaborating this for me :slight_smile:

··· Den mandag den 10. november 2014 15.43.33 UTC+1 skrev Greg Sutcliffe: > > On 10 November 2014 10:31, Dennis Højgaard > wrote: > > I am in the middle of setting up a foreman POC environment. I am using > the > > build-in DNS service, but for dhcp i am using our existing > infrastructure. I > > had some problems getting the DNS to work, but finally (after finding > out i > > had to refresh the smart-proxy features and and the DNS-proxy to the > domain > > it now works. > > > > But now a new problem (that did not occur before) has come: > > > > When i add a new host, i do not want to set the ip (since foreman does > not > > control my dhcp-server) so i leave it empty. Before setting up dns that > > worked fine, but now i get the error: > > > > IP-address is invalid? I can just chose to ignore this, and provision > the > > server, but then it will come up as a second host with the same hostname > as > > the one created in foreman, and that aint optimal. Can somebody help me > > here? > > So the root issue is having DNS without DHCP. Let me walk you through it: > > Foreman only mandates an IP when it needs the IP for some part of the > orchestration process. When you have neither DNS or DHCP, it doesn't > need one, so it happily lets you proceed. > > When you have DNS, it needs to create the A & PTR DNS record, with is > a link between an IP and an FQDN. Without the IP, Foreman cannot > create the record, so it prompts you for one. > > With both DNS and DHCP configured, Foreman can look for a free IP in > the range (by asking the DHCP proxy) and supply it for you, so that > you don't have to come up with one yourself. It then writes a host > reservation for that IP/MAC combination, before writing the DNS > records for the IP/FQDN combination. > > In your case, Foreman has no way to save you the task of finding an IP > (via DHCP), but does still need an IP for the DNS, so it insists on > one before proceeding. > > The next version of Foreman will contain support for querying IPs from > Foreman's own DB (i.e just - ) > as an alternative to querying the proxy (which also tries to ping > potential IPs, to catch IPs that are taken but not in ISC's lease > file). This internal-db method won't require a DHPC proxy, and thus > may be of use to you. > > Hope that explains it, > Greg >