Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 311723 - net-analyzer/nagios-plugins-1.4.14-r2 breakage in check_ping
Summary: net-analyzer/nagios-plugins-1.4.14-r2 breakage in check_ping
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: AMD64 Linux
: High major (vote)
Assignee: Tobias Scherbaum (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-28 10:07 UTC by Reuben Farrelly
Modified: 2012-05-25 14:37 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to fix first_ip function (first_ip.patch,517 bytes, text/plain)
2010-09-07 23:27 UTC, David Sparks
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Reuben Farrelly 2010-03-28 10:07:11 UTC
The latest patch to nagios-plugins breaks the autotools detection of ping, causing the final check_ping binary to fail with "CRITICAL - You need more args!!!" whenever executed.

Reproducible: Always

Steps to Reproduce:
1. emerge nagios-plugins
2. attempt to use check_ping plugin
3.

Actual Results:  
autoconf output:

checking return type of socket size... int
checking for ps... /bin/ps
checking for ps syntax... /bin/ps axwo 'stat uid pid ppid vsz rss pcpu comm
args'
checking for ping... /bin/ping
checking for ping6... /bin/ping6
checking for ICMP ping syntax... configure: WARNING: unable to find usable ping
syntax
checking for ICMPv6 ping syntax... /bin/ping6 -n -U -w %d -c %d %s
checking for nslookup... /usr/bin/nslookup
checking for nslookup syntax... /usr/bin/nslookup -sil



Expected Results:  
Compilation succeeded but the resulting binary did not work.

check_ping should execute normally.

I am currently holding off the upgrade to nagios-plugins-1.4.14 and everything works fine.  Upon upgrading to -r2, check_ping fails.

The offending patch is discussed at http://bugs.gentoo.org/44382
Comment 1 Tobias Scherbaum (RETIRED) gentoo-dev 2010-07-30 14:31:55 UTC
Please test with 1.4.15.
Comment 2 David Sparks 2010-09-07 22:42:31 UTC
(In reply to comment #1)
> Please test with 1.4.15.

With 1.4.15 the problem still exists.

checking for ICMP ping syntax... configure: WARNING: unable to find usable ping syntax
Comment 3 David Sparks 2010-09-07 22:46:09 UTC
The problematic part of the patch is where it tries to get the "first_ip".  I've run the command directly and included the output of `ifconfig` below.


nagios # /sbin/ifconfig | egrep "inet addr:" | sed -n '1p' | sed 's/ Bcast.*$//' | sed 's/^\s*inet addr://' 
127.0.0.1  Mask:255.0.0.0

This is an OpenVZ container, the ifconfig output looks slightly different than what is expected:

# ifconfig
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:168 (168.0 B)  TX bytes:168 (168.0 B)

venet0    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:10.0.0.7  P-t-P:10.0.0.7  Bcast:0.0.0.0  Mask:255.255.255.255
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
          RX packets:290662 errors:0 dropped:0 overruns:0 frame:0
          TX packets:295389 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:39821033 (37.9 MiB)  TX bytes:30045896 (28.6 MiB)
Comment 4 David Sparks 2010-09-07 23:27:29 UTC
Created attachment 246406 [details]
patch to fix first_ip function

Tested with regular hardware and OpenVZ containers.
Comment 5 David Sparks 2010-09-07 23:29:28 UTC
I just noticed this bug is marked "Resolved" and I have no option to reopen it.  Should I create a new bug with my patch linked to this bug?