← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1749404] Re: nova-compute resource tracker ignores 'reserved' while reporting 'max_unit'

 

max_unit is intended, as @edleafe states, to limit requested amount of
resources to a sane amount. It is there to provide protection against
consuming an amount of resources that would represent an unrealistic
request when the allocation_ratio > 1.0.

For example, consider the default CPU allocation ratio is 16.0. Now
consider a host has 32 physical CPU processors, and 2 of those are
reserved for the host via the reserved_host_cpus CONF option. The
max_unit would be 32, because that is the theoretical "sane" limit of
vCPUs that a single instance can consume on the host. Remember that the
host doesn't have 2 *physical* CPUs reserved for itself. It has 2 VCPU
reserved for itself.

I'm going to close this as Won't Fix because this is the same behaviour
that has existed in Nova since the very beginning (these things were
constructed and passed as the "limits" parameter to the resource claim).

Bence, I believe that your use case is more properly addressed with the
cpu_dedicated_set and cpu_shared_set work that is currently underway and
described partly in this blueprint:

https://review.openstack.org/#/c/555081/

In the case of dedicated CPUs, the allocation ratio would be 1.0 and the
(total - reserved) value would indeed be the limiting factor in
calculating whether an instance would be able to consume that amount of
resources.

** Changed in: nova
       Status: Triaged => Won't Fix

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

Title:
  nova-compute resource tracker ignores 'reserved' while reporting
  'max_unit'

Status in OpenStack Compute (nova):
  Won't Fix

Bug description:
  The following inventory was reported after a fresh devstack build:

  curl --silent \
      --header "Accept: application/json" \
      --header "Content-Type: application/json" \
      --header "OpenStack-API-Version: placement latest" \
      --header "X-Auth-Token: ${TOKEN:?}" \
      -X GET http://127.0.0.1/placement/resource_providers/8d4d7926-df76-42e5-b5da-67893468f5cb/inventories | json_pp
  {
     "resource_provider_generation" : 1,
     "inventories" : {
        "DISK_GB" : {
           "max_unit" : 19,
           "min_unit" : 1,
           "allocation_ratio" : 1,
           "step_size" : 1,
           "reserved" : 0,
           "total" : 19
        },
        "MEMORY_MB" : {
           "allocation_ratio" : 1.5,
           "max_unit" : 5967,
           "min_unit" : 1,
           "reserved" : 512,
           "step_size" : 1,
           "total" : 5967
        },
        "VCPU" : {
           "allocation_ratio" : 16,
           "min_unit" : 1,
           "max_unit" : 2,
           "reserved" : 0,
           "step_size" : 1,
           "total" : 2
        }
     }
  }

  IMO the correct max_unit value of the MEMORY_MB resource would be
  (total - reserved). But today it equals the total value.

  nova commit: 9e9b3e1
  devstack commit: fbdefac
  devstack config: ENABLED_SERVICES+=,placement-api,placement-client

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


References