Comment 5 for bug 1361186

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/126851
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=b0feaba45ff53d20a93bc4b29936d13550d15bf6
Submitter: Jenkins
Branch: master

commit b0feaba45ff53d20a93bc4b29936d13550d15bf6
Author: Dheeraj Gupta <email address hidden>
Date: Wed Oct 8 09:24:18 2014 +0000

    Make service-delete work in API cells

    nova service-delete is handled by HostAPI.service_delete method.
    Normally, it searches for relevant Service object in DB and calls
    destroy() on it. However, in API cell it is over-ridden so that
    service_delete message can be routed to appropriate cell. Once the
    destination cell is reached, the message processor invokes
    HostAPI.service_delete to perform the actual delete. This works in
    case of child cells.
    However in case of API cells, since HostAPI.service_delete has been
    over-ridden, when the message processor invokes HostAPI.service_delete
    to perform actual delete of the service, the API cell tries to again
    route the message and fails in doing so with an AttributeError (as
    the message is already at the destination cell and can not be further
    routed).
    This patch moves the object destroy() call to a separate function and
    modifies the message processor to call the new function. The original
    service_delete is modified to also call the new function.

    Change-Id: I9148d8ceb5cdeb858dc9741b24cf0e03487c9a62
    Closes-Bug: 1361186