Use default value during update

Bug #1298850 reported by Sergey Kraynev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Sergey Kraynev

Bug Description

There are a lot of properties have default value in property schema.
This default variables are used during stack creation, but are not used during update.

For example:
1 . property has default value [].
2. you create stack nd set this property in [val1, val2]
3. then you want to update stack using template without this property.
Expected behavior will be use default value in this case, but currently you will get value equal None.

I suppose we should chose what variable will be used during update (value from prop_diff or default value )

Changed in heat:
assignee: nobody → Sergey Kraynev (skraynev)
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/83709

Changed in heat:
status: New → In Progress
Changed in heat:
milestone: none → juno-1
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to heat (master)

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

commit 08b702d4c31e7a87ff5fa38b9ace795942e0c05a
Author: Sergey Kraynev <email address hidden>
Date: Fri Mar 28 06:16:12 2014 -0400

    Fix incorrect logic during updating in unittest

    The property image_update_policy has two ways for initialization during
    update. One of them is when image_update_policy is not presented in
    prop_diff and shoud be used from self.properties. So image_update_policy
    should be used in old and new templates without any changes.

    Related-Bug: #1298850
    Change-Id: Ie9afa65ad6d095d4293be077536fb807919de789

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

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

commit fcecf91840d8ac12e00dc2ff9f95f4e5066684e7
Author: Sergey Kraynev <email address hidden>
Date: Fri Mar 28 06:50:44 2014 -0400

    Using default value during update

    At the current moment default value is used only during resource
    creation. However It should be used during update too.

    Change-Id: I385d48b65f475284c80d2678cf83ce9dae1d76e3
    Closes-Bug: #1298850

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