← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1708961] [NEW] migration of single instance from multi-instance request spec fails with IndexError

 

Public bug reported:

Nova master, as of August 6th, 2017 (head is
5971dde5d945bcbe1e81b87d342887abd5d2eece).

If you make multiple instances from one request:

   openstack server create --flavor c1 --image $IMAGE --nic net-
id=$NET_ID --min 5 --max 10 x2

and then try to migrate just one of those instances:

   nova migrate --poll x2-1

The API generates a 500 because there's an IndexError in the
filter_scheduler, at line 190. `num_instances` is 9 and the loop
continues after the first allocations are claimed. On the second loop
`num` is one, but the list of instance_uuids is only one item long, so
IndexError.

At line 162 where num_instances is assigned we probably need to take the
length of instance_uuids (if it is not None) instead the num_instances
from the spec_obj.

** Affects: nova
     Importance: Undecided
         Status: New


** Tags: placement scheduler

-- 
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/1708961

Title:
  migration of single instance from multi-instance request spec fails
  with IndexError

Status in OpenStack Compute (nova):
  New

Bug description:
  Nova master, as of August 6th, 2017 (head is
  5971dde5d945bcbe1e81b87d342887abd5d2eece).

  If you make multiple instances from one request:

     openstack server create --flavor c1 --image $IMAGE --nic net-
  id=$NET_ID --min 5 --max 10 x2

  and then try to migrate just one of those instances:

     nova migrate --poll x2-1

  The API generates a 500 because there's an IndexError in the
  filter_scheduler, at line 190. `num_instances` is 9 and the loop
  continues after the first allocations are claimed. On the second loop
  `num` is one, but the list of instance_uuids is only one item long, so
  IndexError.

  At line 162 where num_instances is assigned we probably need to take
  the length of instance_uuids (if it is not None) instead the
  num_instances from the spec_obj.

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


Follow ups