Fixes instance action exception in "evacuate" API.

'Evacuate' instance action was not created (incl. in the DB) which
caused exception to be raised during action_event_start.

Change-Id: Iec5f0a91f9b08fbdcf3ace1eaa0efbc4d9d8fc04
Fixes: bug 1152512
This commit is contained in:
Alex Glikson 2013-03-08 13:00:54 +02:00
parent f543f347c8
commit b788402263
2 changed files with 4 additions and 0 deletions

View File

@ -2470,6 +2470,9 @@ class API(base.Base):
instance = self.update(context, instance, expected_task_state=None,
task_state=task_states.REBUILDING)
self._record_action_start(context, instance, instance_actions.EVACUATE)
return self.compute_rpcapi.rebuild_instance(context,
instance=instance,
new_pass=admin_password,

View File

@ -27,6 +27,7 @@ they are used.
CREATE = 'create'
DELETE = 'delete'
EVACUATE = 'evacuate'
RESTORE = 'restore'
STOP = 'stop'
START = 'start'