Bug 1445692 - Hammer returns mac of docker interface instead of eth0 interface
Summary: Hammer returns mac of docker interface instead of eth0 interface
Keywords:
Status: CLOSED DUPLICATE of bug 1289510
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hosts
Version: 6.2.9
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-26 10:05 UTC by Jitendra Yejare
Modified: 2017-05-30 11:33 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-05-30 11:33:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
complete output of host info (1.97 KB, text/plain)
2017-05-30 09:21 UTC, Sachin Ghai
no flags Details
Interface details from UI (78.26 KB, image/png)
2017-05-30 09:27 UTC, Sachin Ghai
no flags Details

Description Jitendra Yejare 2017-04-26 10:05:15 UTC
Description of problem:
The 'hammer host list' command returns docker interface mac on satellite host instead of eth0 interface mac of satellite host.

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

How reproducible:
Always

Steps to Reproduce:
1. Run hammer command
# hammer host list
2. Observe the mac of satellite host in the list

Actual results:
The hammer command returns the docker interface mac instead of eth0/satellite interface mac.

Expected results:
The hammer should pick and return eth0/satellite interface mac regardless of docker interface.

Additional info:
This is failing the upgrade postupgrade existance testswhich shows change in mac after upgrade of docker interface, which ideally should pass as it should return eth0 mac which will be fixed even after upgrade.

Comment 2 Marek Hulan 2017-05-05 10:18:13 UTC
The MAC address listed in this API call is MAC of primary interface of a host. Please double check that eth0 is set as primary. If it's the case, please upload output of "hammer host info --id $id" where $id is id of the affected host.

Comment 3 Sachin Ghai 2017-05-30 09:20:26 UTC
@Marek: This is our Satellite server itself which was upgraded from 6.0 -> 6.1 -> 6.2. The first interface listed as "docker0" and listed as (Primary, Provision), but we never set it up as primary/provisioning interface.

Network interfaces: 
 1) Id:          12
    Identifier:  docker0
    Type:        interface (primary, provision)
    MAC address: 02:42:99:29:57:b4
    IP address:  172.17.0.1
    FQDN:
 2) Id:          3
    Identifier:  eno1
    Type:        interface
    MAC address: 34:40:b5:a0:0a:d4
    IP address:  10.34.36.127
    FQDN:
 3) Id:          4
    Identifier:  eno2
    Type:        interface
    MAC address: 34:40:b5:a0:0a:d6
    IP address:  
    FQDN:
 5) Id:          1
    Identifier:  eth0
    Type:        interface
    MAC address: 00:1a:4a:3e:a6:09
    IP address:  10.8.119.1
    FQDN:

Comment 4 Sachin Ghai 2017-05-30 09:21:12 UTC
Created attachment 1283365 [details]
complete output of host info

Comment 5 Sachin Ghai 2017-05-30 09:27:47 UTC
Created attachment 1283381 [details]
Interface details from UI

Comment 6 Sachin Ghai 2017-05-30 09:29:29 UTC
At first place, I don't know how docker0 is set as primary and provisioning interface. Isn't it that satellite is picking alphabetically first interface as primary/provisioning ? Just a guess.

Comment 7 Evgeni Golov 2017-05-30 10:08:05 UTC
This is probably due to Puppet reporting facts (and thus reporting the IP of docker0 as the primary IP) and Foreman then interpreting these facts and updating the Host object accordingly.

Comment 8 Evgeni Golov 2017-05-30 10:09:09 UTC
And that behaviour is reported in https://bugzilla.redhat.com/show_bug.cgi?id=1289510

Comment 9 Evgeni Golov 2017-05-30 10:11:19 UTC
You can manually apply the fix from the upstream PR (https://github.com/theforeman/foreman/pull/4233) by adding "docker*" to "ignored_interface_identifiers" in the settings of Satellite.

Comment 10 Marek Hulan 2017-05-30 11:10:35 UTC
I can confirm what Evgeni says. If the host gets created by facts upload, we can only rely on "ipaddress" fact determining the primary interface. Sadly puppet reports ip and mac of first interface sort alphabetically (not necessary the same interface). It should be fixed by BZ 1289510, can we close this as dup?

Comment 11 Sachin Ghai 2017-05-30 11:32:46 UTC
Thanks Evgeni and Marek.. that explains the issue.. and yes we can mark as duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1289510

Comment 12 Sachin Ghai 2017-05-30 11:33:30 UTC

*** This bug has been marked as a duplicate of bug 1289510 ***


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