Bug #9208
closedDHCP/DNS PTR records already exist error when renaming host
Description
When executing the hammer command
hammer host update {--id ##,--name old-name} --name new-name
The output is:
Could not update the host:
Conflict DHCP records <fqdn>-<mac>/<ip> already exists
Conflict DNS PTR Records <ip>/<fqdn> already exists
There is a relevant bug which has been fixed for REST calls here:
http://projects.theforeman.org/issues/6998
The Foreman GUI issues the error as well but allows an overwrite.
It seems to me that the hammer cli should have an 'overwrite' option exposed so that hosts can be renamed despite these warnings/errors. e.g.,
hammer host update --overwrite true {--id ##,--name old-name} --name new-name
Updated by Vinny Valdez over 9 years ago
Agree, I hit this as well. I had to rename a large number of hosts. Here's the work-around I used:
- Remove all host A and PTR records from /var/named/dynamic/db.{forward,reverse}
rndc freeze
# edit zone files and remove records
rndc reload
rndc thaw
- Remove all DHCP lease entries for relevant hosts in /var/lib/dhcp/dhcpd.leases
systemctl restart dhcpd
Now there is no conflicting records and hammer host update can rename the hosts and add records.
Updated by Vinny Valdez over 9 years ago
I listed the rndc steps out of order, it should be:
rndc thaw
rndc reload
Updated by Dominic Cleal almost 9 years ago
- Has duplicate Bug #12049: Can't rebuild an existing host from hammer when it already has a DNS entry added
Updated by Anonymous almost 9 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
Applied in changeset hammer-cli-foreman|f4d2c186348a223a8814462af3c8b01787e79162.