During compute manager startup init_host is called. One of the
functions there is to delete instance data that doesn't belong
to this host i.e. _destroy_evacuated_instances.
But this function only checks if the local instance belongs to
the host or not. It doesn't check the task_state or vm_state.
In Resize function, user may want to revert or confirm the resize
operations so the instance on source and dest compute node should
be kept. so for RESIZE_MIGRATING, RESIZE_MIGRATED task states and
RESIZED vm state instances, they should be kept in compute node
when the compute restart. This patch adds check for the task
state and vm state before delete the instances.
Reviewed: https:/ /review. openstack. org/101803 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=dd6fb1246ff 2789bd78b772b45 e1fcac21eda67a
Committed: https:/
Submitter: Jenkins
Branch: master
commit dd6fb1246ff2789 bd78b772b45e1fc ac21eda67a
Author: jichenjc <email address hidden>
Date: Wed Jun 18 04:14:09 2014 +0800
Keep resizing&resized instances when compute init
During compute manager startup init_host is called. One of the evacuated_ instances.
functions there is to delete instance data that doesn't belong
to this host i.e. _destroy_
But this function only checks if the local instance belongs to
the host or not. It doesn't check the task_state or vm_state.
In Resize function, user may want to revert or confirm the resize
operations so the instance on source and dest compute node should
be kept. so for RESIZE_MIGRATING, RESIZE_MIGRATED task states and
RESIZED vm state instances, they should be kept in compute node
when the compute restart. This patch adds check for the task
state and vm state before delete the instances.
Closes-Bug: #1330503
Change-Id: I723fa4a8823019 391ea83aa189096 531032adab1