Incorrect exception raised during evacuate instance

Bug #1230282 reported by Rohit Karajgi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Tiago Mello

Bug Description

An incorrect exception, which looks to contradict the corresponding log message logged
at this scenario seems to be raised in the evacuate instance API.

Evacuate instance needs to check that the compute service is actually down to perform evacuation of an instance,
but the exception raised when this check fails is incorrect:

https://github.com/openstack/nova/blob/master/nova/compute/api.py#L2907
    if self.servicegroup_api.service_is_up(service):
       ....

logs the message "Instance compute service state on <compute_host> expected to be down, but it was up."
if the check passes, but raises the exception exception.ComputeServiceUnavailable(Instance compute service state on <compute_host> expected to be down, but it was up.)

The exception raised and the message logged are contradictory.

Tags: ntt
Tiago Mello (timello)
Changed in nova:
assignee: nobody → Tiago Rodrigues de Mello (timello)
importance: Undecided → 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/48325

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

Reviewed: https://review.openstack.org/48325
Committed: http://github.com/openstack/nova/commit/fe513ec3707afd529270f0c4eef7c468ab2c6b91
Submitter: Jenkins
Branch: master

commit fe513ec3707afd529270f0c4eef7c468ab2c6b91
Author: Tiago Mello <email address hidden>
Date: Wed Sep 25 15:55:13 2013 -0300

    Fix incorrect exception raised during evacuate

    This change creates a new exception 'ComputeServiceInUse'
    to better represent the error when trying to evacuate
    an instance with a running compute service. Also, it adds
    a missing test for evacuate API v3.

    Closes-Bug: #1230282

    Change-Id: I1c4edb01e84cd2a89879bca9c99f5e38f47e16fb

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