Updated openstack/openstack
Project: openstack/nova  0723733f9775d78070832a7d01fc94766494285f
null
Recover from IMAGE-* state on compute manager start-up

If a compute manager is stopped / fails during certain IMAGE-*
operations then the instance will be left stuck in a transitional
task_state

This change handles three possible task states IMAGE_PENDING_UPLOAD,
IMAGE_UPLOADING, and IMAGE_SNAPSHOT.

Both IMAGE_PENDING_UPLOAD and IMAGE_UPLOADING are task states set
after the request has gotten to the compute manager and so we can
clear these safely knowing the operation has ended/failed with the
restart of the compute manager.

With IMAGE-SNAPSHOT it's possible this state was set in the API so
we revert the instance to a task_state of None but the change also
makes provision to set the task_state to IMAGE-SNAPSHOT once the
request comes through to the compute manager so the current
operation is clear once it begins again after the compute manager is
back up and running.

Related to blueprint recover-stuck-state
Change-Id: I665c0ec735968aa0d7553dfc0cfb2373f93451f6