← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1781625] [NEW] Deleting compute service can fail with 500 error if HostMappingNotFound

 

*** This bug is a duplicate of bug 1780727 ***
    https://bugs.launchpad.net/bugs/1780727

Public bug reported:

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.

** Affects: nova
     Importance: High
     Assignee: Matt Riedemann (mriedem)
         Status: Triaged

** Affects: nova/pike
     Importance: Undecided
         Status: New

** Affects: nova/queens
     Importance: Undecided
         Status: New


** Tags: api cells

** Also affects: nova/pike
   Importance: Undecided
       Status: New

** Also affects: nova/queens
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1781625

Title:
  Deleting compute service can fail with 500 error if
  HostMappingNotFound

Status in OpenStack Compute (nova):
  Triaged
Status in OpenStack Compute (nova) pike series:
  New
Status in OpenStack Compute (nova) queens series:
  New

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1781625/+subscriptions