Masakari will fail to recovery instances on failure host if instance's task_state is not none
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
masakari |
Fix Released
|
Undecided
|
takahara.kengo |
Bug Description
In Openstack version Ocata, evacuate API fails if instance's task_state is not none.
$ nova evacuate 2d2a8f35-
ERROR (Conflict): Cannot 'evacuate' instance 2d2a8f35-
$
So masakari-engine will fail evacuation when it recovers instances which task_state is not none.
When a node failure occurs, masakari-engine should recover instances which vm_state/task_state is active/
I think that we should add the following logic to masakari-engine.
1. If vm_state is active, error or stopped, get instance's task_state.
2. If task_state is none, execute evacuate api.
3. If task_state is not none, execute reset-state api to change task_state to none, and execute evacuate.
4. For an instance which is originally stopped and has been executed reset-state api, execute stop api after evacuate.
summary: |
- Evacuate API fails when instance's task_state is not none + Masakari will fail to recovery instances on failure host if instance's + task_state is not none |
Changed in masakari: | |
assignee: | nobody → takahara.kengo (takahara.kengo) |
Additional infomation for my proposal. /github. com/openstack/ nova/blob/ master/ nova/api/ openstack/ compute/ admin_actions. py#L72
Reset-state api changes vm_state to error (or active by option) and task_state to none.
We can see this in the source code below.
https:/