[watcher] Question about baremetal node support in nova CDM
mriedemos at gmail.com
Thu May 23 21:40:17 UTC 2019
While working on  I noticed that the
NovaHelper.get_compute_node_by_hostname method is making 3 API calls to
get the details about a hypervisor:
1. listing hypervisors and then filtering client-side by the compute
service host - this fails if there is not exactly one hypervisor for the
given compute service host name
2. search for the hypervisor given the hypervisor_hostname to get the id
3. get the hypervisor details using the id
My patch is collapsing 2 and 3 into a single API call to nova.
The question I had was if we need that first call. For all non-ironic
baremetal nodes, the compute service host and node hypervisor_hostname
should be identical, so technically we could just search for the
hypervisor details with the compute service hostname.
Only in the case of ironic would we potentially get more than one
hypervisor (node) for a single compute service (host).
I don't think the nova CDM code really handles baremetal instances at
all because it's not handling this kind of host:node 1:M cardinality
elsewhere in the code, but you also can't do most things to optimize
like cold or live migrating baremetal instances.
I'm not exactly sure how Watcher deals with ironic but I know there is
the separate BaremetalClusterDataModelCollector so I'm assuming watcher
just optimizes for baremetal outside of the nova compute API?
If this is true, then we can get rid of that first API all noted above
and I don't need to write a nova spec to add a host filter parameter to
the GET /os-hypervisors/detail API.
More information about the openstack-discuss