KeyError: 'encrypted_param_names' in heat.objects.raw_template.get_by_id()

Bug #1456700 reported by Jason Dunsmore
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
Jason Dunsmore

Bug Description

If a Heat engine is started with old data (prior to the encrypted hidden params patch), it will result in the following traceback:

2015-05-19 10:57:28.830 4524 CRITICAL heat-engine [req-6511d7ed-cd86-473b-80e8-574c172c1fac - -] KeyError: 'encrypted_param_names'
2015-05-19 10:57:28.830 4524 TRACE heat-engine Traceback (most recent call last):
2015-05-19 10:57:28.830 4524 TRACE heat-engine File "/opt/heat/bin/heat-engine", line 78, in <module>
2015-05-19 10:57:28.830 4524 TRACE heat-engine srv.create_periodic_tasks()
2015-05-19 10:57:28.830 4524 TRACE heat-engine File "/opt/heat/lib/python2.7/site-packages/osprofiler/profiler.py", line 105, in wrapper
2015-05-19 10:57:28.830 4524 TRACE heat-engine return f(*args, **kwargs)
2015-05-19 10:57:28.830 4524 TRACE heat-engine File "/opt/heat/lib/python2.7/site-packages/heat/engine/service.py", line 320, in create_periodic_tasks
2015-05-19 10:57:28.830 4524 TRACE heat-engine show_hidden=True)
2015-05-19 10:57:28.830 4524 TRACE heat-engine File "/opt/heat/lib/python2.7/site-packages/heat/objects/stack.py", line 119, in get_all
2015-05-19 10:57:28.830 4524 TRACE heat-engine db_stacks)
2015-05-19 10:57:28.830 4524 TRACE heat-engine File "/opt/heat/lib/python2.7/site-packages/heat/objects/stack.py", line 118, in <lambda>
2015-05-19 10:57:28.830 4524 TRACE heat-engine db_stack),
2015-05-19 10:57:28.830 4524 TRACE heat-engine File "/opt/heat/lib/python2.7/site-packages/heat/objects/stack.py", line 70, in _from_db_object
2015-05-19 10:57:28.830 4524 TRACE heat-engine context, db_stack['raw_template_id']))
2015-05-19 10:57:28.830 4524 TRACE heat-engine File "/opt/heat/lib/python2.7/site-packages/heat/objects/raw_template.py", line 66, in get_by_id
2015-05-19 10:57:28.830 4524 TRACE heat-engine raw_template = cls._from_db_object(context, cls(), raw_template_db)
2015-05-19 10:57:28.830 4524 TRACE heat-engine File "/opt/heat/lib/python2.7/site-packages/heat/objects/raw_template.py", line 51, in _from_db_object
2015-05-19 10:57:28.830 4524 TRACE heat-engine encrypted_param_names = tpl.environment[env_fmt.ENCRYPTED_PARAM_NAMES]
2015-05-19 10:57:28.830 4524 TRACE heat-engine KeyError: 'encrypted_param_names'

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

Fix proposed to branch: master
Review: https://review.openstack.org/184321

Changed in heat:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/184321
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=22e4a84cf23658917a6e05913fc53c497f09eb8e
Submitter: Jenkins
Branch: master

commit 22e4a84cf23658917a6e05913fc53c497f09eb8e
Author: Jason Dunsmore <email address hidden>
Date: Tue May 19 14:50:55 2015 -0500

    Check for encrypted_param_names key in environment

    If unencrypted data exists in the database, there will be no
    'encrypted_param_names' key in the environment. Check for this key
    before referencing it.

    Change-Id: Ie8c593818a64d150e815487e1449a52173f1ab5d
    Closes-Bug: #1456700

Changed in heat:
status: In Progress → Fix Committed
tags: added: kilo-backport-potential
tags: removed: kilo-backport-potential
Changed in heat:
importance: Undecided → High
Thierry Carrez (ttx)
Changed in heat:
milestone: none → liberty-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: liberty-1 → 5.0.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.