check_megacli.py crashes when parsing output of `megacli`

Bug #1852945 reported by Edin S
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
hw-health-charm
Fix Released
High
Alvaro Uria

Bug Description

check_megacli.py crashes when parsing the contents of /var/lib/nagios/megacli.out (attached). The crash traceback is as follows :

/usr/local/lib/nagios/plugins/check_megacli.py
<function parse_output at 0x7fc36a0410d0> raised unknown exception '<class 'TypeError'>'
============================================================
Traceback (most recent call last):
  File "/usr/local/lib/nagios/plugins/nagios_plugin3.py", line 32, in try_check
    function(*args, **kwargs)
  File "/usr/local/lib/nagios/plugins/check_megacli.py", line 90, in parse_output
    for cnt in ('failed_ld', 'wrg_policy_ld') if vars()['cnt'] > 0
  File "/usr/local/lib/nagios/plugins/check_megacli.py", line 90, in <listcomp>
    for cnt in ('failed_ld', 'wrg_policy_ld') if vars()['cnt'] > 0
TypeError: unorderable types: str() > int()
============================================================

This error was triggered when a physical disk died.

Related branches

Revision history for this message
Edin S (exsdev) wrote :
Alvaro Uria (aluria)
Changed in hw-health-charm:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Alvaro Uria (aluria)
Revision history for this message
Alvaro Uria (aluria) wrote :

Fix released at cs:~nagios-charmers/hw-health-15

Changed in hw-health-charm:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.