<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hello Erlon,<div class=""><br class=""></div><div class="">Yes, my class inherits from filters.BaseHostFilter.</div><div class="">That's what I though for  'scheduler_available_filters' , is this option required for newer release ?</div><div class="">This option is mentioned here : <a href="http://docs.openstack.org/developer/cinder/devref/filter_scheduler.html" class="">http://docs.openstack.org/developer/cinder/devref/filter_scheduler.html</a></div><div class=""><br class=""></div><div class="">The test filter is:</div><div class=""><blockquote type="cite" class="">from cinder.openstack.common..scheduler import filters<br class="">from cinder.openstack.common import log as logging<br class=""><br class="">LOG = logging.getLogger(__name__)<br class=""><br class="">class CustomFilter(filters.BaseHostFilter):<br class="">    def host_passes(self, host_state, filter_properties):<br class="">        LOG.warn("Attributes of host_state: " + str(dir(host_state)))<br class="">        <br class="">        if host_state.host == "host1.xxx.xxx":<br class="">            LOG.warn("Don't want you: " + host_state.host)<br class="">            return False<br class="">        return True</blockquote></div><div class=""><br class=""></div><div class="">I'll look into host_manager.py but I'm not sure what more it can give me.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Thomas</div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">Le 25 août 2015 à 14:16, Erlon Cruz <<a href="mailto:sombrafam@gmail.com" class="">sombrafam@gmail.com</a>> a écrit :</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi Thomas,<div class=""><br class=""></div><div class="">Is you class inheriting from 'filters.BaseHostFilter'? Also, there's no such option '<span style="font-size: 12.7272720336914px;" class="">scheduler_available_filters</span>' in openstack/icehouse.</div><div class="">A good way to have an insight of your problem is to put logs into 'cinder/scheduler/host_manager.py -> _choose_host_filters'.</div><div class=""><br class=""></div><div class="">Erlon</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Tue, Aug 25, 2015 at 9:02 AM, Shinobu <span dir="ltr" class=""><<a href="mailto:shinobu.kj@gmail.com" target="_blank" class="">shinobu.kj@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class=""><div class="">Yes, it's possible using inspectors.<br class=""><br class=""></div>Shinobu<br class=""></div><div class="gmail_extra"><div class=""><div class="h5"><br class=""><div class="gmail_quote">On Tue, Aug 25, 2015 at 8:32 PM, Thomas Zilio <span dir="ltr" class=""><<a href="mailto:zilio@efficit.com" target="_blank" class="">zilio@efficit.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br class="">
<br class="">
I'm trying to test some custom cinder filters and weighers but I can't manage to make it work.<br class="">
I did the same for Nova and everything is working but the Cinder scheduler can't seem to find my custom classes.<br class="">
<br class="">
My tests are made on a Icehouse installation.<br class="">
<br class="">
The error message appearing in the log is the following one:<br class="">
> SchedulerHostFilterNotFound: Scheduler Host Filter CustomFilter could not be found.<br class="">
<br class="">
The filter file is in the directory : /usr/lib/python2.6/site-packages/cinder/scheduler/filters<br class="">
And I added these lines to the cinder.conf file (not sure if the first one is required).<br class="">
> scheduler_available_filters=custom_filter.CustomFilter<br class="">
> scheduler_default_filters=AvailabilityZoneFilter,CapacityFilter,CapabilitiesFilter,CustomFilter<br class="">
<br class="">
My filter file name is custom_filter.py and the class is CustomFilter.<br class="">
<br class="">
I don't think it's related to what my filter does since it's not even found by the scheduler.<br class="">
I'm encountering the same issues with the weighers (and everything is working just fine on the Nova scheduler side).<br class="">
<br class="">
If anyone has any idea how I could make this work I would be really grateful !<br class="">
<br class="">
Thanks and regards,<br class="">
Thomas<br class="">
_______________________________________________<br class="">
Mailing list: <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" rel="noreferrer" target="_blank" class="">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br class="">
Post to     : <a href="mailto:openstack@lists.openstack.org" target="_blank" class="">openstack@lists.openstack.org</a><br class="">
Unsubscribe : <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" rel="noreferrer" target="_blank" class="">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br class="">
</blockquote></div><br class=""><br clear="all" class=""><br class=""></div></div><span class="HOEnZb"><font color="#888888" class="">-- <br class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class="">Email:<br class=""> <a href="mailto:shinobu@linux.com" target="_blank" class="">shinobu@linux.com</a><br class=""> <a href="mailto:skinjo@redhat.com" target="_blank" class="">skinjo@redhat.com</a><br class=""><br class=""><a href="http://i-shinobu.hatenablog.com/" target="_blank" class=""> Life w/ Linux</a><br class=""></div></div></div></div></div></div></div>
</font></span></div>
<br class="">_______________________________________________<br class="">
Mailing list: <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" rel="noreferrer" target="_blank" class="">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br class="">
Post to     : <a href="mailto:openstack@lists.openstack.org" class="">openstack@lists.openstack.org</a><br class="">
Unsubscribe : <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" rel="noreferrer" target="_blank" class="">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br class="">
<br class=""></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></body></html>