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