queens: resize fails with "Instance image invalid" 400 error when actually migration failed to swap allocations in placement

Bug #1729356 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Matt Riedemann

Bug Description

This failed in a non-obvious way:

http://logs.openstack.org/08/516708/3/gate/legacy-tempest-dsvm-py35/4d8d6a3/logs/screen-n-super-cond.txt.gz#_Oct_31_23_18_04_391235

Oct 31 23:18:04.391235 ubuntu-xenial-rax-iad-0000635032 nova-conductor[22376]: ERROR nova.conductor.tasks.migrate [None req-2bd7178b-307e-4342-a156-f9645b7f75a5 tempest-MigrationsAdminTest-834796780 tempest-MigrationsAdminTest-834796780] [instance: 87329b8a-0fa5-4467-b69e-6c43d4633f54] Unable to find existing allocations for instance

That raises InstanceUnacceptable which extends Invalid which is handled in the REST API controller here:

https://github.com/openstack/nova/blob/f974e3c3566f379211d7fdc790d07b5680925584/nova/api/openstack/compute/servers.py#L818

And you get this "Instance invalid image" message which is misleading:

http://logs.openstack.org/08/516708/3/gate/legacy-tempest-dsvm-py35/4d8d6a3/logs/screen-n-api.txt.gz#_Oct_31_23_18_04_588849

Oct 31 23:18:04.588849 ubuntu-xenial-rax-iad-0000635032 <email address hidden>[14381]: INFO nova.api.openstack.wsgi [None req-2bd7178b-307e-4342-a156-f9645b7f75a5 tempest-MigrationsAdminTest-834796780 tempest-MigrationsAdminTest-834796780] HTTP exception thrown: Invalid instance image.

Why the allocations are not found is a separate issue. This bug needs to deal with the misleading message coming back out of the API - it should be a 500 error because the user can't do anything about this (unless the instance is concurrently deleted or something, but that's not what happened here).

Tags: api resize
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/517004

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

Reviewed: https://review.openstack.org/517004
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=59d42e4c42a2823e9952db04bbdd661df2fd1f61
Submitter: Zuul
Branch: master

commit 59d42e4c42a2823e9952db04bbdd661df2fd1f61
Author: Matt Riedemann <email address hidden>
Date: Wed Nov 1 10:46:25 2017 -0400

    Raise specific exception when swapping migration allocations fails

    If we fail to find resource allocations for an instance on the
    source compute node when swapping allocations for a cold migrate /
    resize operation, we need to raise a specific exception which will
    eventually be a 500 internal error from the REST API. Using
    InstanceUnacceptable is incorrect since it extends Invalid which is
    handled in the resize REST API controller code and returned as a 400
    bad request with the message "Instance image invalid" which is not
    at all the actual failure.

    As for the actual reason why the instance allocation on the source
    node is not found, that is a different bug.

    Change-Id: Id8e2dcf21776f8237a8b63acb23787bb42c9bd13
    Closes-Bug: #1729356

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 17.0.0.0b3

This issue was fixed in the openstack/nova 17.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.