Bug 1268207 - Duplicate Interfaces identifiers prevents updating host details (including removing the duplicate interfaces) from either UI or API
Duplicate Interfaces identifiers prevents updating host details (including re...
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Provisioning (Show other bugs)
6.1.2
Unspecified Unspecified
high Severity high (vote)
: Beta
: --
Assigned To: Marek Hulan
Sachin Ghai
http://projects.theforeman.org/issues...
: Triaged
Depends On: 1327576
Blocks: 1122832
  Show dependency treegraph
 
Reported: 2015-10-02 02:59 EDT by Peter Vreman
Modified: 2016-07-27 04:56 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-27 04:56:46 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
duplicate eth1 interface (18.72 KB, image/png)
2015-10-02 03:18 EDT, Peter Vreman
no flags Details
here I defined 3 interafces eth0, eth1, eth2 (41.58 KB, image/png)
2016-05-31 05:29 EDT, 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 06:10 EDT, Sachin Ghai
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 11034 None None None 2016-04-26 13:01 EDT

  None (edit)
Description Peter Vreman 2015-10-02 02:59:27 EDT
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": "10.92.65.36",
    "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": "10.92.72.1",
    "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
3.

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 03:18 EDT
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 03:34:11 EDT
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 127.0.0.1/8 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 10.92.72.1/24 brd 10.92.72.255 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 10.92.14.36/24 brd 10.92.14.255 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 10.92.65.36/24 brd 10.92.65.255 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 => 10.92.14.36
ipaddress_eth1 => 10.92.65.36
ipaddress_eth2 => 10.92.72.1
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 => 255.255.255.0
netmask_eth1 => 255.255.255.0
netmask_eth2 => 255.255.255.0
network_eth0 => 10.92.14.0
network_eth1 => 10.92.65.0
network_eth2 => 10.92.72.0
Comment 3 Peter Vreman 2015-10-02 05:34:35 EDT
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 10:38:01 EDT
Looks like http://projects.theforeman.org/issues/11034
Comment 6 Bryan Kearney 2015-10-07 08:44:16 EDT
Connecting redmine issue http://projects.theforeman.org/issues/11034 from this bug
Comment 7 Bryan Kearney 2015-10-07 08:45:02 EDT
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 
validation.
Comment 9 Bryan Kearney 2015-10-07 10:05:51 EDT
Upstream bug assigned to mhulan@redhat.com
Comment 12 Tazim Kolhar 2016-04-07 03:34:18 EDT
Hi,

  please provide verification steps

Thanks and Regards,
Tazim
Comment 13 Marek Hulan 2016-04-07 03:51:26 EDT
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 04:43:46 EDT
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 05:29 EDT
Created attachment 1163160 [details]
here I defined 3 interafces eth0, eth1, eth2
Comment 16 Sachin Ghai 2016-05-31 06:10 EDT
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 04:56:46 EDT
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.

https://access.redhat.com/errata/RHBA-2016:1500

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