Bug 1292152 - Heat template fails in validation started with OSP7
Summary: Heat template fails in validation started with OSP7
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-heat
Version: 7.0 (Kilo)
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: z4
: 7.0 (Kilo)
Assignee: Thomas Hervé
QA Contact: Amit Ugol
URL:
Whiteboard:
Depends On:
Blocks: 1330384
TreeView+ depends on / blocked
 
Reported: 2015-12-16 15:18 UTC by Martin Schuppert
Modified: 2023-02-22 23:02 UTC (History)
10 users (show)

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.
Clone Of:
: 1330384 (view as bug list)
Environment:
Last Closed: 2016-02-18 16:42:28 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1518676 0 None None None 2015-12-16 15:18:37 UTC
OpenStack gerrit 259023 0 None None None 2015-12-17 22:19:10 UTC
Red Hat Issue Tracker OSP-16744 0 None None None 2022-07-09 08:17:04 UTC
Red Hat Knowledge Base (Solution) 2091991 0 None None None 2015-12-16 15:30:36 UTC
Red Hat Product Errata RHSA-2016:0266 0 normal SHIPPED_LIVE Moderate: openstack-heat bug fix and security advisory 2016-02-18 21:41:02 UTC

Description Martin Schuppert 2015-12-16 15:18:38 UTC
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 13:30:00 UTC
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 14:01:24 UTC
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 16:42:28 UTC
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.