disable_rollback will change to true although we don't specify it when stack-update

Bug #1324366 reported by Ethan Lynn
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Pavlo Shchelokovskyy
python-heatclient
Fix Released
Medium
Pavlo Shchelokovskyy

Bug Description

Steps:
heat stack-create -f aa.template -P flavor=m1.tiny --enable-rollback
heat stack-update -f aa.template -P flavor=m1.small

Result:
When update action is failed, no rollback action is going.

Since this patch (https://review.openstack.org/#/c/79721) override disable_rollback value to true,
no rollback action will take after update failed.

I think disable_rollback should inherit from oldstack if we don't specify it when stack-update.
Or add option --enable-rollback to stack-update cli.

Ethan Lynn (ethanlynn)
description: updated
description: updated
Revision history for this message
Ethan Lynn (ethanlynn) wrote :

There is a patch for cli and pending to review.
https://review.openstack.org/#/c/94004

Revision history for this message
Pavlo Shchelokovskyy (pshchelo) wrote :

I still think that it would be more intuitive to update call default to disable_rollback == None, which would use the previous value, and have two separate switches for overriding/ensuring the value used during update. The heat itself then would need to figure out if to use the already present value or override it.

As the patch in review mentioned is more of a workaround, I'm adding python-heatclient to the affected projects.

Changed in heat:
assignee: nobody → Pavlo Shchelokovskyy (pshchelo)
Changed in python-heatclient:
assignee: nobody → Pavlo Shchelokovskyy (pshchelo)
Changed in python-heatclient:
assignee: Pavlo Shchelokovskyy (pshchelo) → Zhang Yang (neil-zhangyang)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-heatclient (master)

Reviewed: https://review.openstack.org/94004
Committed: https://git.openstack.org/cgit/openstack/python-heatclient/commit/?id=83d9485f3108e222f2f0ec5ba3b9ed7c93cb1471
Submitter: Jenkins
Branch: master

commit 83d9485f3108e222f2f0ec5ba3b9ed7c93cb1471
Author: Zhang Yang <email address hidden>
Date: Fri May 16 19:42:04 2014 -0700

    Add shell arguments for stack update

    add option timeout for do_update,which has been added
    for do_stack_update already.

    add option rollback for stack update, this is supported
    already in heat[1].

    [1]https://github.com/openstack/heat/commit/7c833ecc2ba27053b7e948667a39a261f68144b5

    Change-Id: I4545aef556c4c3297c2993418df2ec2cd7c4e408
    Partial-Bug: #1324366

Revision history for this message
Pavlo Shchelokovskyy (pshchelo) wrote :

I poked around in heat to see how disable_rollback=None could be implemented. To me it looks like not a good solution now, as currently we have disable_rollback well defined as Boolean. Adding None to its possible values adds too much inconsstency, especially as current default value is True, and we want to store an actual Bool in the database, so that every actual stack has it well defined.

What would you say about the next approach then:

* Change nothing in Heat

* in python-heatclient
   - add two explicit swithces '--enable-rollback' and '--disable-rollback' for stack-update
   - when both new switches are absent, make a lookup similar to heat stack-show and put the value from existing stack
     in the update call

I realize it is an extra API call, but I think it would be a clearer solution.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-heatclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/100245

Changed in python-heatclient:
assignee: Zhang Yang (neil-zhangyang) → Pavlo Shchelokovskyy (pshchelo)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

Fix proposed to branch: master
Review: https://review.openstack.org/117271

Changed in heat:
status: New → In Progress
Angus Salkeld (asalkeld)
Changed in heat:
importance: Undecided → Medium
milestone: none → juno-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/117271
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=007949f0c7b3fe68cf3ff32bc36cdd3b5ef10088
Submitter: Jenkins
Branch: master

commit 007949f0c7b3fe68cf3ff32bc36cdd3b5ef10088
Author: Pavlo Shchelokovskyy <email address hidden>
Date: Wed Aug 27 17:41:16 2014 +0300

    Reuse disable_rollback on stack update

    If disable_rollback API parameter is not supplied to stack update,
    use corresponding value of existing stack.

    Change-Id: Iad60e12d31dc3850071dc0b8562c7b99f53adba4
    Closes-Bug: #1324366

Changed in heat:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-heatclient (master)

Reviewed: https://review.openstack.org/100245
Committed: https://git.openstack.org/cgit/openstack/python-heatclient/commit/?id=847a8fd566e5c85399d2a933e8cf2818095f4849
Submitter: Jenkins
Branch: master

commit 847a8fd566e5c85399d2a933e8cf2818095f4849
Author: Pavlo Shchelokovskyy <email address hidden>
Date: Thu May 29 16:22:03 2014 +0300

    Reuse existing disable_rollback in stack-update

    This patch makes `stack-update` command to change the `disable_rollback`
    bit of the stack IF AND ONLY IF explicitly requested on CLI.

    In order to facilitate this, `--rollback` CLI argument to `stack-update`
    is added (accepting values from 1, on, true, t, 0, off, false, f and similar)
    to explicitly set disable_rollback property of the stack on stack update.
    If this argument is omitted, the value of disable_rollback
    of the stack to be updated will be implicitly used by heat engine.

    The boolean switch '--enable-rollback' is deprecated with appropriate
    message (although the default behavior is effectively changed).

    Change-Id: I235198ec04bfb192fcbfa4e2e3e618b64c99d3df
    Closes-Bug: #1324366

Changed in python-heatclient:
status: In Progress → Fix Committed
Changed in python-heatclient:
importance: Undecided → Medium
milestone: none → v0.2.11
Changed in python-heatclient:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: juno-rc1 → 2014.2
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.