Comment 4 for bug 1707669

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/ocata)

Reviewed: https://review.openstack.org/490231
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=9f4db205bbbb215e77741df22979a20d62d80ae8
Submitter: Jenkins
Branch: stable/ocata

commit 9f4db205bbbb215e77741df22979a20d62d80ae8
Author: Jay Pipes <email address hidden>
Date: Mon Jul 31 12:28:38 2017 -0400

    placement: remove existing allocs when set allocs

    Bug #1707669 highlighted a situation that arose when attempting to
    remove part of an allocation for a source host during a resize
    operation where the exiting allocation was not being properly deleted.

    In this patch, we remove the part of the WHERE condition that limited
    deleted allocation records to only those referring to a particular
    resource provider. In doing so, we make the creation of an allocation
    for a consumer a proper overwrite operation.

    Conflicts:
          nova/objects/resource_provider.py
          nova/tests/functional/db/test_resource_provider.py

    NOTE(mriedem): The conflicts are both due to changes in Pike that
    aren't needed here:

      a909673682cdd8f02ef0ae5e8c6f061640e320ff added user/project to allocations

      86fe9a70c24fce71bf85bfe39917073f833a0951 renamed context to ctx in tests

    Change-Id: I0835e5b4f22277465012aab9a5bf474608cb533b
    Fixes-bug: #1707669
    (cherry picked from commit afab0ca0c8f4c68b8d6d8646f408e9522596870e)