Deleting compute service can fail with 500 error if HostMappingNotFound

Bug #1781625 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Triaged
High
Matt Riedemann
Pike
New
Undecided
Unassigned
Queens
New
Undecided
Unassigned

Bug Description

This was noted in the change that added code to delete host mapping records when deleting a nova-compute service, but it was missed in the change:

https://review.openstack.org/#/c/554920/4/nova/api/openstack/compute/services.py@241

But when we delete a compute service using DELETE /os-services/{service_id} we don't know if it's a compute service or not so we lookup the service by id by iterating cells, not by hostname so we don't know if the host mapping exists (and it might not if the service was started/created before discover_hosts was run). In that case, deleting the host mapping will fail with HostMappingNotFound which will prevent us from deleting the compute service. We should just handle the HostMappingNotFound and pass if it's not there when deleting the service.

Tags: api cells
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.