I have discovered 2 bugs with dhcp reservations in Katello 2.2.
Bug #1) Deleting a host from the all hosts list no longer deletes its dhcp
reservation. Attempting to create another host with the same name leads to
an error that the dhcp reservation already exists, and all steps get rolled
back. This leads to a further bug where if you try to immediately
re-create the host, the last step of it's provisioning process dissapears,
so it may provision the host, but if its a vmware host it will not power on
the VM (which is its last step). If you manually delete the dhcp lease
from the dhcp leases file and restart the dhcp server, all steps happen
successfully and the host is powered up at the end of the provisioning.
Bug #2)If a reservation exists in the dhcp leases file for a discovery host
when that host tries to register, it will get a foreman 500 error something
like 'katello mac delegated to primary interface but primary interface is
nil"
If you manually delete the lease, restart the dhcp server, you can
successfully boot the discovery host and have it show up in the discovered
hosts list.
> Bug #1) Deleting a host from the all hosts list no longer deletes its dhcp
> reservation. Attempting to create another host with the same name leads to
> an error that the dhcp reservation already exists, and all steps get rolled
> back. This leads to a further bug where if you try to immediately
> re-create the host, the last step of it's provisioning process dissapears,
> so it may provision the host, but if its a vmware host it will not power on
> the VM (which is its last step). If you manually delete the dhcp lease
> from the dhcp leases file and restart the dhcp server, all steps happen
> successfully and the host is powered up at the end of the provisioning.
need to see logs. Can you file an issue?
Same name should not cause DHCP duplication.
> Bug #2)If a reservation exists in the dhcp leases file for a discovery host
> when that host tries to register, it will get a foreman 500 error something
> like 'katello mac delegated to primary interface but primary interface is
> nil"
> If you manually delete the lease, restart the dhcp server, you can
> successfully boot the discovery host and have it show up in the discovered
> hosts list.
I was going to file an issue report but then I'm having trouble re-creating
this issue.
Here is what I can re-create : When I delete a host and re-create a host
with the same name, it fills up the dhcp laeases file with entries for that
host.
On Friday, this was causing an error, but today the system seems perfectly
content to re-create the hosts and just leave the extra entries in the
leases file.
Here is my leases file. Let me know if this is expected behavior please.
If it isn't, I'll file an issue.
[root@katello dhcpd]# cat dhcpd.leases
The format of this file is documented in the dhcpd.leases(5) manual page.
I see 3 entries for fedora20client, 4 for centos6client, and 3 for
centos7client.
Having 2 entries for a client, plus a strange entry with the only content
being 'dynamic; deleted' is not extra entries?
···
On Tuesday, April 21, 2015 at 12:14:36 AM UTC-7, Lukas Zapletal wrote:
>
> > Here is my leases file. Let me know if this is expected behavior
> please.
> > If it isn't, I'll file an issue.
>
> I don't see any problem in the leases file. There are no extra entries
> as well.
>
> --
> Later,
> Lukas #lzap Zapletal
>