Bug 1426817

Summary: check_http behavior changed from 2.1.4 to 2.2.0 in case option -e is used
Product: [Fedora] Fedora EPEL Reporter: Peter Bieringer <pb>
Component: nagios-pluginsAssignee: Stephen John Smoogen <smooge>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: epel7CC: athmanem, b.heden, kmf, mhayden, ondrejj, smooge, smooge, swilkerson
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: nagios-plugins-2.2.1-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-30 03:17:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Peter Bieringer 2017-02-25 06:26:10 UTC
Description of problem:
check_http reports warning where it should report ok with -e 

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

pending 2.2.0, e.g.
nagios-plugins-http-2.2.0-1.el7.x86_64.rpm


# check_http -V -H www.google.com -u /test -e 404
check_http v2.1.4 (nagios-plugins 2.1.4)

# ./2.1.4/check_http -H www.google.com -u /test -e 404
HTTP OK: Status line output matched "404" - 1709 bytes in 0,030 second response time |time=0,029535s;;;0,000000 size=1709B;;;0


# /usr/lib64/nagios/plugins/check_http -V
check_http v2.2.0 (nagios-plugins 2.2.0)

# /usr/lib64/nagios/plugins/check_http -H www.google.com -u /test -e 404
HTTP WARNING: Status line output matched "404" - HTTP/1.1 404 Not Found - 1709 bytes in 0,029 second response time |time=0,029460s;;;0,000000 size=1709B;;;0


Additional info:
https://github.com/nagios-plugins/nagios-plugins/issues/236

Comment 1 Fedora Update System 2017-02-25 21:46:43 UTC
nagios-plugins-2.2.0-3.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-cbb077cc9b

Comment 2 Peter Bieringer 2017-02-25 21:54:52 UTC
This version crashes:

# /usr/lib64/nagios/plugins/check_http -H www.google.com -v
GET / HTTP/1.1
User-Agent: check_http/v2.2.0 (nagios-plugins 2.2.0)
Connection: close
Host: www.google.com
Accept: */*


http://www.google.com:80/ is 490 characters
STATUS: HTTP/1.1 302 Found
**** HEADER ****
Cache-Control: private
Content-Type: text/html; charset=UTF-8
Location: http://www.google.de/?gfe_rd=cr&ei=2fyxWM68A-iA8QeOnKnwCA
Content-Length: 258
Date: Sat, 25 Feb 2017 21:53:29 GMT
Connection: close
**** CONTENT ****
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="http://www.google.de/?gfe_rd=cr&amp;ei=2fyxWM68A-iA8QeOnKnwCA">here</A>.
</BODY></HTML>

Speicherzugriffsfehler  <- LC_ALL unfortunatly don't translate


ltrace last lines:

[pid 28357] strtol(0x7f4281915429, 0, 10, 3)                                                   = 302
[pid 28357] dcgettext(0, 0x7f4280e7d134, 5, 0)                                                 = 0x7f4280e7d134
[pid 28357] __vasprintf_chk(0x7ffff7a17bd8, 1, 0x7f4280e7d134, 0x7ffff7a17a30 <no return ...>
[pid 28357] --- SIGSEGV (Segmentation fault) ---
[pid 28357] +++ killed by SIGSEGV +++

Comment 3 Stephen John Smoogen 2017-02-25 22:28:23 UTC
That is what I get for not running make test. I am running that now and I apologize.. I thought a pointer was initialized earlier but it was not so we were writing to random memory if -e wasn't set. Fixed.. and pushing updates to 
trees

https://koji.fedoraproject.org/koji/taskinfo?taskID=18061938

Comment 4 Fedora Update System 2017-02-25 22:35:55 UTC
nagios-plugins-2.2.0-4.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-579895db6a

Comment 5 Peter Bieringer 2017-02-26 09:52:58 UTC
2.2.0-4.el7 looks ok

Comment 6 Fedora Update System 2017-02-26 22:49:22 UTC
nagios-plugins-2.2.0-4.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-579895db6a

Comment 7 Fedora Update System 2017-03-11 01:02:55 UTC
nagios-plugins-2.2.0-6.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-212f3ef76e

Comment 8 Peter Bieringer 2017-03-11 06:24:00 UTC
nagios-plugins-2.2.0-6.el7 lost the fixes of 2.2.0-4 :-(

# ./2.2.0-4/check_http -H www.google.com -u /test -e 404
HTTP OK: Status line output matched "404" - 1709 bytes in 0,030 second response time |time=0,029699s;;;0,000000 size=1709B;;;0

# ./2.2.0-6/check_http -H www.google.com -u /test -e 404
HTTP WARNING: Status line output matched "404" - HTTP/1.1 404 Not Found - 1709 bytes in 0,030 second response time |time=0,029518s;;;0,000000 size=1709B;;;0

Comment 9 Fedora Update System 2017-03-11 12:50:16 UTC
nagios-plugins-2.2.0-6.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-212f3ef76e

Comment 10 Fedora Update System 2017-03-13 00:38:02 UTC
nagios-plugins-2.2.0-7.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-756fbbf351

Comment 11 Fedora Update System 2017-03-14 00:19:03 UTC
nagios-plugins-2.2.0-7.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-756fbbf351

Comment 12 Stephen John Smoogen 2017-03-14 00:33:53 UTC
The fix should be back... the versions I tested on my systems worked as expected on looking for returns and such.

Comment 13 Fedora Update System 2017-04-21 00:08:32 UTC
nagios-plugins-2.2.1-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-e452ab1676

Comment 14 Fedora Update System 2017-04-22 21:48:10 UTC
nagios-plugins-2.2.1-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-e452ab1676

Comment 15 Fedora Update System 2017-06-30 03:17:25 UTC
nagios-plugins-2.2.1-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.