Resize instance via Heat might fail

Bug #1471135 reported by Bruno Bompastor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Kairat Kushaev
Kilo
Fix Released
Medium
Unassigned

Bug Description

Changing the flavor of the instance on a heat template and then issuing a stack-update might fail.

This happens here: https://github.com/openstack/heat/blob/master/heat/engine/clients/os/nova.py#L435

When a server says ACTIVE, than heat does a resize, and by the time check_resize is executed for the first time, server status is still ACTIVE - heat will through error.

The proposed fix is to verify that resize is only allowed for ACTIVE states, and then add ACTIVE as allowed value in check_resize.

I tested this on Juno but since the code has not changed in master the bug is still there.

Changed in heat:
assignee: nobody → Kairat Kushaev (kkushaev)
Changed in heat:
status: New → Triaged
importance: Undecided → Medium
Changed in heat:
status: Triaged → In Progress
Changed in heat:
status: In Progress → Fix Committed
Revision history for this message
Bruno Bompastor (bruno-bompastor) wrote :

Is it possible to backport this to Juno?

Revision history for this message
Kairat Kushaev (kkushaev) wrote :

I'll propose it for Juno. Let's see that the other guys say.

tags: added: juno-backport-potential
tags: added: kilo-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/201612

Thierry Carrez (ttx)
Changed in heat:
milestone: none → liberty-2
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (stable/kilo)

Reviewed: https://review.openstack.org/201612
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=274f96b8e51ba04d5c1230c0fa3aa8066b24901e
Submitter: Jenkins
Branch: stable/kilo

commit 274f96b8e51ba04d5c1230c0fa3aa8066b24901e
Author: kairat_kushaev <email address hidden>
Date: Mon Jul 6 11:32:16 2015 +0300

    Support time-delays in server.resize

    Resize operation in nova(that we are for flavor update) is
    asynchronous. So the server may be ACTIVE when we are checking
    server-resize operations(not RESIZE as was excepted).
    We need to wait for a while till the server becomes RESIZE.

    The patch add support of this case to Server resource in heat.
    Closes-bug: #1471135

    Conflicts:
     heat/tests/test_instance.py
     heat/tests/test_server.py
    (cherry-picked from commit f46af8a8e2daa52f6485d65da4ad69db6f0a32bd)

    Change-Id: I19914081996104c5f2144a6de795173f26774c21

tags: added: in-stable-kilo
tags: removed: kilo-backport-potential
Thierry Carrez (ttx)
Changed in heat:
milestone: liberty-2 → 5.0.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (stable/juno)

Fix proposed to branch: stable/juno
Review: https://review.openstack.org/246113

Alan Pevec (apevec)
tags: removed: in-stable-kilo
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on heat (stable/juno)

Change abandoned by Jeremy Stanley (<email address hidden>) on branch: stable/juno
Review: https://review.openstack.org/246113
Reason: I'm abandoning this change in preparation for deleting the stable/juno branch, which is now at end of life.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.