Description of problem: Some servers do not have eth0 devices. For instance, my Spacewalk server only has eth1 and eth2, no eth0 device, as it was removed. Despite the interface eth0 being completely removed from udev and ifconfig -a not showing it, NOCpulse is throwing errors every 15 minutes via cron. It seems this is due to a hard-coded check in the code: MessageQueue/SMONQueue.pm for retrieving MAC address: my $mac = `/sbin/ifconfig eth0`; It should detect the first ethernet card, or any card that's enabled perhaps... but not hardcoded to eth0. Version-Release number of selected component (if applicable): Tested on 1.5, assumed to still be present in 1.6. How reproducible: Always. Steps to Reproduce: 1. Install Spacewalk on a system without eth0. Look at your email, and you'll see lots of errors. From: Cron Daemon <root.com> Subject: Cron <nocpulse@spacewalk> if [ -e /etc/NOCpulse.ini ] ; then /usr/bin/monitor-queue ALERTS 50 100 2>&1 > /dev/null; fi Date: December 14, 2011 4:15:02 PM PST To: nocpulse.com eth0: error fetching interface information: Device not found Actual results: Errors when eth0 is not an interface on the system. Expected results: No errors when eth0 does not exist. Additional info:
The issue has been fixed in spacewalk master by commit 0b51c04ea9c35366cc818e9909e0773d30f1a405 768188 - return mac address of the first available interface
Spacewalk 1.6 has been released.
It still fails in OpenVZ/Virtuozzo because the ifconfig output: lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:274526 errors:0 dropped:0 overruns:0 frame:0 TX packets:274526 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:714536966 (681.4 MiB) TX bytes:714536966 (681.4 MiB) venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:127.0.0.1 P-t-P:127.0.0.1 Bcast:0.0.0.0 Mask:255.255.255.255 UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1 RX packets:159719 errors:0 dropped:0 overruns:0 frame:0 TX packets:119694 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:211441162 (201.6 MiB) TX bytes:56311647 (53.7 MiB) venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:123.123.123.123 P-t-P:82.194.77.40 Bcast:82.194.77.40 Mask:255.255.255.255 UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1 Dont find a valid value for HWaddr.
One more fix in spacewalk master commit e308b4838fad54b3dd657d5080051b9b8a87b101 768188 - return mac address of the first available interface
This is also failing in RHN Satellite 5.4.1, even after I change the line in SMONQueue.pm: [root@molly ~]# diff /usr/share/perl5/vendor_perl/NOCpulse/SMONQueue.pm /usr/share/perl5/vendor_perl/NOCpulse/SMONQueue.pm.orig 63c63 < my $mac = `/sbin/ifconfig p4p1`; --- > my $mac = `/sbin/ifconfig eth0`; I restart Monitoring and MonitoringScout and I see: [root@molly ~]# grep eth0 /etc/NOCpulse.ini serverIF=eth0 Is there somewhere else that I need to change? I see: [root@molly ~]# grep -ri eth0 /usr/share/perl5/vendor_perl/NOCpulse/ /usr/share/perl5/vendor_perl/NOCpulse/SMONQueue.pm: my $mac = `/sbin/ifconfig eth0`; /usr/share/perl5/vendor_perl/NOCpulse/SMONQueue.pm.orig: my $mac = `/sbin/ifconfig eth0`; /usr/share/perl5/vendor_perl/NOCpulse/Gritch.pm: my $ifconfig = `/sbin/ifconfig eth0`; /usr/share/perl5/vendor_perl/NOCpulse/Probe/DataSource/InterfaceTrafficOutput.pm: # Match " eth0:" /usr/share/perl5/vendor_perl/NOCpulse/Probe/DataSource/test/TestUnixHelpers.pm: eth0:1195668513 32384086 0 0 0 0 0 0 887520285 30738814 0 0 0 833234 0 0 /usr/share/perl5/vendor_perl/NOCpulse/Probe/DataSource/test/TestUnixHelpers.pm: $traffic = $data_source->interface_traffic('eth0'); /usr/share/perl5/vendor_perl/NOCpulse/Probe/DataSource/test/TestPsOutput.pm: 1391 1 1260 608 00:00:00 S /sbin/pump -i eth0 Looks like there are several places where eth0 is hard coded. Help?
(In reply to comment #5) > This is also failing in RHN Satellite 5.4.1, even after I change the line in > SMONQueue.pm: Do fixes from comment #1 and comment #4 solve your issue?
Moving ON_QA. Packages that address this bugzilla should now be available in yum repos at http://yum.spacewalkproject.org/nightly/
Spacewalk 1.8 has been released: https://fedorahosted.org/spacewalk/wiki/ReleaseNotes18