Project

General

Profile

Bug #21904

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

Added by Ilja Slepnev over 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
zabbix module
Target version:
-
Start date:
10/24/2017
Due date:
% Done:

0%

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

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

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

History

#1 Updated by John Spray over 1 year ago

  • Category changed from ceph-mgr to zabbix module

#2 Updated by Kefu Chai over 1 year ago

  • Status changed from New to Need Review

#3 Updated by Kefu Chai over 1 year ago

  • Assignee set to Kefu Chai

#4 Updated by Kefu Chai over 1 year ago

  • Backport set to luminous

#5 Updated by Kefu Chai over 1 year ago

  • Status changed from Need Review to Pending Backport

#6 Updated by Nathan Cutler over 1 year ago

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

#7 Updated by Kefu Chai about 1 year ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF