cinder scheduler failed to filter Huawei backend volume

Bug #1177678 reported by zhangchao on 2013-05-08
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

When using Huawei driver, we got expection message in cinder scheduler. The log as follows:

2013-05-07 13:35:05 WARNING [cinder.scheduler.host_manager] service is down or disabled.
2013-05-07 13:35:05 ERROR [cinder.scheduler.manager] Failed to schedule_create_volume: can't multiply sequence by non-int of type 'float'
2013-05-07 13:35:05 ERROR [cinder.openstack.common.rpc.amqp] Exception during message handling
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/cinder/openstack/common/rpc/", line 430, in _process_data
    rval = self.proxy.dispatch(ctxt, version, method, **args)
  File "/usr/lib/python2.7/dist-packages/cinder/openstack/common/rpc/", line 133, in dispatch
    return getattr(proxyobj, method)(ctxt, **kwargs)
  File "/usr/lib/python2.7/dist-packages/cinder/scheduler/", line 115, in create_volume
    context, ex, request_spec)
  File "/usr/lib/python2.7/", line 24, in __exit__
  File "/usr/lib/python2.7/dist-packages/cinder/scheduler/", line 104, in create_volume
  File "/usr/lib/python2.7/dist-packages/cinder/scheduler/", line 67, in schedule_create_volume
  File "/usr/lib/python2.7/dist-packages/cinder/scheduler/", line 204, in _schedule
  File "/usr/lib/python2.7/dist-packages/cinder/scheduler/", line 227, in get_filtered_hosts
  File "/usr/lib/python2.7/dist-packages/cinder/openstack/common/scheduler/", line 71, in get_filtered_objects
    return list(objs)
  File "/usr/lib/python2.7/dist-packages/cinder/openstack/common/scheduler/", line 40, in filter_all
    for obj in filter_obj_list:
  File "/usr/lib/python2.7/dist-packages/cinder/openstack/common/scheduler/", line 41, in filter_all
    if self._filter_one(obj, filter_properties):
  File "/usr/lib/python2.7/dist-packages/cinder/openstack/common/scheduler/filters/", line 30, in _filter_one
    return self.host_passes(obj, filter_properties)
  File "/usr/lib/python2.7/dist-packages/cinder/scheduler/filters/", line 51, in host_passes
    free = math.floor(free_space * (1 - reserved))
TypeError: can't multiply sequence by non-int of type 'float'

The type of free_space should be float, not sequence.

zhangchao (zhangchao010) on 2013-05-08
tags: added: drivers
zhangchao (zhangchao010) on 2013-05-08
Changed in cinder:
assignee: nobody → zhangchao (zhangchao010)
status: New → In Progress

Fix proposed to branch: master

Submitter: Jenkins
Branch: master

commit 59fc6cbd95ed83f7dfad2ee9317487d3ab0cc285
Author: zhangchao010 <email address hidden>
Date: Fri May 10 20:25:53 2013 +0800

    Change the type of "free_capacity_gb" to be float

    Change the type of "free_capacity_gb" from string to float
    in function _get_free_capacity.

    Fix bug: 1177678
    Change-Id: If2654fc3ad6b3dbea6a8cc0be7ae041ad30bf876

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2013-05-29
Changed in cinder:
milestone: none → havana-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-10-17
Changed in cinder:
milestone: havana-1 → 2013.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers