Invalid exception raised (ComputeServiceUnavailable) if host is not found

Bug #1538837 reported by javeme
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
javeme

Bug Description

Invalid exception raised (ComputeServiceUnavailable) if host is not found

When performing a live migration, I passed a wrong host parameter, and then I got a wrong result like this:
"Compute service of host-1 is unavailable at this time".
I thought the compute service stopped, but the fact was I passed a host id instead of a host name, therefore it could not find the host.

In order to distinguish the error "host not found" from the error "service not available", I think we should raise a different exception like ComputeServiceNotExist.

Changed in nova:
assignee: nobody → javeme (javaloveme)
status: New → In Progress
Changed in nova:
importance: Undecided → Low
tags: added: live-migration
Revision history for this message
Pawel Koniszewski (pawel-koniszewski) wrote :
summary: - raise ComputeServiceNotExist instead of ComputeServiceUnavailable if
- host is not found
+ Invalid exception raised (ComputeServiceUnavailable) if host is not
+ found
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit c824982e6a3d6660697e503f7236377cc8202d41
Author: Javeme <email address hidden>
Date: Mon Nov 9 20:37:34 2015 +0800

    raise exception ComputeHostNotFound if host is not found

    When performing a live migration,I passed a wrong host parameter,
    and then I got a wrong result like this:
    "Compute service of host-1 is unavailable at this time".
    I thought the compute service stopped, but the fact was I passed
    a host id instead of a host name,therefore it could not find the host.

    In order to distinguish the error "host not found" from the error
    "service not available", I think we should raise a different exception
    ComputeHostNotFound instead of ComputeServiceUnavailable.

    This patch we will return more accurate error msg for live migration.

    Closes-Bug: #1538837
    Change-Id: I6ad377147070f85b9b1d5a1d1be459e890e02bcc

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to nova (master)

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

commit 89bf80202b2e3501a4673bc527e7e17cd0b116be
Author: Pawel Koniszewski <email address hidden>
Date: Fri Jul 29 10:17:26 2016 +0200

    Add missing ComputeHostNotFound exception in live-migration

    Commit c824982e6a3d6660697e503f7236377cc8202d41 did not update
    expected exceptions. Therefore we end up with 500 internal server
    error when triggering targeted live migration to non-existing compute
    node. This patch adds ComputeHostNotFound to expected exception list
    in both, conductor and API.

    Change-Id: If515a90217a8e329d932dcacb357b78081c505c1
    Related-bug: 1538837

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 14.0.0.0b3

This issue was fixed in the openstack/nova 14.0.0.0b3 development milestone.

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.