HOT str_replace raises unicode exception when param is None
Bug #1234390 reported by
Randall Burt
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
High
|
Randall Burt |
Bug Description
Changes to HOT str_replace in bug #1228640 result in a unicode exception being thrown when a param value is None (as is often the case during the first call to validate and the param references an attribute of another resource). See attached template and trace.
Changed in heat: | |
importance: | Undecided → High |
tags: | added: havana-rc-potential |
Changed in heat: | |
milestone: | none → havana-rc2 |
Changed in heat: | |
milestone: | havana-rc2 → 2013.2 |
To post a comment you must log in.
Hrm. Thought I could attach a trace too. Here it is if you're interested:
Traceback (most recent call last): File "/usr/local/ lib/python2. 7/dist- packages/ eventlet/ wsgi.py" , line 384, in handle_one_response result = self.applicatio n(self. environ, start_response) File "/usr/local/ lib/python2. 7/dist- packages/ webob/dec. py", line 130, in __call__ resp = self.call_func(req, *args, **self.kwargs) File "/usr/local/ lib/python2. 7/dist- packages/ webob/dec. py", line 195, in call_func return self.func(req, *args, **kwargs) File "/usr/lib/ python2. 7/dist- packages/ heat/common/ wsgi.py" , line 368, in __call__ response = req.get_ response( self.applicatio n) File "/usr/local/ lib/python2. 7/dist- packages/ webob/request. py", line 1296, in send application, catch_exc_ info=False) File "/usr/local/ lib/python2. 7/dist- packages/ webob/request. py", line 1260, in call_application app_iter = application( self.environ, start_response) File "/usr/local/ lib/python2. 7/dist- packages/ keystoneclient/ middleware/ auth_token. py", line 539, in __call__ return self.app(env, start_response) File "/usr/local/ lib/python2. 7/dist- packages/ webob/dec. py", line 130, in __call__ resp = self.call_func(req, *args, **self.kwargs) File "/usr/local/ lib/python2. 7/dist- packages/ webob/dec. py", line 195, in call_func return self.func(req, *args, **kwargs) File "/usr/lib/ python2. 7/dist- packages/ heat/common/ wsgi.py" , line 368, in __call__ response = req.get_ response( self.applicatio n) File "/usr/local/ lib/python2. 7/dist- packages/ webob/request. py", line 1296, in send application, catch_exc_ info=False) File "/usr/local/ lib/python2. 7/dist- packages/ webob/request. py", line 1260, in call_application app_iter = application( self.environ, start_response) File "/usr/local/ lib/python2. 7/dist- packages/ webob/dec. py", line 144, in __call__ return resp(environ, start_response) File "/usr/local/ lib/python2. 7/dist- packages/ routes/ middleware. py", line 131, in __call__ response = self.app(environ, start_response) File "/usr/local/ lib/python2. 7/dist- packages/ webob/dec. py", line 144, in __call__ return resp(environ, start_response) File "/usr/local/ lib/python2. 7/dist- packages/ webob/dec. py", line 130, in __call__ resp = self.call_func(req, *args, **self.kwargs) File "/usr/local/ lib/python2. 7/dist- packages/ webob/dec. py", line 195, in call_func return self.func(req, *args, **kwargs) File "/usr/lib/ python2. 7/dist- packages/ heat/common/ wsgi.py" , line 684, in __call__ raise translate_ exception( err, request. best_match_ language( )) StackValidation Failed_ Remote: Property error : node1: user_data coercing to Unicode: need string or buffer, NoneType found Traceback (most recent call last): File "/usr/lib/ python2. 7/dist- packages/ heat/openstack/ common/ rpc/amqp. py", line 461, in _process_data **args) File "/usr/lib/ python2. 7/dist- packages/ heat/openstack/ common/ rpc/dispatcher. py", line 172, in dispatch result = getattr(proxyobj, method)(ctxt, **kwargs) File "/usr/lib/ python2. 7/dist- packages/ heat/engine/ service. py", line 60, in wrapped return func(self, ctx, *args, **kwargs) File "/usr/lib/ python2. 7/dist- packages/ heat/engine/ service. py", line 273, in create_stack stack.validate() File "/usr/lib/ python2. 7/dist- packages/ heat/engine/ parser. py", line 314...