nova.compute.api don't raise exception when an instance is locked

Bug #872541 reported by Nachi Ueno
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Dan Smith
OpenStack Quality Assurance
Fix Released
High
Unassigned

Bug Description

nova.compute.api don't raise exception when an instance is locked.
The Compute manager and the driver do nothing, but api says "request succeed" in this case.
nova.compute.api should check instance lock and nova.compute.api must raise proper exceptions.

Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → Medium
status: New → Confirmed
Nachi Ueno (nati-ueno)
Changed in nova:
status: Confirmed → In Progress
Changed in openstack-qa:
status: New → In Progress
importance: Undecided → Medium
Changed in nova:
assignee: nobody → Nachi Ueno (nati-ueno)
Changed in openstack-qa:
assignee: nobody → Nachi Ueno (nati-ueno)
importance: Medium → High
Nachi Ueno (nati-ueno)
Changed in nova:
assignee: Nachi Ueno (nati-ueno) → nobody
Changed in openstack-qa:
assignee: Nachi Ueno (nati-ueno) → nobody
Revision history for this message
Mark McLoughlin (markmc) wrote :

Bug is no longer assigned to anyone, so moving from InProgress to Confirmed

Changed in nova:
status: In Progress → Confirmed
Changed in nova:
assignee: nobody → Tim Simpson (timsimpson4)
Changed in nova:
assignee: Tim Simpson (timsimpson4) → nobody
Changed in nova:
assignee: nobody → shanthkumar khandre (shanthkumar09)
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/10355

Changed in nova:
assignee: shanthkumar khandre (shanthkumar09) → Dan Smith (danms)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/10355
Committed: http://github.com/openstack/nova/commit/0c0e47b6ca2b88481891f742ee0e11cdef21c957
Submitter: Jenkins
Branch: master

commit 0c0e47b6ca2b88481891f742ee0e11cdef21c957
Author: Dan Smith <email address hidden>
Date: Thu Jul 26 09:11:05 2012 -0700

    Check instance lock in compute/api

    This adds a check for the instance lock in compute/api.py, which:
    1. Helps avoid the need to call into the manager just to be stopped
       by the lock there
    2. Returns a failure to the user right away when an operation cannot
       be completed due to the lock
    3. Avoids the potential for task_state to get into an unhappy state
       because a user unknowingly attempts an action whilst an instance
       is locked
    4. Avoids the manager from having to re-do the lock check by
       stuffing a flag into RequestContext when the check has already
       been done by api.py

    Various tests needed to be fixed up in order to pass fake instances
    with the locked attribute. We could make the decorator ignore
    instances without it, but I think it's more explicit to push that
    requirement into the tests.

    This fixes bug 872541

    Change-Id: I1127e31d86a061a93a64ee1eb4a4d900d8bf49b5

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → folsom-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: folsom-3 → 2012.2
Nachi Ueno (nati-ueno)
Changed in openstack-qa:
status: In Progress → Fix Released
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.