"provider_summaries" doesn't include resources that are not requested

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

Bug Description

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

In ``GET /allocation_candidates`` API, ``provider_summaries`` should show all the inventories for all the resource classes in all the resource providers.
However, ``provider_summaries`` doesn't contain resources that aren't requested.

Steps to reproduce
==================
Here's one example:

CN1 has inventory in VCPU, MEMORY_MB, and DISK_GB.
I make a request for only VCPU resource.

Expected result
===============

In API response,
* "allocation_requests" shows "allocation" of VCPU resource of CN1.
* "provider_summaries" shows "resources" of VCPU, MEMORY_MB, and DISK_GB of CN1.

Actual result
=============

In API response,
* "allocation_requests" shows "allocation" of VCPU resource of CN1.
* "provider_summaries" shows "resources" of only VCPU of CN1.

Tags: 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/558044

Changed in nova:
assignee: nobody → Tetsuro Nakamura (tetsuro0907)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Changed in nova:
assignee: Tetsuro Nakamura (tetsuro0907) → Eric Fried (efried)
Changed in nova:
assignee: Eric Fried (efried) → Tetsuro Nakamura (tetsuro0907)
tags: added: placement
Revision history for this message
Jay Pipes (jaypipes) wrote :

I don't actually think there's much disagreement that we should return all the inventory information for all resources each provider involved in the allocation requests has. As mentioned on IRC today, I think it currently works the way it does due to an implementation detail.

Changed in nova:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit a6122a7a64694b87978c4db2939dc69dddcee730
Author: Tetsuro Nakamura <email address hidden>
Date: Sat Mar 31 17:52:50 2018 +0900

    [placement] Add test for provider summaries

    In ``GET /allocation_candidates`` API, ``provider_summaries``
    should show all the inventories for all the resource classes
    in all the resource providers.

    However, ``provider_summaries`` currently doesn't contain
    resources that aren't requested.

    This patch adds a simple test case to describe the bug.

    Change-Id: Ida9cddc5a2b43917e7b5900fe68a413b18c6cb2d
    Partial-Bug: #1760276

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

commit 97530c2ca38228dcebeb231a187806f1e66d4570
Author: Tetsuro Nakamura <email address hidden>
Date: Sat Mar 31 18:27:11 2018 +0900

    Return all resources in provider_summaries

    The response of ``GET /allocation_candidates`` API provides two fields
    of ``allocation_requests`` and ``provider_summaries``. The callers,
    like the filter scheduler in nova, would use information in
    ``provider_summaries`` in sorting or filtering providers to allocate
    consumers. However, currently ``provider_summaries`` doesn't contain
    resource classes that aren't requested.

    With this patch, ``GET /allocation_candidates`` API returns all
    resource classes with a new microversion.

    Change-Id: Ic491f190ebd97d94c18931a0e78d779a55ee47a1
    Closes-Bug: #1760276
    Blueprint: placement-return-all-resources

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 18.0.0.0b3

This issue was fixed in the openstack/nova 18.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.