Project

General

Profile

Actions

Bug #6998

closed

Cannot rename host by API due to DHCP conflict - cannot set 'overwrite' flag

Added by Aaron Stone over 9 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
API
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Steps in UI:
In the Foreman UI, rename a host.
Foreman shows a DHCP conflict for the MAC Address to the old name.
Click the Overwrite button.

Steps in API:
Submit form to /api/hosts/hostid with content {"name": "newname"} and an APIv2 header version
Receive error message {"error"=>{"full_messages"=>["Conflict DHCP records spare-12345-macaddr/ipaddr and spare-12345-macaddr/ipaddr already exists"] ... }
Try again with {"name": "newname", "overwrite": true}
Receive same error.

Expected:
I should be able to overwrite from the API.

This is with Foreman 1.5.1.

Actions

Also available in: Atom PDF