Wait time skipped for the 1st and 2nd steps of generator type task

Bug #1218187 reported by Winson Chan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Low
Unmesh Gurjar

Bug Description

For a generator type task, the __call__ method of scheduler.TaskRunner skips wait_time in between the first and second steps. The first step is executed by the start method. The subsequent steps are executed by run_to_completion. In transition from the first step to the second step (the first stepping in run_to_completion), there should be a call to _sleep wait_time.

Zane Bitter (zaneb)
Changed in heat:
importance: Undecided → Low
Revision history for this message
Zane Bitter (zaneb) wrote :

I guess you could consider this a bug. IIRC I wrote it this way to minimise the changes to the number of _sleep() calls to mock in the unit tests. That problem has largely gone away thanks to ENABLE_SLEEP though, so it's worth reconsidering.

The way it works now means that when we e.g. delete something we check immediately to see if it is gone, rather than wait another second. So if it turned out that potentially slow operations were actually pretty quick in most cases, then this could slow things down. I suspect it's probably not a big deal though.

Changed in heat:
status: New → Triaged
Changed in heat:
assignee: nobody → Unmesh Gurjar (unmesh-gurjar)
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/104471

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

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

commit dfdfb5b8d7b04a718bf62ed01196d540cd72c1f9
Author: Unmesh Gurjar <email address hidden>
Date: Wed Jul 2 08:21:29 2014 -0700

    Fixed wait skipped after 1st step of task

    The first step of a generator type task is executed by the start
    method and subsequent steps are executed by run_to_completion.
    The TaskRunner skips the wait between the first step and second
    step.
    Added the sleep between transition from first step to second step.
    Updated corresponding unit tests.

    Change-Id: Iff30073ea0c060c6e2c89d7d9df8d0d03e816455
    Closes-Bug: #1218187

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
milestone: none → juno-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: juno-3 → 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.