If masakari recover "resized" instance that's state was "stopped" before resizing, it will be "active".

Bug #1690995 reported by Rikimaru Honjo on 2017-05-16
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
masakari
High
Dinesh Bhor

Bug Description

[Actual]
1. I called Stop API for an instance.
2. I called Resize API for an instance.
3. Host failure happened before resize confirming.
4. Masakari recovered the instance.
5. The instance's state gone to "active" after recovering.

[My Expectation]
I think that instance's state should be "stopped" after recovering if the state before resizing is "stopped".

[Remarks]
This report was split from https://bugs.launchpad.net/masakari/+bug/1690768 .

description: updated

IMO, we can detect the state before resizing by instance action list API.
Even if end-users shutoff in guest OS, that action history will be recorded.

But, we should discuss whether or not masakari should stop the active instance.

Changed in masakari:
assignee: nobody → Dinesh Bhor (dinesh-bhor)
Changed in masakari:
status: New → In Progress
Dinesh Bhor (dinesh-bhor) wrote :
Tushar Patil (tpatil) on 2017-06-27
Changed in masakari:
importance: Undecided → High

Reviewed: https://review.openstack.org/469029
Committed: https://git.openstack.org/cgit/openstack/masakari/commit/?id=4173aaf0396890ba47ce9c34aa38bf87945e9144
Submitter: Jenkins
Branch: master

commit 4173aaf0396890ba47ce9c34aa38bf87945e9144
Author: dineshbhor <email address hidden>
Date: Fri May 26 16:00:53 2017 +0530

    Make provision to evacuate all instances

    As of now host failure workflow was evacuating instances which were
    having vm_state as active, stopped, error and resize. It was ignoring
    other vm_states such as shelved, rescued, paused and suspended. Made
    provision to evacuate instances which are having vm_states such as
    shelved, rescued, paused and suspended by changing its vm_state to
    error and after evacuating those instances will be stopped.

    NOTE:
    On master if the instance is in error or resized state then after
    recovery it was becoming active. With this patch error instances
    will be stopped and then set to error after recovery. For resized
    instance if it's previous power_state is 4(SHUTDOWN) then we can
    say that before failure the instance was is stopped state and then
    it was resized so masakari will stop that instance to maintain
    consistency of instance states as the instance was not fully
    resized(resize operation was not confirmed). Resized instance which
    was in active state before failure will become active again after
    recovery.

    Closes-Bug: #1693731
    Closes-Bug: #1692435
    Closes-Bug: #1690995
    Closes-Bug: #1690768
    Change-Id: I134e8b6ee7315935bd8ce418ef6241be0b9450b3

Changed in masakari:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers