Foreman lists two interfaces named 'eth0'

We recently upgraded from Foreman 1.7 to 1.8.

With the new interface, we have noticed that many of our physical machines
running CentOS6 have two interfaces with the identifier of 'eth0', with
different mac addresses. In this case, MAC 00:aa:bb:d1:ee:7e is LAN0 on the
motherboard, and 00:aa:bb:d1:ee:7f is LAN1 (the second interface).

foreman $ hammer host interface list --host host1.example.org
----|------------|--------------------------------|-------------------|---------------|--------------------
ID | IDENTIFIER | TYPE | MAC ADDRESS | IP

ADDRESS DNS NAME
16 eth0
192.168.8.9
222 eth0
10.55.8.9 host1.example.org
8
10.56.8.9 host1-bmc
---- ------------

I'm not entirely sure how this happened, but we may have renamed the ethN
interfaces after provisioning. in pre-1.8 releases, Foreman used one
interface for both provisioning and as the primary interface, which isn't
how we operate.

In the WebUI, I cannot change 'eth0' to another name. The 'Identifier'
field is greyed out.

I cannot delete interface ID 222 from the WebUI or from HammerCLI:

$ hammer host interface delete --host host1.example.org --id 222
Could not delete the interface:
Primary can't delete primary interface of managed host
Provision can't delete provision interface of managed host

I cannot remove the primary or the provision flag using the WebUI (I'm not
sure how to do that using Hammer).

How can I delete or rename the interface with ID = 222?

Thanks,

-= Stefan

I ran into the same problem. https://groups.google.com/d/msg/foreman-users/pE3fqK_9MFc/R6KSt5mlMTQJ

In my case I used Rails console to rename the interface as all attempts via WebUI were not working. If this has to be done in large numbers then it can probably be done via a Rails runner script. I didn't yet test if API can fix the issue.

  • Trey

Hello,

a PR that allows later identifier changes was merged [1] yesterday and should
get in to 1.8.2.

[1] https://github.com/theforeman/foreman/pull/2427

··· On Saturday 30 of May 2015 08:53:34 treydock wrote: > I ran into the same problem. > https://groups.google.com/d/msg/foreman-users/pE3fqK_9MFc/R6KSt5mlMTQJ > > In my case I used Rails console to rename the interface as all attempts via > WebUI were not working. If this has to be done in large numbers then it > can probably be done via a Rails runner script. I didn't yet test if API > can fix the issue. > > - Trey


Marek