1 Commits

Author SHA1 Message Date
Matt Riedemann
95106d2fa1 Add nova-manage placement heal_allocations CLI
This adds a new CLI which will iterate all non-cell0
cells looking for instances that (1) have a host,
(2) aren't undergoing a task state transition and
(3) don't have allocations in placement and try
to allocate resources, based on the instance embedded
flavor, against the compute node resource provider
on which the instance is currently running.

This is meant as a way to help migrate CachingScheduler
users off the CachingScheduler by first shoring up
instance allocations in placement for any instances
created after Pike, when the nova-compute resource
tracker code stopped creating allocations in placement
since the FilterScheduler does it at the time of
scheduling (but the CachingScheduler doesn't).

This will be useful beyond just getting deployments
off the CachingScheduler, however, since operators
will be able to use it to fix incorrect allocations
resulting from failed operations.

There are several TODOs and NOTEs inline about things
we could build on top of this or improve, but for now
this is the basic idea.

Change-Id: Iab67fd56ab4845f8ee19ca36e7353730638efb21
2018-06-01 18:45:10 -04:00