Hello Xinyuan, The cinder scheduler is running on only one machine (the controller). cinder.scheduler.filter_scheduler.FilterScheduler' is correctly set in cinder.conf.
Thanks, Thomas > Le 30 août 2015 à 19:34, Xinyuan Huang <[email protected]> a écrit : > > Also, please have a check that if your 'scheduler_driver' option in the > cinder.conf is set to 'cinder.scheduler.filter_scheduler.FilterScheduler'. > > Thanks, > Xinyuan > > On 31 August 2015 at 01:07, Xinyuan Huang <[email protected] > <mailto:[email protected]>> wrote: > Hi Thomas, > > Are you running multiple cinder scheduler services in different machines? If > this is the case then you need to have your new file in each of the nodes and > change cinder.conf everywhere. > > Thanks, > Xinyuan > > > Date: Sat, 29 Aug 2015 19:41:43 +0200 > From: Thomas Zilio <[email protected] <mailto:[email protected]>> > To: Erlon Cruz <[email protected] <mailto:[email protected]>> > Cc: OpenStack Mailing List <[email protected] > <mailto:[email protected]>> > Subject: Re: [Openstack] Cinder, custom filters and weighers. > Message-ID: <[email protected] > <mailto:[email protected]>> > Content-Type: text/plain; charset="utf-8" > > Hello, > > I did some more testing (on Icehouse and Juno) and the only way I was able to > test my filter (or weigher) was by editing an existing filter > (capacity_filter.py) and putting the content of my filter into it. > I had to keep the class name (CapacityFilter) otherwise I had an error > because the class CapacityFilter was not found (even if the CapacityFilter > wasn't used in cinder.cfg). > > So it looks like it only loads its default filters and somehow wants its > default filters classes if the file.py is present (removing > capacity_filter.py was not a problem). > > Anyone ever managed to use custom Cinder filters ? > And yes, everything is working as intended with Nova filters/weighers. > > Thanks and regards, > Thomas > > > Le 25 ao?t 2015 ? 14:59, Shinobu <[email protected] > > <mailto:[email protected]>> a ?crit : > > > > Sorry, my reply was to intended to different question. > > Please ignore me -; > > > > Shinobu > > > > On Tue, Aug 25, 2015 at 9:42 PM, Thomas Zilio <[email protected] > > <mailto:[email protected]> <mailto:[email protected] > > <mailto:[email protected]>>> wrote: > > Hello Erlon, > > > > Yes, my class inherits from filters.BaseHostFilter. > > That's what I though for 'scheduler_available_filters' , is this option > > required for newer release ? > > This option is mentioned here : > > http://docs.openstack.org/developer/cinder/devref/filter_scheduler.html > > <http://docs.openstack.org/developer/cinder/devref/filter_scheduler.html> > > <http://docs.openstack.org/developer/cinder/devref/filter_scheduler.html > > <http://docs.openstack.org/developer/cinder/devref/filter_scheduler.html>> > > > > The test filter is: > >> from cinder.openstack.common..scheduler import filters > >> from cinder.openstack.common import log as logging > >> > >> LOG = logging.getLogger(__name__) > >> > >> class CustomFilter(filters.BaseHostFilter): > >> def host_passes(self, host_state, filter_properties): > >> LOG.warn("Attributes of host_state: " + str(dir(host_state))) > >> > >> if host_state.host == "host1.xxx.xxx": > >> LOG.warn("Don't want you: " + host_state.host) > >> return False > >> return True > > > > > > I'll look into host_manager.py but I'm not sure what more it can give me. > > > > Thanks, > > Thomas > > > > > >> Le 25 ao?t 2015 ? 14:16, Erlon Cruz <[email protected] > >> <mailto:[email protected]> <mailto:[email protected] > >> <mailto:[email protected]>>> a ?crit : > >> > >> Hi Thomas, > >> > >> Is you class inheriting from 'filters.BaseHostFilter'? Also, there's no > >> such option 'scheduler_available_filters' in openstack/icehouse. > >> A good way to have an insight of your problem is to put logs into > >> 'cinder/scheduler/host_manager.py -> _choose_host_filters'. > >> > >> Erlon > >> > >> On Tue, Aug 25, 2015 at 9:02 AM, Shinobu <[email protected] > >> <mailto:[email protected]> <mailto:[email protected] > >> <mailto:[email protected]>>> wrote: > >> Yes, it's possible using inspectors. > >> > >> Shinobu > >> > >> On Tue, Aug 25, 2015 at 8:32 PM, Thomas Zilio <[email protected] > >> <mailto:[email protected]> <mailto:[email protected] > >> <mailto:[email protected]>>> wrote: > >> Hello, > >> > >> I'm trying to test some custom cinder filters and weighers but I can't > >> manage to make it work. > >> I did the same for Nova and everything is working but the Cinder scheduler > >> can't seem to find my custom classes. > >> > >> My tests are made on a Icehouse installation. > >> > >> The error message appearing in the log is the following one: > >> > SchedulerHostFilterNotFound: Scheduler Host Filter CustomFilter could > >> > not be found. > >> > >> The filter file is in the directory : > >> /usr/lib/python2.6/site-packages/cinder/scheduler/filters > >> And I added these lines to the cinder.conf file (not sure if the first one > >> is required). > >> > scheduler_available_filters=custom_filter.CustomFilter > >> > scheduler_default_filters=AvailabilityZoneFilter,CapacityFilter,CapabilitiesFilter,CustomFilter > >> > >> My filter file name is custom_filter.py and the class is CustomFilter. > >> > >> I don't think it's related to what my filter does since it's not even > >> found by the scheduler. > >> I'm encountering the same issues with the weighers (and everything is > >> working just fine on the Nova scheduler side). > >> > >> If anyone has any idea how I could make this work I would be really > >> grateful ! > >> > >> Thanks and regards, > >> Thomas > >> _______________________________________________ > >> Mailing list: > >> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack > >> <http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack> > >> <http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack > >> <http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack>> > >> Post to : [email protected] > >> <mailto:[email protected]> > >> <mailto:[email protected] > >> <mailto:[email protected]>> > >> Unsubscribe : > >> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack > >> <http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack> > >> <http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack > >> <http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack>> > >> > >> > >> > >> -- > >> Email: > >> [email protected] <mailto:[email protected]> <mailto:[email protected] > >> <mailto:[email protected]>> > >> [email protected] <mailto:[email protected]> <mailto:[email protected] > >> <mailto:[email protected]>> > >> > >> ?Life w/ Linux <http://i-shinobu.hatenablog.com/ > >> <http://i-shinobu.hatenablog.com/>> > >> > >> _______________________________________________ > >> Mailing list: > >> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack > >> <http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack> > >> <http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack > >> <http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack>> > >> Post to : [email protected] > >> <mailto:[email protected]> > >> <mailto:[email protected] > >> <mailto:[email protected]>> > >> Unsubscribe : > >> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack > >> <http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack> > >> <http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack > >> <http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack>> > >> > >> > > > > > > _______________________________________________ > > Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack > > <http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack> > > <http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack > > <http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack>> > > Post to : [email protected] > > <mailto:[email protected]> > > <mailto:[email protected] > > <mailto:[email protected]>> > > Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack > > <http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack> > > <http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack > > <http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack>> > > > > > > > > > > -- > > Email: > > [email protected] <mailto:[email protected]> <mailto:[email protected] > > <mailto:[email protected]>> > > [email protected] <mailto:[email protected]> <mailto:[email protected] > > <mailto:[email protected]>> > > > > ?Life w/ Linux <http://i-shinobu.hatenablog.com/ > > <http://i-shinobu.hatenablog.com/>> > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > <http://lists.openstack.org/pipermail/openstack/attachments/20150829/592b0aa1/attachment-0001.html > > <http://lists.openstack.org/pipermail/openstack/attachments/20150829/592b0aa1/attachment-0001.html>> > > ------------------------------ > > _______________________________________________ > Openstack mailing list > [email protected] <mailto:[email protected]> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack > <http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack> > > > End of Openstack Digest, Vol 26, Issue 29 > ***************************************** > >
_______________________________________________ Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack Post to : [email protected] Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
