Project

General

Profile

Actions

Bug #11244

closed

MAC taken error when updating NIC IPMI details through API

Added by Alex Balk over 9 years ago. Updated almost 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Network
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Running on Foreman 1.9RC2, Ubuntu 12.04.5

I'm trying to update the BMC user+password for a host (plan to push this into the discovery image), but I can't get update to work.

First it complains that mac is required:

# curl -k -uadmin:$PW https://localhost:443/api/hosts/hostname.com -X PUT -d '{"host": {"interfaces_attributes": [{"identifier": "ipmi", "username": "root"}]}}' -H 'Content-Type: application/json'
{
  "error": {"id":3152,"errors":{"interfaces.mac":["can't be blank"],"interfaces":["some interfaces are invalid"]},"full_messages":["Mac can't be blank","Interfaces some interfaces are invalid"]}
}

Then it complains mac already exists:

# curl -k -uadmin:$PW https://localhost:443/api/hostname.com -X PUT -d '{"host": {"interfaces_attributes": [{"identifier": "ipmi", "username": "root", "mac": "34:17:eb:e5:81:ed"}]}}' -H 'Content-Type: application/json'
{
  "error": {"id":3152,"errors":{"interfaces.mac":["has already been taken"],"interfaces":["some interfaces are invalid"]},"full_messages":["Mac has already been taken","Interfaces some interfaces are invalid"]}
}


Related issues 1 (0 open1 closed)

Related to Foreman - Bug #11258: Can't update BMC through API without specifying providerClosedMarek Hulán07/30/2015Actions
Actions

Also available in: Atom PDF