Update docs for _destroy_evacuated_instances
The docstring on this method no longer reflects reality,
and hasn't since we started filtering on migration records
starting back in Liberty. This change updates the docstring
for what the method actually does now, and also includes a
comment about why we include 'accepted' but not yet complete
migrations when looking for things to remove from this source
node.
Change-Id: Ia0c67aeffe41e133de9dee5080be9c5ec1739aa6
Related-Bug: #1713783
(cherry picked from commit aec81e7d98
)
This commit is contained in:
parent
7ff1b2842d
commit
c5cd6c8e50
|
@ -629,14 +629,19 @@ class ComputeManager(manager.Manager):
|
|||
"""Destroys evacuated instances.
|
||||
|
||||
While nova-compute was down, the instances running on it could be
|
||||
evacuated to another host. Check that the instances reported
|
||||
by the driver are still associated with this host. If they are
|
||||
not, destroy them, with the exception of instances which are in
|
||||
the MIGRATING, RESIZE_MIGRATING, RESIZE_MIGRATED, RESIZE_FINISH
|
||||
task state or RESIZED vm state.
|
||||
evacuated to another host. This method looks for evacuation migration
|
||||
records where this is the source host and which were either started
|
||||
(accepted) or complete (done). From those migration records, local
|
||||
instances reported by the hypervisor are compared to the instances
|
||||
for the migration records and those local guests are destroyed, along
|
||||
with instance allocation records in Placement for this node.
|
||||
"""
|
||||
filters = {
|
||||
'source_compute': self.host,
|
||||
# NOTE(mriedem): Migration records that have been accepted are
|
||||
# included in case the source node comes back up while instances
|
||||
# are being evacuated to another host. We don't want the same
|
||||
# instance being reported from multiple hosts.
|
||||
'status': ['accepted', 'done'],
|
||||
'migration_type': 'evacuation',
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue