template contract doesn't work when it references object from outside of template

Bug #1689769 reported by Stan Lagun
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Murano
Fix Released
Medium
Stan Lagun

Bug Description

It is impossible to use templates with $.template() contract if the template has ID references to objects that are owned by some object outside of template.

For example, if the app owns a Network object I cannot put ID of that network in the customNetworks
property of the Instance template so that all instances produced by the instance factory join that network.

Stan Lagun (slagun)
Changed in murano:
assignee: nobody → Stan Lagun (slagun)
importance: Undecided → Medium
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/463690

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

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

commit fb593ab4395979f7d95f61fe63b9698933bb8b9c
Author: Stan Lagun <email address hidden>
Date: Wed May 10 02:11:06 2017 -0700

    External object IDs couldn't be used in template() contracts

    Due to the bug in object serializer, when template() contract
    serialized the template to a dictionary, instead of object IDs
    for the objects outside of serialized tree it put the object body.
    Thus when new objects were created from the template, they all
    had copies of that object with different IDs rather than copies
    of the ID string (i.e. references to the same object).

    Also template() contract tried to serialize the template on each of
    the 2 object model load passes even though the result from the first
    pass is never used. However, during first pass the model could contain
    forward-references to objects that are not loaded yet so attempt to
    serialize such model could fail.

    Change-Id: I9d81f10c160c44e6405b54f5470904064c1d4852
    Closes-Bug: #1689769

Changed in murano:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/murano 4.0.0.0b2

This issue was fixed in the openstack/murano 4.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.