Divide by zero can occur when querying non-active VM
Bug #1492831 reported by
Drew Thorstensen
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ceilometer-powervm |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[-] float division by zero
Traceback (most recent call last):
File "/usr/lib/
instance_obj, duration=None)
File "/usr/lib/
util = float(util_cap + util_uncap - idle - donated) / float(entitled)
ZeroDivisionError: float division by zero
Changed in ceilometer-powervm: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/220843 /git.openstack. org/cgit/ stackforge/ ceilometer- powervm/ commit/ ?id=1885f85438b 38a952cbf0313ff 079d18e50809e8
Committed: https:/
Submitter: Jenkins
Branch: master
commit 1885f85438b38a9 52cbf0313ff079d 18e50809e8
Author: Drew Thorstensen <email address hidden>
Date: Sun Sep 6 15:48:13 2015 -0400
Handle unstarted instances
In the rare event that a VM is queried for CPU utilization before its
first boot, the entitled cycles may be 0. This resulted in a divide by
zero error. This change detects that scenario and removes the divide by
zero possibility.
Change-Id: If37422e7b501c6 0ad2b1cb610b8c7 802e6543942
Closes-Bug: 1492831