hypervisor show/uptime may give inaccurate results when using multiple cells and a duplicate id

Bug #1690845 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Confirmed
Medium
Unassigned

Bug Description

This was pointed out during review:

https://review.openstack.org/#/c/461532/4/nova/compute/api.py@4536

If we have multiple cells and compute hosts within them that have the same primary key id, doing a show or uptime call to the os-hypervisors API could result in retrieving the wrong host.

For example, let's say I have two cells, A and B, and a nova-compute service in each one with id=1.

When I want to show details on that one (GET /os-hypervisors/1) I'm only going to get it back from the first cell processed (A).

The API should be smarter about letting the user know when there are duplicates and fail, like we do for showing details about or deleting a service record in the os-services API and the nova.compute.api.HostAPI._find_service method.

Eventually when we add a microversion to get/return compute nodes (hypervisors) and services by their unique uuid then we won't need to worry about the duplicate case. That's being worked in this blueprint: https://blueprints.launchpad.net/nova/+spec/service-hyper-uuid-in-api

Tags: api multi-cell
Matt Riedemann (mriedem)
Changed in nova:
assignee: nobody → Matt Riedemann (mriedem)
assignee: Matt Riedemann (mriedem) → nobody
Revision history for this message
Alex Xu (xuhj) wrote :
Changed in nova:
status: Triaged → In Progress
assignee: nobody → Dan Peschman (dpeschman)
Revision history for this message
Matt Riedemann (mriedem) wrote :

Alex, I don't actually see a patch up for this yet.

Changed in nova:
status: In Progress → Confirmed
assignee: Dan Peschman (dpeschman) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.