Bug 624748 - rhn-profile-sync doesn't report virtal ip adresses
Summary: rhn-profile-sync doesn't report virtal ip adresses
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: rhn-client-tools
Version: 5.5
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Milan Zázrivec
QA Contact: Martin Minar
URL:
Whiteboard:
Depends On:
Blocks: space14
TreeView+ depends on / blocked
 
Reported: 2010-08-17 16:14 UTC by michael.boutillier
Modified: 2016-07-04 00:55 UTC (History)
5 users (show)

Fixed In Version: rhn-client-tools-0.4.20-48.el5
Doc Type: Bug Fix
Doc Text:
Previously, when sending a hardware profile to RHN or Spacewalk, the rhn-profile-sync command did not report virtual IP addresses if they were configured on an active network interface. This was caused by an incorrect use of the ethtool.get_devices() function. The underlying source code has been modified to use the ethtool.get_active_devices() function instead, and rhn-profile-sync now works as expected.
Clone Of:
Environment:
Last Closed: 2011-04-26 09:11:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
modified version of hardware.py with ugly workaround (35.42 KB, text/plain)
2010-08-25 15:22 UTC, michael.boutillier
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0997 0 normal SHIPPED_LIVE rhn-client-tools bug fix and enhancement update 2011-07-20 15:44:52 UTC

Description michael.boutillier 2010-08-17 16:14:00 UTC
Description of problem:
rhn-profile-sync doesn't report virtal ip adresses

Version-Release number of selected component (if applicable):
rhn-client-tools-0.8.12-1.el5

How reproducible:
configure a second ip adrress on an interface as :
eth0      Link encap:Ethernet  HWaddr 00:26:55:FF:FF:FF  
          inet addr:172.18.XX.XX  Bcast:172.18.ZZ.ZZ  Mask:255.255.254.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9554215933 errors:1611 dropped:1599 overruns:0 frame:1611
          TX packets:19039381412 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2414599212477 (2.1 TiB)  TX bytes:24579464392993 (22.3 TiB)
          Interrupt:130 Memory:fb000000-fb7fffff 

eth0:1    Link encap:Ethernet  HWaddr 00:26:55:FF:FF:FF  
          inet addr:172.18.YY.YY  Bcast:172.18.YY.YY  Mask:255.255.254.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:130 Memory:fb000000-fb7fffff 
run rhn-profile-sync


  
Actual results:
check your spacewalk server on the "hardware info" tab, you'll see that virtual interface doesn't show up.

Expected results:
i expect virtual adresses should be seen! (as it is for vlan interface/bonding/...
but maybe it is a a choice made by design...

Additional info:
I went a bit deeper, maybe the problem doesn't come from rhn-profile-sync but from python-ethtool-0.3-5.el5.
it seems in : /usr/share/rhn/up2date_client/hardware.py
a call is made to ethtool.get_devices()
I try from the command line on the machine with the net configuration showed here upper:

[user@patin ~]$ python
Python 2.4.3 (#1, Jun 11 2009, 14:09:37) 
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ethtool
>>> interfaces = ethtool.get_devices()
>>> interfaces
['lo', 'eth0', 'eth1']
>>> 

--> sounds to me that ethtool python lib id the root cause.

Comment 1 michael.boutillier 2010-08-25 15:22:43 UTC
Created attachment 440967 [details]
modified version of hardware.py with ugly workaround

modified version of hardware.py with ugly workaround

Comment 2 michael.boutillier 2010-08-25 15:27:12 UTC
dear all i posted a modified version of hardware.py,
since i figure out that ethtool.get_devices() was my problem i decide to replace this call with :

 #interfaces = ethtool.get_devices()
    #this is a workaround to have all interace even ip aliasing
    interfaces = commands.getoutput("ifconfig -a |grep Link |awk '{print $1}'").split('\n')

this also give me a list of all running interface (i may have an issue with uncofigured interface?) as the old ethtool code but this time ip aliasing is include too

I hope it help someone
Regards
Mike

Comment 3 michael.boutillier 2010-08-27 08:52:45 UTC
PS: this workaround can be applyed to hardware.py in up2date package of rhel4 also.
Regards
Mike

Comment 4 Jan Pazdziora 2010-11-19 16:19:50 UTC
Moving to space13.

Comment 5 Milan Zázrivec 2011-01-21 13:03:05 UTC
The key is to use ethtool.get_active_devices()

Comment 6 Milan Zázrivec 2011-03-11 15:16:12 UTC
spacewalk.git master: d0cd57f824269bde5195d49e46fd5fe7b97588e2

Comment 10 Miroslav Suchý 2011-04-26 09:11:03 UTC
Spacewalk 1.4 has been released

Comment 11 Eliska Slobodova 2011-06-29 11:55:26 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Previously, when sending a hardware profile to RHN or Spacewalk, the rhn-profile-sync command did not report virtual IP addresses if they were configured on an active network interface. This was caused by an incorrect use of the ethtool.get_devices() function. The underlying source code has been modified to use the ethtool.get_active_devices() function instead, and rhn-profile-sync now works as expected.


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