Bug 699753

Summary: IP address displayed in server overview doesn't correspond with primary ip address
Product: [Community] Spacewalk Reporter: ben.vanhaeren.external
Component: WebUIAssignee: Tomas Lestach <tlestach>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.8   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-21 14:43:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 695242    
Attachments:
Description Flags
primary ip in hardware tab
none
primary ip in overview tab none

Description ben.vanhaeren.external 2011-04-26 14:27:06 UTC
Description of problem:
IP address displayed in server overview doesn't correspond with primary ip address

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

How reproducible:
If you register a server with multiple ip addresses, The ipaddress displayed in "System" -> "Details" -> "overview" is not the primary ip address (ipaddress that correspond with the hostname)

Steps to Reproduce:
1. Register server with multiple ip addresses
2. 
3.
  
Actual results:
The ipaddress displayed in "System" -> "Details" -> "overview" is not the primary ip address.

Expected results:
Logicaly, the ipaddress displayed in the "overview" is the primary ipaddress

Additional info:

Comment 1 Tomas Lestach 2011-04-26 15:08:30 UTC
If a system has several IP addresses, as primary one is taken:
- eth0 if an IP is associated with eth0
- eth1 if an IP is associated with eth1
- any of the IPs

If you know, how a primary address can be detected, please, let us know, or send a patch to review.

Comment 2 ben.vanhaeren.external 2011-04-27 07:20:21 UTC
This gives problems if you use bonding or VLAN tagging, which is quite common in a corperate environment. Doesn't it make more sense to use the ipaddress that is returned by a gethostbyname function call ? That way you get the ip address the is associated with the hostname of the system.

In any case, in the GUI, it is not displayed in a consistent way. If you go to
a system -> "overview" you will see a different primary ip address than in "hardware" -> "networking". I've attached 2 screenshots to make it clearer.

Comment 3 ben.vanhaeren.external 2011-04-27 07:22:59 UTC
Created attachment 495123 [details]
primary ip in hardware tab

Comment 4 ben.vanhaeren.external 2011-04-27 07:23:38 UTC
Created attachment 495124 [details]
primary ip in overview tab

Comment 5 Tomas Lestach 2011-04-27 12:19:21 UTC
I slightly changed the behavior. Now, the primary address shall be the one, the client uses for communication with Spacewalk server.

spacewalk.git: 994ec87d3caec3ff6fabb1e8c69c454edd5a90ae

The non-consistent part described in Comment#2 was fixed by https://bugzilla.redhat.com/show_bug.cgi?id=628755 in Spacewalk 1.3.

Comment 6 Jan Pazdziora (Red Hat) 2011-07-19 19:36:42 UTC
This bugzilla is currently MODIFIED, so we believe the fix is in the Spacewalk nightly yum repository at http://spacewalk.redhat.com/yum/nightly/

Therefore, moving ON_QA.

Comment 7 Jan Pazdziora (Red Hat) 2011-07-21 14:43:08 UTC
Spacewalk 1.5 was released.