Project

General

Profile

Actions

Bug #21904

closed

mgr[zabbix] float division by zero (osd['kb'] = 0)

Added by Ilja Slepnev over 6 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
zabbix module
Target version:
-
% Done:

0%

Source:
Community (user)
Tags:
Backport:
luminous
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Issued ceph osd out 0 and zabbix monitoring stopped.

root@host:~# ceph zabbix send
Error EINVAL: Traceback (most recent call last):
  File "/usr/lib/ceph/mgr/zabbix/module.py", line 234, in handle_command
    self.send()
  File "/usr/lib/ceph/mgr/zabbix/module.py", line 206, in send
    data = self.get_data()
  File "/usr/lib/ceph/mgr/zabbix/module.py", line 174, in get_data
    osd_fill.append((float(osd['kb_used']) / float(osd['kb'])) * 100)
ZeroDivisionError: float division by zero

Fix is trivial, need to check that osd['kb'] is not zero


Related issues 1 (0 open1 closed)

Copied to mgr - Backport #22196: luminous: mgr[zabbix] float division by zero (osd['kb'] = 0)ResolvedShinobu KinjoActions
Actions #1

Updated by John Spray over 6 years ago

  • Category changed from ceph-mgr to zabbix module
Actions #2

Updated by Kefu Chai over 6 years ago

  • Status changed from New to Fix Under Review
Actions #3

Updated by Kefu Chai over 6 years ago

  • Assignee set to Kefu Chai
Actions #4

Updated by Kefu Chai over 6 years ago

  • Backport set to luminous
Actions #5

Updated by Kefu Chai over 6 years ago

  • Status changed from Fix Under Review to Pending Backport
Actions #6

Updated by Nathan Cutler over 6 years ago

  • Copied to Backport #22196: luminous: mgr[zabbix] float division by zero (osd['kb'] = 0) added
Actions #7

Updated by Kefu Chai over 6 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF