update on a stack having a RandomString resource fails first, succeeds on next attempt

Bug #1404201 reported by Unmesh Gurjar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Undecided
Ethan Lynn

Bug Description

Branch: master

Scenario:
1. Create a stack (using attached create template).
2. Update the stack created above (using the attached update template).
3. Observe the stack status (it ends as UPDATE_FAILED).
4. Again update the stack (using the same update template).
5. Observe the stack status (it succeeds).

Actual result:
Update fails on first attempt, but passes on the second.

Expected result:
Stack update should succeed in the first attempt itself.

Revision history for this message
Unmesh Gurjar (unmesh-gurjar) wrote :
Changed in heat:
assignee: nobody → Unmesh Gurjar (unmesh-gurjar)
Revision history for this message
Unmesh Gurjar (unmesh-gurjar) wrote :
Revision history for this message
Ashish Singh (ashish-singh7) wrote :

Hi Unmesh,

Just wanted to know if I can start working on this bug as it was assigned to you.
Please let me know.

Thanks,
Ashish.

Changed in heat:
assignee: Unmesh Gurjar (unmesh-gurjar) → Ashish Singh (ashish-singh7)
assignee: Ashish Singh (ashish-singh7) → nobody
assignee: nobody → Ashish Singh (ashish-singh7)
Revision history for this message
Unmesh Gurjar (unmesh-gurjar) wrote :

@Ashish: I couldn't focus on this issue, you can take it up.

Changed in heat:
status: New → Confirmed
Revision history for this message
Ethan Lynn (ethanlynn) wrote :

I use attached template to test and get the same result.
When update first time, I got following error:
2015-04-02 22:52:48.584 INFO heat.engine.resource [-] updating RandomString "rg" [update-rg-4dmfsiihyb7h] Stack "update" [317cb076-0b60-423b-bf5d-156b44e776a8]
2015-04-02 22:52:48.606 INFO heat.engine.resource [-] UPDATE: RandomString "rg" [update-rg-4dmfsiihyb7h] Stack "update" [317cb076-0b60-423b-bf5d-156b44e776a8]
2015-04-02 22:52:48.606 TRACE heat.engine.resource Traceback (most recent call last):
2015-04-02 22:52:48.606 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/resource.py", line 489, in _action_recorder
2015-04-02 22:52:48.606 TRACE heat.engine.resource yield
2015-04-02 22:52:48.606 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/resource.py", line 748, in update
2015-04-02 22:52:48.606 TRACE heat.engine.resource after_props.validate()
2015-04-02 22:52:48.606 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/properties.py", line 398, in validate
2015-04-02 22:52:48.606 TRACE heat.engine.resource raise exception.StackValidationFailed(message=msg)
2015-04-02 22:52:48.606 TRACE heat.engine.resource StackValidationFailed: Unknown Property count
2015-04-02 22:52:48.606 TRACE heat.engine.resource

That is because we create a randomstring resource name 'rg' when we create the stack, but when we updating the stack, 'rg' become
a type of resourcegroup.
stack-update go into the randomstring update logic and find out that count is not a property.

Changed in heat:
assignee: Ashish Singh (ashish-singh7) → Ethan Lynn (ethanlynn)
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/170181

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

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

commit 189324a7094dc84d8b8206df38e754ae07daf1e4
Author: Ethan Lynn <email address hidden>
Date: Thu Apr 2 23:40:17 2015 +0800

    Fix stack update issue

    Different type of resource with same name should consider to be a
    new resource when stack-update.

    Change-Id: I102ffbd1a1562c164f43969c87570096c280738a
    Closes-Bug: #1404201

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