[Bug 839839] New: nagios-plugins-zypper: check_zypper does ignore the -o option
https://bugzilla.novell.com/show_bug.cgi?id=839839 https://bugzilla.novell.com/show_bug.cgi?id=839839#c0 Summary: nagios-plugins-zypper: check_zypper does ignore the -o option Classification: openSUSE Product: openSUSE 12.3 Version: Final Platform: x86 OS/Version: openSUSE 12.2 Status: NEW Severity: Normal Priority: P5 - None Component: Other AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: marco.roose@mpibpc.mpg.de QAContact: qa-bugs@suse.de Found By: --- Blocker: --- Created an attachment (id=557264) --> (http://bugzilla.novell.com/attachment.cgi?id=557264) debug output of check_zypper -v -debug -o User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20100101 Firefox/23.0 Even if executing check_zypper with or without -o ( --ignore_outdated I get an outdated warning. check_zypper is v1.48. Debug output attached. Reproducible: Always Steps to Reproduce: 1. get an repository outdated (Non-OSS iseems to be just now) 2. execute check_zypper (should return Critical) 3. execute check_zypper -o (should return OK) Actual Results: 3. returns the same as 2. Expected Results: 3. should return OK -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=839839 https://bugzilla.novell.com/show_bug.cgi?id=839839#c Marco Roose <marco.roose@mpibpc.mpg.de> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team-screening@forge.pr |lrupp@suse.com |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=839839 https://bugzilla.novell.com/show_bug.cgi?id=839839#c Marco Roose <marco.roose@mpibpc.mpg.de> changed: What |Removed |Added ---------------------------------------------------------------------------- OS/Version|openSUSE 12.2 |openSUSE 12.3 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=839839 https://bugzilla.novell.com/show_bug.cgi?id=839839#c Ansgar Esztermann <aeszter@gwdg.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aeszter@gwdg.de Severity|Normal |Major -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=839839 https://bugzilla.novell.com/show_bug.cgi?id=839839#c Ansgar Esztermann <aeszter@gwdg.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|Major |Normal -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=839839 https://bugzilla.novell.com/show_bug.cgi?id=839839#c1 --- Comment #1 from Ansgar Esztermann <aeszter@gwdg.de> 2013-09-12 14:04:45 UTC --- check_zypper checks "zypper lu" output for "out-of-date" and triggers a critical return status (actually, it behaves as if a security update had been found; by default, this results in a critical status). This behaviour can be suppressed by calling check_zypper -o. However, on line 379, check_zypper will look for "warning" messages in the output of zypper. If any are found, it will also behave as if a security update had been found. This check cannot be switched off. Changing this behaviour would be straightforward (simply add a condition like !$opt_o), but it is not obvious (to me) which other warning messages would be inadvertently suppressed by such a simplistic approach. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=839839 https://bugzilla.novell.com/show_bug.cgi?id=839839#c2 --- Comment #2 from Marco Roose <marco.roose@mpibpc.mpg.de> 2013-09-13 08:38:01 UTC --- Created an attachment (id=557697) --> (http://bugzilla.novell.com/attachment.cgi?id=557697) Patch for check_zypper -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=839839 https://bugzilla.novell.com/show_bug.cgi?id=839839#c3 --- Comment #3 from Marco Roose <marco.roose@mpibpc.mpg.de> 2013-09-13 08:39:07 UTC --- This is doing the job in my case and should hopefully not supress any other warnings. Maybe one should setup unittests for that. Left file: P:\check_zypper.ori Right file: P:\check_zypper.mroo 371,372c371,372 < if (/out-of-date/) { < print STDERR "WARNING: outdated repository found\n" if ($DEBUG); ---
if (/outdated/) { print STDERR"WARNING: outdated repository found\n" if ($DEBUG);
373a374
$update_avail = 1;
376a378
next;
377a380
next;
379,383c382,387 < if (/<message type=\"warning\">(.*)<\/message>/) { < $update_avail = 1; < $error = check_errorcode('security'); < $warnstr = xml_re_escape($1) . ' '; < $warnstr .= "\n" if ($opt_v); ---
if (/<message type=\"warning\">(.*)<\/message>/) { $update_avail = 1; $error = check_errorcode('security'); $warnstr = xml_re_escape($1) . ' '; $warnstr .= "\n" if ($opt_v);
-- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=839839 https://bugzilla.novell.com/show_bug.cgi?id=839839#c4 Lars Vogdt <lrupp@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |lrupp@suse.com --- Comment #4 from Lars Vogdt <lrupp@suse.com> 2013-09-17 18:04:42 CEST --- Thanks for the analysis and the patch! I will include it in the next release. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=839839 https://bugzilla.novell.com/show_bug.cgi?id=839839#c5 Lars Vogdt <lrupp@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P4 - Low Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #5 from Lars Vogdt <lrupp@suse.com> 2013-10-07 11:42:47 CEST --- Using the following patch now: @@ -369,12 +369,13 @@ return ( 'UNKNOWN: ' . xml_re_escape($_), 'UNKNOWN' ) if (/Error message:/); return ( 'UNKNOWN: ' . xml_re_escape($_), 'UNKNOWN' ) if (/A ZYpp transaction is already in progress./); return ( 'UNKNOWN: ' . xml_re_escape($_), 'UNKNOWN' ) if (/System management is locked/); - if (/out-of-date/) { - print STDERR "WARNING: outdated repository found\n" if ($DEBUG); + if ((/Repository.*is out-of-date/) || (/Repository.*outdated/)) { + print STDERR "WARNING: possibly outdated repository found\n" if ($DEBUG); if ( !$opt_o ) { $error = check_errorcode('security'); - $warnstr = "At least one of your Repositories is out of date. Please run \"zypper refresh\" as root to update it. "; + $warnstr = "At least one of your Repositories might be out of date. Please run \"zypper refresh\" as root to update it. "; $warnstr .= "\n" if ($opt_v); + next; } } if (/<message type=\"warning\">(.*)<\/message>/) { ^^ should be available with nagios-plugins-zypper 1.50 in server:monitoring, soon. (Trying to get it into 13.1, but I'm unsure if this will happen.) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=839839 https://bugzilla.novell.com/show_bug.cgi?id=839839#c6 Lars Vogdt <lrupp@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED | --- Comment #6 from Lars Vogdt <lrupp@suse.com> 2013-10-07 11:44:24 CEST --- Ups, sorry. Just noticed that this was about 12.3 - so starting to request a maintenance update... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=839839 https://bugzilla.novell.com/show_bug.cgi?id=839839#c7 Lars Vogdt <lrupp@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |NEEDINFO InfoProvider| |maintenance@opensuse.org --- Comment #7 from Lars Vogdt <lrupp@suse.com> 2013-10-07 11:45:41 CEST --- Maintenance team: I like to request a maintenance update for nagios-plugins-zypper on: * 12.2 * 12.3 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=839839 https://bugzilla.novell.com/show_bug.cgi?id=839839#c8 --- Comment #8 from Bernhard Wiedemann <bwiedemann@suse.com> 2013-10-07 12:00:12 CEST --- This is an autogenerated message for OBS integration: This bug (839839) was mentioned in https://build.opensuse.org/request/show/202481 Factory / nagios-plugins-zypper https://build.opensuse.org/request/show/202482 13.1 / nagios-plugins-zypper -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=839839 https://bugzilla.novell.com/show_bug.cgi?id=839839#c9 Marcus Meissner <meissner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |REOPENED CC| |meissner@suse.com InfoProvider|maintenance@opensuse.org | --- Comment #9 from Marcus Meissner <meissner@suse.com> 2013-10-17 14:58:30 UTC --- please just submit, fine for us -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=839839 https://bugzilla.novell.com/show_bug.cgi?id=839839#c10 Lars Vogdt <lrupp@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXED --- Comment #10 from Lars Vogdt <lrupp@suse.com> 2013-10-21 11:11:30 CEST --- Thanks! Created maintenance request ID 204101 for 12.2 and 12.3. Closing here as fixed. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=839839 https://bugzilla.novell.com/show_bug.cgi?id=839839#c11 --- Comment #11 from Bernhard Wiedemann <bwiedemann@suse.com> 2013-10-21 12:00:23 CEST --- This is an autogenerated message for OBS integration: This bug (839839) was mentioned in https://build.opensuse.org/request/show/204101 12.2+12.3 / nagios-plugins-zypper -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=839839 https://bugzilla.novell.com/show_bug.cgi?id=839839#c12 --- Comment #12 from Swamp Workflow Management <swamp@suse.de> 2013-10-28 12:05:00 UTC --- openSUSE-RU-2013:1583-1: An update that has two recommended fixes can now be installed. Category: recommended (low) Bug References: 830658,839839 CVE References: Sources used: openSUSE 12.3 (src): nagios-plugins-zypper-1.50-1.8.1 openSUSE 12.2 (src): nagios-plugins-zypper-1.50-1.9.1 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com