Red Hat Bugzilla – Bug 1293961
[SFCI] Heat template failed to start because Property error: ... net_cidr (constraint not found)
Last modified: 2016-05-19 11:44:59 EDT
Description of problem:
The software factory Heat template fail to deploy using RDO Liberty. Note that just changing the release to Kilo fix this issue
The RDO release: https://repos.fedorapeople.org/repos/openstack/openstack-liberty/rdo-release-liberty-2.noarch.rpm
Steps to Reproduce:
1. sudo packstack --allinone --os-swift-install=y --os-ceilometer-install=n --nagios-install=n --provision-demo=n --keystone-admin-passwd=sf4ever --os-heat-install=y --cinder-volumes-size=50G
2. heat stack-create using this template: https://raw.githubusercontent.com/redhat-cip/software-factory/master/deploy/heat/softwarefactory.hot
This is automated in that job: http://softwarefactory-project.io/jenkins/job/sf-openstack-liberty-1node-allinone/ (eg build #65)
The heat stack create command failed with:
ERROR: Property error: : resources.sf_ext_secgroup_swarm_slave.properties.rules.remote_ip_prefix: : "0.0.0.0/0" does not validate net_cidr (constraint not found)
Heat stack CREATE_IN_PROGRESS
We hit that bug in software factory project CI (thus the sfci Keywords).
Two jobs are testing OpenStack integration with the SF project using RDO release and packstack deployment:
sf-openstack-kilo-1node-allinone and sf-openstack-liberty-1node-allinone.
The two jobs are identique, except that one will use rdo release, the other kilo release.
IIRC this is due to a missing dependency that is not reflected in the packaging.
Do you have the exact "heat stack-create" command used? I'm not seeing it in the jenkins console output, but maybe I'm looking in the wrong place.
Created attachment 1111985 [details]
I repro'd the issue using simplified-template.hot (uploaded to bz).
If you install python-croniter, the issue should go away. This implies that the real issue is that the openstack-heat-common rpm is missing a dependency on python-croniter.
2016-01-05 18:36:19.086 38117 ERROR stevedore.extension [-] Could not load 'net_cidr': No module named croniter
2016-01-05 18:36:19.086 38117 ERROR stevedore.extension [-] No module named croniter
2016-01-05 18:36:19.086 38117 ERROR stevedore.extension Traceback (most recent call last):
2016-01-05 18:36:19.086 38117 ERROR stevedore.extension File "/usr/lib/python2.7/site-packages/stevedore/extension.py", line 162, in _load_plugins
2016-01-05 18:36:19.086 38117 ERROR stevedore.extension verify_requirements,
2016-01-05 18:36:19.086 38117 ERROR stevedore.extension File "/usr/lib/python2.7/site-packages/stevedore/extension.py", line 185, in _load_one_plugin
2016-01-05 18:36:19.086 38117 ERROR stevedore.extension plugin = ep.load(require=verify_requirements)
2016-01-05 18:36:19.086 38117 ERROR stevedore.extension File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2260, in load
2016-01-05 18:36:19.086 38117 ERROR stevedore.extension entry = __import__(self.module_name, globals(),globals(), ['__name__'])
2016-01-05 18:36:19.086 38117 ERROR stevedore.extension File "/usr/lib/python2.7/site-packages/heat/engine/constraint/common_constraints.py", line 14, in <module>
2016-01-05 18:36:19.086 38117 ERROR stevedore.extension import croniter
Editing /usr/lib/python2.7/site-packages/heat/engine/constraint/common_constraints.py so that "import croniter" is commented out and bouncing the heat services also causes the issue to go away, but I think the proper fix is just to add the python-croniter rpm dependency.
I confirm installing python-croniter before running packstack fixed the issue:
http://softwarefactory-project.io/jenkins/job/sf-openstack-liberty-1node-allinone/83/console shows the heat template is now properly accepted and put in CREATE_IN_PROGRESS
Review submitted to update .spec file:
I have this bug in current liberty packages, I cherry picked the patch to the liberty branch https://review.gerrithub.io/#/c/275756/
This bug is against a Version which has reached End of Life.
If it's still present in supported release (http://releases.openstack.org), please update Version and reopen.