← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1778576] [NEW] making new allocations for one consumer against multiple resource providers fails with 409

 

Public bug reported:

If you PUT some allocations for a new consumer (thus no generation), and
those allocations are against more than one resource provider, a 409
failure will happen with:

consumer generation conflict - expected 0 but got None

This because in _new_allocations in handlers/allocation.py we always use
the generation provided in the incoming data when we call
util.ensure_consumer. This works for the first resource provider but
then on the second one the consumer exists, so our generation has to be
different now.

One possible fix (already in progress) is to use the generation from
new_allocations[0].consumer.generation in subsequent trips round the
loop calling _new_allocations.

I guess we must have missed some test cases. I'll make sure to add some
when working on this. I found the problem with my placecat stuff.

** Affects: nova
     Importance: High
     Assignee: Chris Dent (cdent)
         Status: New


** Tags: placement

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

Title:
  making new allocations for one consumer against multiple resource
  providers fails with 409

Status in OpenStack Compute (nova):
  New

Bug description:
  If you PUT some allocations for a new consumer (thus no generation),
  and those allocations are against more than one resource provider, a
  409 failure will happen with:

  consumer generation conflict - expected 0 but got None

  This because in _new_allocations in handlers/allocation.py we always
  use the generation provided in the incoming data when we call
  util.ensure_consumer. This works for the first resource provider but
  then on the second one the consumer exists, so our generation has to
  be different now.

  One possible fix (already in progress) is to use the generation from
  new_allocations[0].consumer.generation in subsequent trips round the
  loop calling _new_allocations.

  I guess we must have missed some test cases. I'll make sure to add
  some when working on this. I found the problem with my placecat stuff.

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


Follow ups