cinder scheduler failed to filter Huawei backend volume

Bug #1177678 reported by zhangchao
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
zhangchao

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/amqp.py", line 430, in _process_data
    rval = self.proxy.dispatch(ctxt, version, method, **args)
  File "/usr/lib/python2.7/dist-packages/cinder/openstack/common/rpc/dispatcher.py", line 133, in dispatch
    return getattr(proxyobj, method)(ctxt, **kwargs)
  File "/usr/lib/python2.7/dist-packages/cinder/scheduler/manager.py", line 115, in create_volume
    context, ex, request_spec)
  File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
    self.gen.next()
  File "/usr/lib/python2.7/dist-packages/cinder/scheduler/manager.py", line 104, in create_volume
    filter_properties)
  File "/usr/lib/python2.7/dist-packages/cinder/scheduler/filter_scheduler.py", line 67, in schedule_create_volume
    filter_properties)
  File "/usr/lib/python2.7/dist-packages/cinder/scheduler/filter_scheduler.py", line 204, in _schedule
    filter_properties)
  File "/usr/lib/python2.7/dist-packages/cinder/scheduler/host_manager.py", line 227, in get_filtered_hosts
    filter_properties)
  File "/usr/lib/python2.7/dist-packages/cinder/openstack/common/scheduler/filter.py", line 71, in get_filtered_objects
    return list(objs)
  File "/usr/lib/python2.7/dist-packages/cinder/openstack/common/scheduler/filter.py", line 40, in filter_all
    for obj in filter_obj_list:
  File "/usr/lib/python2.7/dist-packages/cinder/openstack/common/scheduler/filter.py", line 41, in filter_all
    if self._filter_one(obj, filter_properties):
  File "/usr/lib/python2.7/dist-packages/cinder/openstack/common/scheduler/filters/__init__.py", line 30, in _filter_one
    return self.host_passes(obj, filter_properties)
  File "/usr/lib/python2.7/dist-packages/cinder/scheduler/filters/capacity_filter.py", 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.

Tags: drivers
zhangchao (zhangchao010)
tags: added: drivers
zhangchao (zhangchao010)
Changed in cinder:
assignee: nobody → zhangchao (zhangchao010)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/28552

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/28585

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/28585
Committed: http://github.com/openstack/cinder/commit/59fc6cbd95ed83f7dfad2ee9317487d3ab0cc285
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)
Changed in cinder:
milestone: none → havana-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: havana-1 → 2013.2
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.