stack update timeout_mins doesn't work

Bug #1290603 reported by Steven Hardy
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
Bartosz Górski

Bug Description

If you pass a timeout_mins API argument when updating a stack (not currently supported in python-heatclient[1] but is documented in the API docs[2]) we ignore it and use the timeout stored in the DB with the stack on create (whatever was supplied or the default 60mins).

It seems we've got some remaining cfn-isms in the engine causing this, where we treat the timeout as an attribute of the stack rather than something related to the action being performed.

It seems reasonable to provide some means to override the timeout on stack-update, as it would be necessary in the case where you expand the template dramatically on update and the currently stored timeout is insufficient.

Plan to resolve this:
- Stop passing a hard-coded default number from python-heatclient
- If no timeout number is passed on create use the configured default timeout in the engine but store a null value (since the user didn't pass us a specific value)
- On update use the value passed as an argument if available, otherwise the stored value in the DB, or else the configured default?

In the update case its a but unclear what the best behavior is, perhaps we should always ignore the DB value and use the argument or default, but that might cause issues if users pass a large timeout on create and expect it to be respected on update? (It's also a bit unclear what behavior matches what is expected via the CFN compatible API..)

Revision history for this message
Steven Hardy (shardy) wrote :
Revision history for this message
huangtianhua (huangtianhua) wrote :
Revision history for this message
Steven Hardy (shardy) wrote :

> Is the patch related?

Yes, it's been proposed against a duplicate bug

Revision history for this message
Zhang Yang (neil-zhangyang) wrote :

Hi Steven:
     I have a patch which try to fix this bug. My idea is :
     Don't set default value in heat client on stack update.
     When update stack, check whether the time_out is specified or not, if specified , get if from args,
 or get it from the old stack(no need to care that the time_out attribute of old stack is default or user specified),
 and set time_out in new stack, the new stack will never use the default value, then update the the time_out
 of the current stack with the new stack's.
      see:
         https://review.openstack.org/#/c/76211/

Revision history for this message
Steven Hardy (shardy) wrote :

Hi Zhang,

Yes thanks - sorry I didn't spot your patch yesterday when I raised this bug :)

I've added some comments to your review, it looks pretty close to what we need, thanks!

I have patches removing the timeout defaults from heatclient and adding timeout support to stack-update:

https://review.openstack.org/#/q/status:open+project:openstack/python-heatclient+branch:master+topic:bug/1290603,n,z

Changed in heat:
assignee: nobody → Zhang Yang (neil-zhangyang)
Changed in heat:
status: New → In Progress
Changed in heat:
status: In Progress → Triaged
importance: Undecided → High
milestone: none → icehouse-rc1
Changed in heat:
milestone: icehouse-rc1 → next
Changed in heat:
assignee: Zhang Yang (neil-zhangyang) → Bartosz Górski (bartosz-gorski)
status: Triaged → In Progress
tags: added: icehouse-rc-potential
Changed in heat:
milestone: next → icehouse-rc2
tags: removed: icehouse-rc-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

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

commit dd58b80b4e97f6a49c22015f04e4aabe91430f12
Author: Zhang Yang <email address hidden>
Date: Tue Feb 25 05:56:09 2014 -0800

    Ensure parameter timeout_mins available in update

    The parameter timeout_mins is not available when
    updating a stack. The updater gets it from the
    old stack no matter whether timeout_mins is
    offered or not.

    If timeout_mins is not offered in the new stack,
    get the timeout from the old stack, and update
    this parameter using the new stack's timeout.

    Change-Id: I7d04d0f0b7cc917d49d45c0d3e1d5a8ffb7bff0b
    Closes-Bug: 1290603

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

Fix proposed to branch: milestone-proposed
Review: https://review.openstack.org/85891

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (milestone-proposed)

Reviewed: https://review.openstack.org/85891
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=acac702de625b049f577c9040bddc9bcbbce0437
Submitter: Jenkins
Branch: milestone-proposed

commit acac702de625b049f577c9040bddc9bcbbce0437
Author: Zhang Yang <email address hidden>
Date: Tue Feb 25 05:56:09 2014 -0800

    Ensure parameter timeout_mins available in update

    The parameter timeout_mins is not available when
    updating a stack. The updater gets it from the
    old stack no matter whether timeout_mins is
    offered or not.

    If timeout_mins is not offered in the new stack,
    get the timeout from the old stack, and update
    this parameter using the new stack's timeout.

    Change-Id: I7d04d0f0b7cc917d49d45c0d3e1d5a8ffb7bff0b
    Closes-Bug: 1290603

Changed in heat:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: icehouse-rc2 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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