Comment 7 for bug 1285067

Revision history for this message
Sergey Kraynev (skraynev) wrote :

I have researched this problem and have find, that the real problem is related with incorrect resolving method for reference.
According presented in description templates we have reference on one of new resources. So for resolve should be used Resource Ref class, but if you look at error message, it tell "The Parameter (instance2-port) was not provided.". Also both template have empty parameter section.
The problem related with changes introduced in https://blueprints.launchpad.net/heat/+spec/function-plugins.
Currently Ref class makes decision about, what class for resolving will be used, based on Resources stored in template
https://github.com/openstack/heat/blob/master/heat/engine/cfn/functions.py#L118.
However when we update resource https://github.com/openstack/heat/blob/master/heat/engine/update.py#L123
we call __setitem__ method of stack and then change resource reference on stack https://github.com/openstack/heat/blob/master/heat/engine/parser.py#L261 , but old template haven't new resources.