After the db migration 056 (https://github.com/openstack/heat/blob/master/heat/db/sqlalchemy/migrate_repo/versions/056_convergence_parameter_storage.py), it's possible that the environment is stored as NULL in the database. If you have a stack like this and then list stacks, you'll get the following traceback:
2015-06-11 10:37:15.979 2333 ERROR oslo_messaging._drivers.common [req-89f5f4a9-da33-4148-8210-360a5a90d3a4] ['Traceback (most recent call last):
File "/opt/heat/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply
executor_callback))
File "/opt/heat/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch
executor_callback)
File "/opt/heat/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 130, in _do_dispatch
result = func(ctxt, **new_args)
File "/opt/heat/lib/python2.7/site-packages/osprofiler/profiler.py", line 105, in wrapper
return f(*args, **kwargs)
File "/opt/heat/lib/python2.7/site-packages/heat/common/context.py", line 267, in wrapped
return func(self, ctx, *args, **kwargs)
File "/opt/heat/lib/python2.7/site-packages/heat/engine/service.py", line 511, in list_stacks
return [api.format_stack(stack) for stack in stacks]
File "/opt/heat/lib/python2.7/site-packages/heat/engine/stack.py", line 380, in load_all
not_tags_any) or []
File "/opt/heat/lib/python2.7/site-packages/heat/objects/stack.py", line 123, in get_all
db_stacks)
File "/opt/heat/lib/python2.7/site-packages/heat/objects/stack.py", line 122, in <lambda>
db_stack),
File "/opt/heat/lib/python2.7/site-packages/heat/objects/stack.py", line 70, in _from_db_object
context, db_stack[\'raw_template_id\']))
File "/opt/heat/lib/python2.7/site-packages/heat/objects/raw_template.py", line 69, in get_by_id
raw_template = cls._from_db_object(context, cls(), raw_template_db)
File "/opt/heat/lib/python2.7/site-packages/heat/objects/raw_template.py", line 50, in _from_db_object
if env_fmt.ENCRYPTED_PARAM_NAMES in tpl.environment:
TypeError: argument of type 'NoneType' is not iterable
Fix proposed to branch: master /review. openstack. org/190797
Review: https:/