由于项目中使用的OpenStack一直停留在F版本,因此在操作系统(Ubuntu 12.04 LTS)不断更新的情况下,难免会出现各种莫名其妙的问题。
安装完Openstack,各子模块均运行正常,开始功能测试,发现cinder创建volume命令发起之后后台报错:
2014-01-04 09:43:10 WARNING cinder.scheduler.manager [req-668ac624-60d5-488c-9e89-5cb915dc6c72 d6c0ca6fec41473f8ac53a8da4c3c38a c804f639bf4c47a29bb9aac195f4744c] Failed to schedule_create_volume: Scheduler Host Filter AvailabilityZoneFilter, CapacityFilter, CapabilitiesFilter could not be found.
2014-01-04 09:43:10 ERROR cinder.openstack.common.rpc.amqp [-] Exception during message handling
2014-01-04 09:43:10 TRACE cinder.openstack.common.rpc.amqp Traceback (most recent call last):
2014-01-04 09:43:10 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/openstack/common/rpc/amqp.py", line 276, in _process_data
2014-01-04 09:43:10 TRACE cinder.openstack.common.rpc.amqp rval = self.proxy.dispatch(ctxt, version, method, **args)
2014-01-04 09:43:10 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/openstack/common/rpc/dispatcher.py", line 145, in dispatch
2014-01-04 09:43:10 TRACE cinder.openstack.common.rpc.amqp return getattr(proxyobj, method)(ctxt, **kwargs)
2014-01-04 09:43:10 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/scheduler/manager.py", line 114, in create_volume
2014-01-04 09:43:10 TRACE cinder.openstack.common.rpc.amqp context, ex, request_spec)
2014-01-04 09:43:10 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/Python2.7/contextlib.py", line 24, in __exit__
2014-01-04 09:43:10 TRACE cinder.openstack.common.rpc.amqp self.gen.next()
2014-01-04 09:43:10 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/scheduler/manager.py", line 103, in create_volume
2014-01-04 09:43:10 TRACE cinder.openstack.common.rpc.amqp filter_properties)
2014-01-04 09:43:10 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/scheduler/filter_scheduler.py", line 66, in schedule_create_volume
2014-01-04 09:43:10 TRACE cinder.openstack.common.rpc.amqp filter_properties)
2014-01-04 09:43:10 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/scheduler/filter_scheduler.py", line 118, in _schedule
2014-01-04 09:43:10 TRACE cinder.openstack.common.rpc.amqp filter_properties)
2014-01-04 09:43:10 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/scheduler/host_manager.py", line 218, in get_filtered_hosts
2014-01-04 09:43:10 TRACE cinder.openstack.common.rpc.amqp filter_classes = self._choose_host_filters(filter_class_names)
2014-01-04 09:43:10 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/scheduler/host_manager.py", line 185, in _choose_host_filters
2014-01-04 09:43:10 TRACE cinder.openstack.common.rpc.amqp raise exception.SchedulerHostFilterNotFound(filter_name=msg)
2014-01-04 09:43:10 TRACE cinder.openstack.common.rpc.amqp SchedulerHostFilterNotFound: Scheduler Host Filter AvailabilityZoneFilter, CapacityFilter, CapabilitiesFilter could not be found.
Google到的结果大多是G版本更新带入的Bug,并且已经解决:https://bugs.launchpad.net/ubuntu/+source/cinder/+bug/1126378
不过由于项目无法直接更新G版本Openstack代码,所以只能另找其他解决方法。首先排除代码近期被修改的可能。此功能在上线运行的环境中运行正常,并且同事近期的部署也未见异常,联想到出问题的环境我用了 Ubuntu-12.04.2-LTS这个OS版本进行安装,而生产环境和其他同事的部署都在Ubuntu-12.04.1-LTS进行,所以感觉问题应该出现在cinder模块依赖上。