Project

General

Profile

Bug #9208

DHCP/DNS PTR records already exist error when renaming host

Added by Blaine Gardner over 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

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


Related issues

Has duplicate Hammer CLI - Bug #12049: Can't rebuild an existing host from hammer when it already has a DNS entryDuplicate2015-10-03

Associated revisions

Revision f4d2c186 (diff)
Added by gradzi almost 4 years ago

Fixes #9208 - add option to overwrite conflicts on host changes

Revision dda13dfd
Added by Martin Bacovsky almost 4 years ago

Merge pull request #202 from gairadzi/add_overwrite_option

Fixes #9208 - add option to overwrite conflicts on host changes

History

#1 Updated by Vinny Valdez over 4 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.

#2 Updated by Vinny Valdez over 4 years ago

I listed the rndc steps out of order, it should be:

rndc thaw
rndc reload

#3 Updated by Dominic Cleal almost 4 years ago

  • Has duplicate Bug #12049: Can't rebuild an existing host from hammer when it already has a DNS entry added

#4 Updated by Anonymous almost 4 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF