[openstack-dev] [nova] jsonschema for scheduler hints

Ken'ichi Ohmichi ken1ohmichi at gmail.com
Wed Dec 9 15:28:02 UTC 2015


2015-12-09 21:20 GMT+09:00 Sean Dague <sean at dague.net>:
> On 12/08/2015 11:47 PM, Ken'ichi Ohmichi wrote:
>> Hi Sylvain,
>>
>> 2015-12-04 17:48 GMT+09:00 Sylvain Bauza <sbauza at redhat.com>:
>>>>
>>>> That leaves the out-of-tree discussion about custom filters and how we
>>>> could have a consistent behaviour given that. Should we accept something in
>>>> a specific deployment while another deployment could 401 against it ? Mmm,
>>>> bad to me IMHO.
>>>
>>> We can have code to check the out-of-tree filters didn't expose any same
>>> hints with in-tree filter.
>>>
>>> Sure, and thank you for that, that was missing in the past. That said, there
>>> are still some interoperability concerns, let me explain : as a cloud
>>> operator, I'm now providing a custom filter (say MyAwesomeFilter) which does
>>> the lookup for an hint called 'my_awesome_hint'.
>>>
>>> If we enforce a strict validation (and not allow to accept any hint) it
>>> would mean that this cloud would accept a request with 'my_awesome_hint'
>>> while another cloud which wouldn't be running MyAwesomeFilter would then
>>> deny the same request.
>>
>> I am thinking the operator/vendor own filter should have some
>> implementation code for registering its original hint to jsonschema to
>> expose/validate available hints in the future.
>> The way should be easy as possible so that they can implement the code easily.
>> After that, we will be able to make the validation strict again.
>
> Yeh, that was my thinking. As someone that did a lot of the jsonschema
> work, is that something you could prototype?

Yes.
On a prototype https://review.openstack.org/#/c/220440/ , each filter
needs to contain get_scheduler_hint_api_schema() which returns
available scheduler_hints parameter. Then stevedore detects these
parameters from each filter and extends jsonschema with them.
On current prototype, the detection and extension are implemented in nova-api.
but we need to change the prototype like:

  1. nova-sched detects available scheduler-hints from filters.
  2. nova-sched passes these scheduler-hints to nova-api via RPC.
  3. nova-api extends jsonschema with the gotten scheduler-hints.

After implementing the mechanism, the operator/vendor own filters just
need to implement get_scheduler_hint_api_schema(). That is not so
hard, I feel.

Thanks
Ken Ohmichi



More information about the OpenStack-dev mailing list