[watcher] Question about baremetal node support in nova CDM

Matt Riedemann mriedemos at gmail.com
Wed May 29 20:16:19 UTC 2019


On 5/23/2019 4:40 PM, Matt Riedemann wrote:
> Only in the case of ironic would we potentially get more than one 
> hypervisor (node) for a single compute service (host).

As I was working on the change, I realized that while this is true, it's 
not strictly what this API could return:

GET /os-hypervisors/detail?hypervisor_hostname_pattern=$node_hostname

The problem is that is a fuzzy match in the DB query [1] so if you have 
some computes like this:

compute1
compute10
compute100

And we're searching on compute1 we could get back 3 hypervisors which 
would break on the watcher side, so we can't really use that.

There was a similar problem in some nova CLIs [2] which essentially does 
the same kind of strict hostname checking that watcher already does.

So unfortunately this means I can't replace that code in watcher just 
yet. But if the compute API adds a service host filter to the 
hypervisors API we could push the strict service hostname filtering into 
the server rather than the client (watcher). I can draft a nova spec for 
that.

[1] 
https://github.com/openstack/nova/blob/d4f58f5eb6e68d0348868efc45212b70feb0bde1/nova/db/sqlalchemy/api.py#L676
[2] https://review.opendev.org/#/c/520187/

-- 

Thanks,

Matt



More information about the openstack-discuss mailing list