Bug 1328745 - " hammer host list" lists first NIC ip of hosts (with multi nic) inspite of first nic is not accesible by satellite
Summary: " hammer host list" lists first NIC ip of hosts (with multi nic) inspite o...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: Unspecified
Assignee: Marek Hulan
QA Contact: Tomas Strachota
URL:
Whiteboard:
Depends On:
Blocks: GSS_Sat6Beta_Tracker, GSS_Sat6_Tracker
TreeView+ depends on / blocked
 
Reported: 2016-04-20 08:29 UTC by Pradeep Kumar Surisetty
Modified: 2019-09-26 18:04 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-01-05 13:48:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Pradeep Kumar Surisetty 2016-04-20 08:29:33 UTC
Description of problem:

1) Registered couple of vm's as capsules to satellite server.  
2) Each VM has 2 nics. 

Eth0 :  NAT bridge ( which cant be accessed by external satellite server).  
Eth1:  10G NIC. Which is accessible to satellite server

3) After registering either capsule/hosts to satellite

"Hammer capsule list" or "hammer host list" lists first nic associated to each node. 

For ex: 


hammer -u admin -p changeme host list 

 4  | vmcapsule01.redhat.com | RedHat 7.2       |            | 192.168.122.110 | 52:54:00:35:bc:2c


Above listed IP is not accessible to satellite as this is with NATed bridge. 


It would be challenging for user to track all these ipts. Good to list IP's which satellite can acces capsules/hosts


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Marek Hulan 2016-06-02 12:32:14 UTC
In Sat 6.1 there's no easy way of determining the primary interfaces or swapping it with any additional interface. In next version though user is able to select which interface is primary and then the IP of primary interface is being displayed. When a host registers by itself (so not created by provisioning), we try to detect primary interface, physical interfaces have higher priority so it should work out of the box.

We can't really detect whether the IP is truly reachable from Satellite, the IP might be from some existing subnet range but that does not mean it's on the same subnet.

So I suggest verifying this BZ with 6.2, it should not need any code changes.

Comment 3 Tomas Strachota 2017-08-25 08:51:26 UTC
I confirm this behavior has been fixed in satellite 6.2+
API/hammer shows ip and mac of the primary interface when listing hosts:

> hammer host info --name bf.tstracho-laptop
...
Network interfaces:       
 1) Id:          2
    Identifier:  
    Type:        interface (primary)
    MAC address: 00:14:5e:6d:1c:b0
    IP address:  192.168.121.51
    FQDN:
 2) Id:          13
    Identifier:  
    Type:        interface (provision)
    MAC address: fe:54:00:64:76:6d
    IP address:  192.168.121.50
    FQDN:
...

> hammer host list
...
2  | bf.tstracho-laptop | RedHat 7.3   |   | 192.168.121.51  | 00:14:5e:6d:1c:b0 |  |                      
...

> hammer host update --name bf.tstracho-laptop --interface 'id=13,primary=true,name=bf2' --interface 'id=2,primary=false'
Host updated
> hammer host list
...
2  | bf2.tstracho-laptop | RedHat 7.3  |   | 192.168.121.50  | fe:54:00:64:76:6d |  |                      
...


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