Bug 1292152 - Heat template fails in validation started with OSP7
Heat template fails in validation started with OSP7
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-heat (Show other bugs)
7.0 (Kilo)
Unspecified Unspecified
high Severity high
: z4
: 7.0 (Kilo)
Assigned To: Thomas Hervé
Amit Ugol
: GSSTriaged, ZStream
Depends On:
Blocks: 1330384
  Show dependency treegraph
 
Reported: 2015-12-16 10:18 EST by Martin Schuppert
Modified: 2016-04-26 11:50 EDT (History)
11 users (show)

See Also:
Fixed In Version: openstack-heat-2015.1.2-6.el7ost
Doc Type: Bug Fix
Doc Text:
This update resolves an issue that would cause deployment of Heat templates to fail during resource validation due to being unable to correctly identify network IDs.
Story Points: ---
Clone Of:
: 1330384 (view as bug list)
Environment:
Last Closed: 2016-02-18 11:42:28 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
heat template to reproduce (888 bytes, application/zip)
2015-12-16 10:18 EST, Martin Schuppert
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1518676 None None None 2015-12-16 10:18 EST
Red Hat Knowledge Base (Solution) 2091991 None None None 2015-12-16 10:30 EST
OpenStack gerrit 259023 None None None 2015-12-17 17:19 EST

  None (edit)
Description Martin Schuppert 2015-12-16 10:18:38 EST
Created attachment 1106477 [details]
heat template to reproduce

Description of problem:
Checked the heat.engine log, during the resource validation, heat complained network or network_id shall be included in properties. 
However, the same script and template has worked fine in JUNO.

The error appears is the following:
ERROR: Failed to validate: Failed to validate: Failed to validate: At least one of the following properties must be specified: network, network_id

Version-Release number of selected component (if applicable):
openstack-heat-common-2015.1.0-4.el7ost.noarch

How reproducible:
100%

Steps to Reproduce:
With attached template
1. heat stack-create -f ./main.hot.yaml  test

Actual results:

Validation fails with "Failed to validate: At least one of the following properties must be specified: network, network_id" which was working in OSP6 :

2015-12-16 09:21:31.491 6979 INFO heat.engine.service [req-94fc849d-2d6f-4350-a3b5-4561e4bf3ea5 admin admin] Creating stack test
2015-12-16 09:21:31.633 6979 DEBUG heat.engine.parameter_groups [req-94fc849d-2d6f-4350-a3b5-4561e4bf3ea5 admin admin] <heat.engine.hot.template.HOTemplate20130523 object at 0x5013c50> __init__ /usr/lib/python2.7/site-packages/heat/engine/parameter_groups.py:32
2015-12-16 09:21:31.633 6979 DEBUG heat.engine.parameter_groups [req-94fc849d-2d6f-4350-a3b5-4561e4bf3ea5 admin admin] <heat.engine.hot.parameters.HOTParameters object at 0x526da50> __init__ /usr/lib/python2.7/site-packages/heat/engine/parameter_groups.py:33
2015-12-16 09:21:31.633 6979 DEBUG heat.engine.parameter_groups [req-94fc849d-2d6f-4350-a3b5-4561e4bf3ea5 admin admin] Validating Parameter Groups. validate /usr/lib/python2.7/site-packages/heat/engine/parameter_groups.py:44
2015-12-16 09:21:31.634 6979 DEBUG heat.engine.parameter_groups [req-94fc849d-2d6f-4350-a3b5-4561e4bf3ea5 admin admin] ['OS::project_id', 'OS::stack_id'] validate /usr/lib/python2.7/site-packages/heat/engine/parameter_groups.py:45
2015-12-16 09:21:31.635 6979 INFO heat.engine.environment [req-94fc849d-2d6f-4350-a3b5-4561e4bf3ea5 admin admin] Registering file:///root/test/my_net.hot.yaml -> file:///root/test/my_net.hot.yaml
2015-12-16 09:21:31.635 6979 INFO heat.common.urlfetch [req-94fc849d-2d6f-4350-a3b5-4561e4bf3ea5 admin admin] Fetching data from file:///root/test/my_net.hot.yaml
2015-12-16 09:21:31.637 6979 INFO heat.engine.environment [req-94fc849d-2d6f-4350-a3b5-4561e4bf3ea5 admin admin] Registering file:///root/test/custom_resource.hot.yaml -> file:///root/test/custom_resource.hot.yaml
2015-12-16 09:21:31.638 6979 INFO heat.common.urlfetch [req-94fc849d-2d6f-4350-a3b5-4561e4bf3ea5 admin admin] Fetching data from file:///root/test/custom_resource.hot.yaml
2015-12-16 09:21:31.640 6979 INFO heat.engine.resource [req-94fc849d-2d6f-4350-a3b5-4561e4bf3ea5 admin admin] Validating TemplateResource "my_net"
2015-12-16 09:21:31.640 6979 INFO heat.engine.environment [req-94fc849d-2d6f-4350-a3b5-4561e4bf3ea5 admin admin] Registering file:///root/test/custom_resource.hot.yaml -> file:///root/test/custom_resource.hot.yaml
2015-12-16 09:21:31.642 6979 INFO heat.engine.environment [req-94fc849d-2d6f-4350-a3b5-4561e4bf3ea5 admin admin] Registering file:///root/test/my_net.hot.yaml -> file:///root/test/my_net.hot.yaml
2015-12-16 09:21:31.644 6979 DEBUG heat.engine.parameter_groups [req-94fc849d-2d6f-4350-a3b5-4561e4bf3ea5 admin admin] <heat.engine.hot.template.HOTemplate20130523 object at 0x4a92150> __init__ /usr/lib/python2.7/site-packages/heat/engine/parameter_groups.py:32
2015-12-16 09:21:31.644 6979 DEBUG heat.engine.parameter_groups [req-94fc849d-2d6f-4350-a3b5-4561e4bf3ea5 admin admin] <heat.engine.hot.parameters.HOTParameters object at 0x526de10> __init__ /usr/lib/python2.7/site-packages/heat/engine/parameter_groups.py:33
2015-12-16 09:21:31.644 6979 DEBUG heat.engine.parameter_groups [req-94fc849d-2d6f-4350-a3b5-4561e4bf3ea5 admin admin] Validating Parameter Groups. validate /usr/lib/python2.7/site-packages/heat/engine/parameter_groups.py:44
2015-12-16 09:21:31.644 6979 DEBUG heat.engine.parameter_groups [req-94fc849d-2d6f-4350-a3b5-4561e4bf3ea5 admin admin] ['OS::project_id', 'OS::stack_id'] validate /usr/lib/python2.7/site-packages/heat/engine/parameter_groups.py:45
2015-12-16 09:21:31.646 6979 INFO heat.engine.resource [req-94fc849d-2d6f-4350-a3b5-4561e4bf3ea5 admin admin] Validating Net "neutron_net"
2015-12-16 09:21:31.647 6979 INFO heat.engine.resource [req-94fc849d-2d6f-4350-a3b5-4561e4bf3ea5 admin admin] Validating TemplateResource "my_resource"
2015-12-16 09:21:31.647 6979 INFO heat.engine.environment [req-94fc849d-2d6f-4350-a3b5-4561e4bf3ea5 admin admin] Registering file:///root/test/custom_resource.hot.yaml -> file:///root/test/custom_resource.hot.yaml
2015-12-16 09:21:31.648 6979 INFO heat.engine.environment [req-94fc849d-2d6f-4350-a3b5-4561e4bf3ea5 admin admin] Registering file:///root/test/my_net.hot.yaml -> file:///root/test/my_net.hot.yaml
2015-12-16 09:21:31.650 6979 DEBUG heat.engine.parameter_groups [req-94fc849d-2d6f-4350-a3b5-4561e4bf3ea5 admin admin] <heat.engine.hot.template.HOTemplate20130523 object at 0x4a92250> __init__ /usr/lib/python2.7/site-packages/heat/engine/parameter_groups.py:32
2015-12-16 09:21:31.650 6979 DEBUG heat.engine.parameter_groups [req-94fc849d-2d6f-4350-a3b5-4561e4bf3ea5 admin admin] <heat.engine.hot.parameters.HOTParameters object at 0x526d790> __init__ /usr/lib/python2.7/site-packages/heat/engine/parameter_groups.py:33
2015-12-16 09:21:31.650 6979 DEBUG heat.engine.parameter_groups [req-94fc849d-2d6f-4350-a3b5-4561e4bf3ea5 admin admin] Validating Parameter Groups. validate /usr/lib/python2.7/site-packages/heat/engine/parameter_groups.py:44
2015-12-16 09:21:31.651 6979 DEBUG heat.engine.parameter_groups [req-94fc849d-2d6f-4350-a3b5-4561e4bf3ea5 admin admin] [u'my_net_param', 'OS::project_id', 'OS::stack_id'] validate /usr/lib/python2.7/site-packages/heat/engine/parameter_groups.py:45
2015-12-16 09:21:31.652 6979 INFO heat.engine.resource [req-94fc849d-2d6f-4350-a3b5-4561e4bf3ea5 admin admin] Validating ResourceGroup "rg"
2015-12-16 09:21:31.654 6979 INFO heat.engine.environment [req-94fc849d-2d6f-4350-a3b5-4561e4bf3ea5 admin admin] Registering file:///root/test/my_net.hot.yaml -> file:///root/test/my_net.hot.yaml
2015-12-16 09:21:31.656 6979 DEBUG heat.engine.parameter_groups [req-94fc849d-2d6f-4350-a3b5-4561e4bf3ea5 admin admin] <heat.engine.hot.template.HOTemplate20130523 object at 0x531eb50> __init__ /usr/lib/python2.7/site-packages/heat/engine/parameter_groups.py:32
2015-12-16 09:21:31.656 6979 DEBUG heat.engine.parameter_groups [req-94fc849d-2d6f-4350-a3b5-4561e4bf3ea5 admin admin] <heat.engine.hot.parameters.HOTParameters object at 0x5156750> __init__ /usr/lib/python2.7/site-packages/heat/engine/parameter_groups.py:33
2015-12-16 09:21:31.656 6979 DEBUG heat.engine.parameter_groups [req-94fc849d-2d6f-4350-a3b5-4561e4bf3ea5 admin admin] Validating Parameter Groups. validate /usr/lib/python2.7/site-packages/heat/engine/parameter_groups.py:44
2015-12-16 09:21:31.656 6979 DEBUG heat.engine.parameter_groups [req-94fc849d-2d6f-4350-a3b5-4561e4bf3ea5 admin admin] ['OS::project_id', 'OS::stack_id'] validate /usr/lib/python2.7/site-packages/heat/engine/parameter_groups.py:45
2015-12-16 09:21:31.658 6979 INFO heat.engine.resource [req-94fc849d-2d6f-4350-a3b5-4561e4bf3ea5 admin admin] Validating Port "0"
2015-12-16 09:21:31.658 6979 INFO heat.engine.stack [req-94fc849d-2d6f-4350-a3b5-4561e4bf3ea5 admin admin] At least one of the following properties must be specified: network, network_id
2015-12-16 09:21:31.659 6979 INFO heat.engine.stack [req-94fc849d-2d6f-4350-a3b5-4561e4bf3ea5 admin admin] Failed to validate: At least one of the following properties must be specified: network, network_id
2015-12-16 09:21:31.659 6979 INFO heat.engine.stack [req-94fc849d-2d6f-4350-a3b5-4561e4bf3ea5 admin admin] Failed to validate: Failed to validate: At least one of the following properties must be specified: network, network_id
2015-12-16 09:21:31.660 6979 DEBUG oslo_messaging.rpc.dispatcher [req-94fc849d-2d6f-4350-a3b5-4561e4bf3ea5 admin admin] Expected exception during message handling (Failed to validate: Failed to validate: At least one of the following properties must be specified: network, network_id) _dispatch_and_reply /usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py:145
...

Expected results:

Validation works as before.

Additional info:

Issue has been reported upstream at [1] , which is a duplicate of [2]. Verified that validation of attached heat template work with a backport of upstream commit at [3] 

[1] https://bugs.launchpad.net/heat/+bug/1522269
[2] https://bugs.launchpad.net/heat/+bug/1518676
[3] https://review.openstack.org/#/c/248719/
Comment 3 Steven Hardy 2015-12-17 08:30:00 EST
Assigning to therve as he's the author of https://review.openstack.org/#/c/248719/ and has kindly offered to look into a suitable backport for OSP7/kilo.

https://review.openstack.org/#/c/258307/ is the backport of that fix to liberty, but it looks like that is not cleanly backportable to OSP7/kilo so we may need a different fix and/or additional backports.
Comment 4 Thomas Hervé 2015-12-17 09:01:24 EST
Reproduced on a kilo environment. We can't backport the original fix as it relies on other features, but I made a new patch which ought to fix the issue: https://review.openstack.org/#/c/259023/
Comment 13 errata-xmlrpc 2016-02-18 11:42:28 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2016-0266.html

Note You need to log in before you can comment on or make changes to this bug.