Compute manager NotFound exception inconsistent

Bug #1400764 reported by Kyle L. Henderson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Joe Gordon

Bug Description

Nova compute manager calls the compute driver to get the instance state in both _get_power_state() and _query_driver_power_state_and_sync(), however it's inconsistent in what exception is expected when an instance does not exist.

In _get_power_state() it expects NotFound and returns NOSTATE

In _query_driver_power_state_and_sync() it expects InstanceNotFound and uses NOSTATE as the current instance state.

Joe Gordon (jogo)
Changed in nova:
status: New → Confirmed
importance: Undecided → Wishlist
importance: Wishlist → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/140829

Changed in nova:
assignee: nobody → Joe Gordon (jogo)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit a0bfd6669899a387e230a991181eb2e3833e17c2
Author: Joe Gordon <email address hidden>
Date: Wed Dec 10 12:04:19 2014 -0800

    Catch more specific exception in _get_power_state

    _get_power_state expects InstanceNotFound and not its parent exception
    NotFound. So catch the more specific exception to make the code
    consistent and so we don't hide other issues.

    Change-Id: I64b79d954f1b48d073b0a4662a58c803425c015f
    Closes-Bug: #1400764

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → kilo-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: kilo-2 → 2015.1.0
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.