[nova][placement] Openstack only building one VM per machine in cluster, then runs out of resources
melanie witt
melwittt at gmail.com
Wed Jun 30 22:06:05 UTC 2021
On 6/30/21 14:06, Jeffrey Mazzone wrote:
[snip]
> Before I commit to combing through the placement api source code to
> figure out how the “used” value in the placement log is being
> calculated, im hoping someone knows where and how that value is being
> calculated. It does not seem to be a fixed value in the database and it
> doesn’t seem to be effected by the allocation ratios.
I suggest you run the 'openstack resource provider show <RP UUID>
--allocations' command as Balazs mentioned earlier to show all of the
allocations (used resources) on the compute node. I also suggest you run
the 'nova-manage placement audit' tool [1] as Sylvain mentioned earlier
to show whether there are any orphaned allocations, i.e. allocations
that are for instances that no longer exist. The consumer UUID is the
instance UUID.
The tl;dr on how the value is calculated is there's a table called
'allocations' in the placement database that holds all the values for
resource providers and resource classes and it has a 'used' column. If
you add up all of the 'used' values for a resource class (VCPU) and
resource provider (compute node) then that will be the total used of
that resource on that resource provider. You can see this data by
'openstack resource provider show <RP UUID> --allocations' as well.
The allocation ratio will not affect the value of 'used' but it will
affect the working value of 'total' to be considered higher than it
actually is in order to oversubscribe. If a compute node has 64 cores
and cpu_allocation ratio is 16 then 64 * 16 = 1024 cores will be allowed
for placement on that compute node.
You likely have "orphaned" allocations for the compute node/resource
provider that are not mapped to instances any more and you can use
'nova-manage placement audit' to find those and optionally delete them.
Doing that will cleanup your resource provider. First, I would run it
without specifying --delete just to see what it shows without modifying
anything.
HTH,
-melwitt
[1] https://docs.openstack.org/nova/ussuri/cli/nova-manage.html#placement
More information about the openstack-discuss
mailing list