How to add new Cinder scheduler filter?

asked 2016-06-14 22:47:34 -0600

Nodir gravatar image

updated 2016-06-14 22:51:46 -0600

I followed devref tutorial to implement FooFilter. I inherited filters.BaseHostFilter class and appended my class name to scheduler_default_filters of cinder.conf. However, when I create a volume I get an error saying "Scheduler Host Filter FooFilter could not be found" (see full stack trace).

Also, I am not sure which folder I should put my There seem to be two options (1) cinder/openstack/common/scheduler/filters/ and (2) cinder/scheduler/filters/ I get the same error regardless of the location. Am I missing something?

edit retag flag offensive close merge delete


I got this resolved after manually adding my class path FooFilter = cinder.scheduler.filters.foo_filter.FooFilter to the /usr/lib/python2.7/dist-packages/cinder-<version>.egg-info/entry_points.txt. Is this the right way to do this? I wonder if entry_points.txt is auto-generated.

Nodir gravatar imageNodir ( 2016-06-17 21:07:40 -0600 )edit