AllocationCandidates.get_by_filters returns candidates containing non connected RPs

Bug #1732707 reported by Balazs Gibizer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Tetsuro Nakamura

Bug Description

Consider the following setup in placement:

       CN1 (VCPU) CN2 (VCPU)
      / agg3 \ agg1 / agg1 \ agg2
  SS3 (IPV4) SS1 (DISK_GB) SS2 (IPV4)

Then VCPU, DISK_GB nd IPV4 resources are requested. However besides
the expected candidates we get invalid candidates mixing CN1 with SS2
and CN2 with SS3 which are clearly invalid.

Here is a functional test reproducing the issue: https://review.openstack.org/#/c/519617

Tags: placement
tags: added: placement
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/522407

Changed in nova:
assignee: nobody → Tetsuro Nakamura (tetsuro0907)
status: New → In Progress
Changed in nova:
assignee: Tetsuro Nakamura (tetsuro0907) → Jay Pipes (jaypipes)
Jay Pipes (jaypipes)
Changed in nova:
assignee: Jay Pipes (jaypipes) → Tetsuro Nakamura (tetsuro0907)
importance: Undecided → Medium
Changed in nova:
assignee: Tetsuro Nakamura (tetsuro0907) → Jay Pipes (jaypipes)
Jay Pipes (jaypipes)
Changed in nova:
assignee: Jay Pipes (jaypipes) → Tetsuro Nakamura (tetsuro0907)
Changed in nova:
assignee: Tetsuro Nakamura (tetsuro0907) → Jay Pipes (jaypipes)
Jay Pipes (jaypipes)
Changed in nova:
assignee: Jay Pipes (jaypipes) → Balazs Gibizer (balazs-gibizer)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to nova (master)

Reviewed: https://review.openstack.org/519617
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=027deaac4cee423988e6396b3d0029fdaf5ba96f
Submitter: Zuul
Branch: master

commit 027deaac4cee423988e6396b3d0029fdaf5ba96f
Author: Balazs Gibizer <email address hidden>
Date: Tue Nov 14 11:51:21 2017 +0100

    Test alloc_cands with one RP shared between two RPs

    This patch proposes two new test cases that tries to cover the cases
    when a sharing RP is connected to two non sharing RPs.

    Then the first case only differs from the previously covered scenario
    that is connects the two CNs to the sharing RP via two different
    aggregates:

        CN1 (VCPU) CN2 (VCPU)
            \ agg1 / agg2
             SS1 (DISK_GB)

    This works as expected.

    Then in the third case both CNs will be connected to an additional,
    separate, sharing RP in the following way:

           CN1 (VCPU) CN2 (VCPU)
          / agg3 \ agg1 / agg1 \ agg2
      SS3 (IPV4) SS1 (DISK_GB) SS2 (IPV4)

    Then VCPU, DISK_GB and IPV4 resources are requested. However in this
    case besides the expected candidates we get invalid candidates mixing
    CN1 with SS2 and CN2 with SS3.

    Related-Bug: #1732707
    Change-Id: I2c815ef0f10120735051429f5c290a49d8d1b11e

Changed in nova:
assignee: Balazs Gibizer (balazs-gibizer) → Tetsuro Nakamura (tetsuro0907)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/518633
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=53e63d0ed0a071a5ec7d95ab5c1c6bc29668ba0b
Submitter: Zuul
Branch: master

commit 53e63d0ed0a071a5ec7d95ab5c1c6bc29668ba0b
Author: Eric Fried <email address hidden>
Date: Wed Nov 8 17:59:01 2017 -0600

    Test allocation candidates: multiple aggregates

    This change set contains a couple of functional tests demonstrating the
    various facets of the related bug. The tests set up multiple resource
    providers, sharing and non, across multiple aggregates. All of them
    ought to yield allocation candidates in various permutations. The code
    comments relate each discrepancy to the relevant part of the bug
    description.

    Related-Bug: #1731072
    Related-Bug: #1732707

    Change-Id: I630655b45137c987c2ff4d197298d9bc35cd112b

Changed in nova:
assignee: Tetsuro Nakamura (tetsuro0907) → Eric Fried (efried)
Eric Fried (efried)
Changed in nova:
assignee: Eric Fried (efried) → Tetsuro Nakamura (tetsuro0907)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/522407
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=5e95c807d1d0ca23c4042d6df54c0cdda72b0caa
Submitter: Zuul
Branch: master

commit 5e95c807d1d0ca23c4042d6df54c0cdda72b0caa
Author: Tetsuro Nakamura <email address hidden>
Date: Thu Nov 23 07:56:12 2017 +0900

    Add aggregates check in allocation candidates

    Allocation candidates api returned some wrong
    combinations of non-sharing resource provider and
    shared resource provider, ignoring aggregates.

    This patch adds aggregate check when constructing
    shared allocation request being aware of non-sharing
    resource in _shared_allocation_request_resources.

    Change-Id: Ib45fde56706a861df0fc048bbec8a568fd26d85d
    Closes-Bug:#1732707

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.