← Back to team overview

yahoo-eng-team team mailing list archive

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

 

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 <mriedem.os@xxxxxxxxx>
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

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1729356

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

Status in OpenStack Compute (nova):
  Fix Released

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
  devstack@n-api.service[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).

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1729356/+subscriptions


References