I disagree with Sylvain on this one so going to re-open, but it is low-
ish priority because the impact isn't significant: if max_unit is
greater than reserved and allocation_ratio is 1 requesting a single
max_unit resource will fail in an expected way that does not involve
max_unit: total-reserved < requested resource.

Ideally we shouldn't have that conflict, so I think this is worth fixing
(setting max_unit to total-reserved). It's not that much of an upgrade
problem because compute nodes are constantly verifying and updating
their inventories anyway. If a bunch of compute nodes are restarted at
the same time there will be a lot of inventory writes, but this probably
won't be an issue[1].

[1] https://anticdent.org/placement-scale-fun.html

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

** Changed in: nova
   Importance: Undecided => Low

-- 
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):
  Triaged

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to