GET /resource_providers/{uuid}/allocations doesn't get all the allocations

Bug #1785382 reported by Tetsuro Nakamura on 2018-08-04
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
High
Tetsuro Nakamura

Bug Description

Description
===========

GET /resource_providers/{uuid}/allocations doesn't get all the allocations

Reproduce
=========

1. Set 1 resource provider with some inventories
2. A user (userA) in a project(projectX) makes 1 consumer (Consumer1) allocate on the rp
3. The same user (userA) in the project(projectX) makes another consumer (Consumer2) allocate on the rp
4. Another user (userB) in the project(projectX) makes another consumer (Consumer3) allocate on the rp
5. An admin uses `GET /resource_providers/{rp_uuid}/allocations` to get the consumers allocated.

Expected
========

The admin gets 3 consumers for the response, Consumer1, 2 and 3.

Actual
======

The admin gets 2 consumers for the response, Consumer1, 2.

tags: added: placement

Fix proposed to branch: master
Review: https://review.openstack.org/588886

Changed in nova:
assignee: nobody → Tetsuro Nakamura (tetsuro0907)
status: New → In Progress

Fix proposed to branch: master
Review: https://review.openstack.org/588887

Chris Dent (cdent) on 2018-08-04
Changed in nova:
importance: Undecided → High
Chris Dent (cdent) wrote :

We should confirm this problem isn't in queens, but it looks like it was introduced with consumer generations and the associated consumer object, so likely not a backport potential.

I've marked this as high, as that seems right for "data is wrong".

Reviewed: https://review.openstack.org/588886
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=9cfc598acf15b8b8fe1ca79f60e7b6c631421709
Submitter: Zuul
Branch: master

commit 9cfc598acf15b8b8fe1ca79f60e7b6c631421709
Author: Tetsuro Nakamura <email address hidden>
Date: Sat Aug 4 18:38:20 2018 +0900

    Adds a test for getting allocations API

    `GET /resource_provider/{uuid}/allocations` API currently doesn't
    return all the allocations made by multiple users.

    This patch adds a test to describe this bug. The fix for this
    is coming in a follow up.

    Change-Id: I2b01e27922f11bef2defcb01fe415692de1578ea
    Partial-Bug: #1785382

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

commit e13b765e55758019c243167f0a99c92a0d740400
Author: Tetsuro Nakamura <email address hidden>
Date: Sat Aug 4 19:22:50 2018 +0900

    Not use project table for user table

    `GET /resource_provider/{uuid}/allocations` API didn't
    return all the allocations made by multiple users.

    This was because the placement wrongly used project table
    for user table. This patch fixes it with the test case.

    Change-Id: I7c808dec5de1204ced0d1f1b31d8398de8c51679
    Closes-Bug: #1785382

Changed in nova:
status: In Progress → Fix Released

This issue was fixed in the openstack/nova 18.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers