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.
Created attachment 440967 [details] modified version of hardware.py with ugly workaround modified version of hardware.py with ugly workaround
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
PS: this workaround can be applyed to hardware.py in up2date package of rhel4 also. Regards Mike
Moving to space13.
The key is to use ethtool.get_active_devices()
spacewalk.git master: d0cd57f824269bde5195d49e46fd5fe7b97588e2
Spacewalk 1.4 has been released
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.