live-migration to an invalid host should exist gracefully. Currently, it throws a stack trace

Bug #1159755 reported by Kashyap Chamarthy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Nikola Đipanov
Folsom
Fix Released
Medium
Nikola Đipanov

Bug Description

Description
-----------
Configure nova, boot a couple of instances, & migrate any instance to a destination (which is invalid -- no compute service on it)

   $ nova live-migration 6fdcafa3-b86b-479e-b1cf-5e6859912e65 test1.foo.bar.com

Actual results:
--------------
An ungraceful stack trace:
#============================#
$ nova live-migration 6fdcafa3-b86b-479e-b1cf-5e6859912e65 test1.foo.bar.com
ERROR: Compute service of maelstrom.lab.eng.pnq.redhat.com is unavailable at this time.
Traceback (most recent call last):

  File "/usr/lib/python2.6/site-packages/nova/openstack/common/rpc/amqp.py", line 276, in _process_data
    rval = self.proxy.dispatch(ctxt, version, method, **args)

  File "/usr/lib/python2.6/site-packages/nova/openstack/common/rpc/dispatcher.py", line 145, in dispatch
    return getattr(proxyobj, method)(ctxt, **kwargs)

  File "/usr/lib/python2.6/site-packages/nova/scheduler/manager.py", line 101, in live_migration
    context, ex, request_spec)

  File "/usr/lib64/python2.6/contextlib.py", line 23, in __exit__
    self.gen.next()

  File "/usr/lib/python2.6/site-packages/nova/scheduler/manager.py", line 91, in live_migration
    block_migration, disk_over_commit)

  File "/usr/lib/python2.6/site-packages/nova/scheduler/driver.py", line 232, in schedule_live_migration
    self._live_migration_dest_check(context, instance, dest)

  File "/usr/lib/python2.6/site-packages/nova/scheduler/driver.py", line 281, in _live_migration_dest_check
    raise exception.ComputeServiceUnavailable(host=dest)

ComputeServiceUnavailable: Compute service of maelstrom.lab.eng.pnq.redhat.com is unavailable at this time.
 (HTTP 400) (Request-ID: req-248afb33-a9ed-4c68-822a-7dac6bc76cb3)
#============================#

Expected results:
--------------
If the destination host is invalid, live-migration should exist gracefully

Revision history for this message
Chuck Short (zulcss) wrote :

I was able to reproduce this.

Changed in nova:
importance: Undecided → Medium
status: New → Confirmed
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/25347

Changed in nova:
assignee: nobody → Hans Lindgren (hanlind)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Changed in nova:
assignee: Hans Lindgren (hanlind) → Nikola Đipanov (ndipanov)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/25388
Committed: http://github.com/openstack/nova/commit/86031940b313532606449c400bca64707be1797a
Submitter: Jenkins
Branch: master

commit 86031940b313532606449c400bca64707be1797a
Author: Nikola Dipanov <email address hidden>
Date: Tue Mar 26 14:38:09 2013 +0100

    Use format_message on exceptions instead of str()

    This patch changes all usages of unicode() and str() in the API layer
    (and most other reasonable places) into a new format_message method.
    This is done in order to avoid leaking the stack trace back to the
    user through the Remote excepitons.

    This patch deliberately avoids the EC2 api as the way how the EC2 API
    handles responses is being worked on as part of another blueprint.

    Fixes bug 1159755

    Change-Id: I04a74682c4fac9a66ba25b52fd5c7af5e10e81e8

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → grizzly-rc2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (milestone-proposed)

Fix proposed to branch: milestone-proposed
Review: https://review.openstack.org/25575

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

Reviewed: https://review.openstack.org/25575
Committed: http://github.com/openstack/nova/commit/ff4e9a2c325fbe622b40219587d7ac3cc39b51df
Submitter: Jenkins
Branch: milestone-proposed

commit ff4e9a2c325fbe622b40219587d7ac3cc39b51df
Author: Nikola Dipanov <email address hidden>
Date: Tue Mar 26 14:38:09 2013 +0100

    Use format_message on exceptions instead of str()

    This patch changes all usages of unicode() and str() in the API layer
    (and most other reasonable places) into a new format_message method.
    This is done in order to avoid leaking the stack trace back to the
    user through the Remote excepitons.

    This patch deliberately avoids the EC2 api as the way how the EC2 API
    handles responses is being worked on as part of another blueprint.

    Fixes bug 1159755

    Change-Id: I04a74682c4fac9a66ba25b52fd5c7af5e10e81e8

Changed in nova:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/folsom)

Fix proposed to branch: stable/folsom
Review: https://review.openstack.org/25641

Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-rc2 → 2013.1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/folsom)

Reviewed: https://review.openstack.org/25641
Committed: http://github.com/openstack/nova/commit/056a7df5bfe35f0661565e777019851791f8d2f1
Submitter: Jenkins
Branch: stable/folsom

commit 056a7df5bfe35f0661565e777019851791f8d2f1
Author: Nikola Dipanov <email address hidden>
Date: Tue Mar 26 14:38:09 2013 +0100

    Use format_message on exceptions instead of str()

    This patch changes all usages of unicode() and str() in the API layer
    (and most other reasonable places) into a new format_message method.
    This is done in order to avoid leaking the stack trace back to the
    user through the Remote excepitons.

    This patch deliberately avoids the EC2 api as the way how the EC2 API
    handles responses is being worked on as part of another blueprint.

    Fixes bug 1159755

    (cherry picked from commit 86031940b313532606449c400bca64707be1797a)

    Conflicts:

     nova/api/openstack/compute/contrib/admin_actions.py
     nova/api/openstack/compute/contrib/agents.py
     nova/api/openstack/compute/contrib/console_output.py
     nova/api/openstack/compute/contrib/consoles.py
     nova/api/openstack/compute/contrib/deferred_delete.py
     nova/api/openstack/compute/contrib/fixed_ips.py
     nova/api/openstack/compute/contrib/flavorextraspecs.py
     nova/api/openstack/compute/contrib/flavormanage.py
     nova/api/openstack/compute/contrib/floating_ips_bulk.py
     nova/api/openstack/compute/contrib/hosts.py
     nova/api/openstack/compute/contrib/rescue.py
     nova/api/openstack/compute/contrib/server_password.py
     nova/api/openstack/compute/contrib/server_start_stop.py
     nova/api/openstack/compute/servers.py

    Change-Id: I04a74682c4fac9a66ba25b52fd5c7af5e10e81e8

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.