Bug 1268207 - Duplicate Interfaces identifiers prevents updating host details (including removing the duplicate interfaces) from either UI or API
Summary: Duplicate Interfaces identifiers prevents updating host details (including re...
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Provisioning
Version: 6.1.2
Hardware: Unspecified
OS: Unspecified
Target Milestone: Unspecified
Assignee: Marek Hulan
QA Contact: Sachin Ghai
URL: http://projects.theforeman.org/issues...
Depends On: 1327576
Blocks: 1122832
TreeView+ depends on / blocked
Reported: 2015-10-02 06:59 UTC by Peter Vreman
Modified: 2019-11-14 07:01 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2016-07-27 08:56:46 UTC
Target Upstream Version:

Attachments (Terms of Use)
duplicate eth1 interface (18.72 KB, image/png)
2015-10-02 07:18 UTC, Peter Vreman
no flags Details
here I defined 3 interafces eth0, eth1, eth2 (41.58 KB, image/png)
2016-05-31 09:29 UTC, Sachin Ghai
no flags Details
Later updated interface identifiers and updated facts via puppet. Interfaces identifier updated and I can edit host details like media etc (53.21 KB, image/png)
2016-05-31 10:10 UTC, Sachin Ghai
no flags Details

System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 11034 0 Normal Closed network/interfaces validation checks the removed interfaces 2020-10-05 12:07:32 UTC
Red Hat Product Errata RHBA-2016:1500 0 normal SHIPPED_LIVE Red Hat Satellite 6.2 Base Libraries 2016-07-27 12:24:38 UTC

Description Peter Vreman 2015-10-02 06:59:27 UTC
Description of problem:
I receive the unspecified error that something is wrong with the interfaces.
 1. What exactly is wrong is not specified leaving the user clueless what might be the fix.
 2. I never set the any values of interfaces through neither the GUI or API, so how can it be that it is now suddenly invalid?
 3. The error is thrown when other non-network related values were modified, i my case the medium and ptable.

# curl -K /opt/hoici/etc/sat6/curl-hoici.conf "-HContent-Type: application/json" "-d{\"per_page\":9999,\"host\":{\"medium_id\":10,\"ptable_id\":7}}" -XPUT https://localhost/api/v2/hosts/5
  "error": {"id":5,"errors":{"interfaces":["some of interfaces are invalid"]},"full_messages":["Interfaces some of interfaces are invalid"]}

# curl -K /opt/hoici/etc/sat6/curl-hoici.conf "-HContent-Type: application/json" "-d{\"per_page\":9999,\"host\":{\"medium_id\":10,\"ptable_id\":7}}" -XGET https://localhost/api/v2/hosts/5 | jq .interfaces
    "type": "interface",
    "mac": "00:50:56:97:09:c0",
    "ip": "",
    "name": null,
    "id": 13
    "type": "interface",
    "mac": "00:50:56:97:4b:fb",
    "ip": null,
    "name": null,
    "id": 12
    "type": "interface",
    "mac": "00:50:56:97:69:3a",
    "ip": "",
    "name": null,
    "id": 14

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. See the interface configuration above
2. Update a value in the host

Actual results:
Updating of medium and ptable fails

Expected results:
Updating of medium and ptable succeeds

Additional info:

Comment 1 Peter Vreman 2015-10-02 07:18:58 UTC
Created attachment 1079362 [details]
duplicate eth1 interface

In the UI i can see that eth1 is used twice as identifier.

This is incorrect, as with the current running system there is only 1 eth1. The second eth1 was only used during the kickstart process. But after the reboot at the end of the kickstart the real ethX are there. Foreman shall then see those ethX values and remove any temporary ethX devices used during kickstart.

The same would happend with cloning the VM (e.g. for backup) and then reverting back to the clone (restore of backup). I will create a seperate BZ for this

Comment 2 Peter Vreman 2015-10-02 07:34:11 UTC
Below is the corresponding interface configuration and facter data seen on the host:

vrempet@li-lc-1017 ~
$ ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet scope host lo
2: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:50:56:97:69:3a brd ff:ff:ff:ff:ff:ff
    inet brd scope global eth2
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq state UP qlen 1000
    link/ether 00:50:56:97:4b:fb brd ff:ff:ff:ff:ff:ff
    inet brd scope global eth0
4: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq state UP qlen 1000
    link/ether 00:50:56:97:09:c0 brd ff:ff:ff:ff:ff:ff
    inet brd scope global eth1

vrempet@li-lc-1017 ~
$ sudo facter -p | grep interfaces
interfaces => eth0,eth1,eth2,lo

vrempet@li-lc-1017 ~
$ sudo facter -p | grep _eth
ipaddress_eth0 =>
ipaddress_eth1 =>
ipaddress_eth2 =>
macaddress_eth0 => 00:50:56:97:4B:FB
macaddress_eth1 => 00:50:56:97:09:C0
macaddress_eth2 => 00:50:56:97:69:3A
mtu_eth0 => 9000
mtu_eth1 => 9000
mtu_eth2 => 9000
netmask_eth0 =>
netmask_eth1 =>
netmask_eth2 =>
network_eth0 =>
network_eth1 =>
network_eth2 =>

Comment 3 Peter Vreman 2015-10-02 09:34:35 UTC
Deleting the duplicate interfaces from the UI also not possible.
When i delete the duplicate interfaces and press Submit it always reports "Some of the interfaces are invalid. Please check the table below."

Comment 4 Peter Vreman 2015-10-05 14:38:01 UTC
Looks like http://projects.theforeman.org/issues/11034

Comment 6 Bryan Kearney 2015-10-07 12:44:16 UTC
Connecting redmine issue http://projects.theforeman.org/issues/11034 from this bug

Comment 7 Bryan Kearney 2015-10-07 12:45:02 UTC
Per Marek Hulan:

the upstream issue would just help with getting rid of extra interface but 
wouldn't solve the original cause - the creation of invalid interface. It's 
not straightforward to cherry pick this to downstream as it relies on fact 
that all addresses are in interfaces objects which is not the case in 6.1 as 
primary IP and MAC are still in host, so bigger changes would have to be done. 

Another workaround to get rid of invalid interfaces that should work in Sat 
6.1 is to use the interface API (not host API) which should skip this 

Comment 9 Bryan Kearney 2015-10-07 14:05:51 UTC
Upstream bug assigned to mhulan@redhat.com

Comment 12 Tazim Kolhar 2016-04-07 07:34:18 UTC

  please provide verification steps

Thanks and Regards,

Comment 13 Marek Hulan 2016-04-07 07:51:26 UTC
Tazim, you can try following

1. add new NIC to host with one existing interface, 
2. swap identifiers with the one that was already there (eth0 <-> eth1),
3. rerun puppet 

now go to host edit form and try to save it with some change, e.g. different partition table. Interfaces should be updated correctly after puppet run so no errors on interfaces should be reported.

Comment 14 Sachin Ghai 2016-05-31 08:43:46 UTC
Verified with sat6.2 snap13.1

The reported issue is no longer reproducible with snap13.1. I defined interfaces as suggested in comment13. I created 3 interfaces eth0, eth1 and eth2. later I swapped eth1 <-> eth2 and ran "puppet agent -t", I see updated config under host details -. NIC.

Later when I tried to update the ptable, media but edit host, I was able to do that without any issue.

Comment 15 Sachin Ghai 2016-05-31 09:29:41 UTC
Created attachment 1163160 [details]
here I defined 3 interafces eth0, eth1, eth2

Comment 16 Sachin Ghai 2016-05-31 10:10:23 UTC
Created attachment 1163169 [details]
Later updated interface identifiers and updated facts via puppet. Interfaces identifier updated and I can edit host details like media etc

Comment 18 errata-xmlrpc 2016-07-27 08:56:46 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.