Murano attempts to update heat stack even if template was not modified

Bug #1594451 reported by Alexander Tivelkov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Murano
Fix Released
Medium
Alexander Tivelkov

Bug Description

After Murano has deployed an Instance subsequent calls to HeatStack.push() method (even without any calls to HeatStack.updateTemplate() in between) cause Murano to execute an extra call to Heat API to update the stack. This may take significant amount of time and thus should be avoided.

The calls of HeatStack.updateTemplate() which do not cause any actual changes of the template should also not lead to the pushing of the stack.

Tags: engine
Changed in murano:
assignee: nobody → Alexander Tivelkov (ativelkov)
importance: Undecided → Medium
status: New → Confirmed
summary: - Murano attempts to update heat stack iven if template was not modified
+ Murano attempts to update heat stack even if template was not modified
Changed in murano:
milestone: none → newton-2
tags: added: engine
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to murano (master)

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

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

Reviewed: https://review.openstack.org/331774
Committed: https://git.openstack.org/cgit/openstack/murano/commit/?id=55a785afcc740196abd7df8bd8106eaf533ee10f
Submitter: Jenkins
Branch: master

commit 55a785afcc740196abd7df8bd8106eaf533ee10f
Author: Alexander Tivelkov <email address hidden>
Date: Mon Jun 20 20:19:12 2016 +0300

    Fixed a bug when Heat Stack Update was called without template changes

    The 'is_different' utility function was relying on the sequence of
    dictionary keys when determining whether the objects are different or
    not, which is incorrect, since Python does not guarantee the order of
    keys in regular dictionaries.

    This was causing the function to report false inequalities after the
    Heat Stack is pushed, thus causing murano to re-push the stack even if
    it was not modified in between.

    The calls of the 'is_different' method were replaced with simple
    equality check which are guaranteed to return appropriate result. The
    only known limitation of such approach is its inability to check for
    circular references. However this is not the case for Murano-generate
    Heat snippets, since all the variables in MuranoPL are immutable and
    it's impossible to create a circular-referencing snippet with
    MuranoPL. Thus it is safe to completely remove 'is_different' method
    and all related code.

    The same patch also introduces a simple check which verifies that the
    HeatStack.update_template() method introduces an actual change into
    the template, or does not cause a subsequent push() call otherwise.

    Change-Id: Ia71b44ed62f39d9c89630c5a5c21b79c7c17ea9d
    Closes-bug: #1594451

Changed in murano:
status: In Progress → Fix Released
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/murano 3.0.0.0b2

This issue was fixed in the openstack/murano 3.0.0.0b2 development milestone.

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.