Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1431056

Summary: Environment files need better handling by heat client
Product: Red Hat OpenStack Reporter: Christopher Brown <chris.brown>
Component: python-heatclientAssignee: Thomas Hervé <therve>
Status: CLOSED ERRATA QA Contact: Ronnie Rasouli <rrasouli>
Severity: high Docs Contact:
Priority: unspecified    
Version: 10.0 (Newton)CC: augol, jruzicka, mburns, myusuf, nlevinki, pkonst+RHBZ, rhel-osp-director-maint, shardy, srevivo, zbitter
Target Milestone: z3Keywords: Triaged, ZStream
Target Release: 10.0 (Newton)   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: python-heatclient-1.5.0-3.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-28 15:25:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Christopher Brown 2017-03-10 09:22:18 UTC
Description of problem:

OSP 10's heat client could handle environment files better. Currently I have templates that worked fine with OSP 9 and now see an error:

TypeError: 'NoneType' object does not support item assignment

This is handled by the following patch:

https://review.openstack.org/#/c/383785/

https://bugs.launchpad.net/python-heatclient/+bug/1631408

I am unable to locate an "empty parameter_defaults section" so assume this is another issue. However currently I need to manually backport this patch to permit deployment.

Version-Release number of selected component (if applicable):

[stack@undercloud ~]$ rpm -qa | grep -i heat
openstack-heat-templates-0-0.11.1e6015dgit.el7ost.noarch
python-heatclient-1.5.0-1.el7ost.noarch
openstack-heat-api-7.0.2-1.el7ost.noarch
puppet-heat-9.5.0-1.el7ost.noarch
heat-cfntools-1.3.0-2.el7ost.noarch
openstack-heat-engine-7.0.2-1.el7ost.noarch
openstack-heat-api-cfn-7.0.2-1.el7ost.noarch
python-heat-agent-0-0.11.1e6015dgit.el7ost.noarch
openstack-heat-common-7.0.2-1.el7ost.noarch
openstack-tripleo-heat-templates-5.2.0-3.el7ost.noarch

How reproducible:

Always

Steps to Reproduce:
1. Run deployment with debug

Actual results:

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 387, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python2.7/site-packages/cliff/command.py", line 59, in run
    return self.take_action(parsed_args) or 0
  File "/usr/lib/python2.7/site-packages/tripleoclient/v1/overcloud_deploy.py", line 1183, in take_action
    self._deploy_tripleo_heat_templates_tmpdir(stack, parsed_args)
  File "/usr/lib/python2.7/site-packages/tripleoclient/v1/overcloud_deploy.py", line 403, in _deploy_tripleo_heat_templates_tmpdir
    new_tht_root, tht_root)
  File "/usr/lib/python2.7/site-packages/tripleoclient/v1/overcloud_deploy.py", line 469, in _deploy_tripleo_heat_templates
    cleanup=not parsed_args.no_cleanup)
  File "/usr/lib/python2.7/site-packages/tripleoclient/v1/overcloud_deploy.py", line 210, in _process_multiple_environments
    localenv = template_utils.deep_update(localenv, env)
  File "/usr/lib/python2.7/site-packages/heatclient/common/template_utils.py", line 193, in deep_update
    r = deep_update(old.get(k, {}), v)
  File "/usr/lib/python2.7/site-packages/heatclient/common/template_utils.py", line 196, in deep_update
    old[k] = new[k]
TypeError: 'NoneType' object does not support item assignment

Expected results:

Deployment continues

Additional info:

Please backport https://review.openstack.org/#/c/383785/

Comment 4 Ronnie Rasouli 2017-06-14 07:23:03 UTC
ERROR: Environment not in valid format: environment has empty section "parameter_defaults" in case the parameter_defaults: empty

Comment 6 errata-xmlrpc 2017-06-28 15:25:46 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://access.redhat.com/errata/RHBA-2017:1589