Project

General

Profile

Actions

Bug #9208

closed

DHCP/DNS PTR records already exist error when renaming host

Added by Blaine Gardner almost 10 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

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 1 (0 open1 closed)

Has duplicate Hammer CLI - Bug #12049: Can't rebuild an existing host from hammer when it already has a DNS entryDuplicate10/03/2015Actions
Actions #1

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.

Actions #2

Updated by Vinny Valdez over 9 years ago

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

rndc thaw
rndc reload

Actions #3

Updated by Dominic Cleal about 9 years ago

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

Updated by Anonymous about 9 years ago

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

Also available in: Atom PDF