[openstack-dev] [heat] Resource CREATE failed with TypeError

Steve Baker sbaker at redhat.com
Sun Feb 8 21:06:58 UTC 2015


On 06/02/15 23:07, Qiming Teng wrote:
> Hi,
>
> Just checked your template.  It seems your SoftwareDeployment resource
> is not referencing the SoftwareConfig resource properly.  A
> SoftwareDeployment 'binds' a SoftwareConfig to a Server.  Without that
> 'binding', the template won't work as expected.
>
> I'll follow up on this checking if Heat should validate that the
> 'config' property of a SoftwareDeployment is set.
>
> Regards,
>    Qiming
The discussion is ongoing in https://review.openstack.org/#/c/144865/ as 
to whether the config property should be made mandatory, and whatever 
the outcome is will become the fix for 
https://bugs.launchpad.net/heat/+bug/1407387

>
> On Wed, Feb 04, 2015 at 07:23:10AM +0000, Zhou, Zhenzan wrote:
>> Hi, Experts
>>
>> I am writing a template to start a multi node devstack cloud inside overcloud. Heat Engine got exception after started the first controller VM. I am using the latest Heat code.
>> Here is the stack trace:
>>
>> Feb  4 15:10:21 minicloud-allinone-controller0-i7bnc6baumzl heat-engine: 2015-02-04 15:10:21.733 138441 ERROR oslo_messaging.rpc.dispatcher [req-f8fbb6d4-924d-4c0c-8b60-16ed30358765 ] Exception during message handling: object of type 'NoneType' has no len()
>> Feb  4 15:10:21 minicloud-allinone-controller0-i7bnc6baumzl heat-engine: 2015-02-04 15:10:21.733 138441 TRACE oslo_messaging.rpc.dispatcher Traceback (most recent call last):
>> Feb  4 15:10:21 minicloud-allinone-controller0-i7bnc6baumzl heat-engine: 2015-02-04 15:10:21.733 138441 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/venvs/heat/local/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply
>> Feb  4 15:10:21 minicloud-allinone-controller0-i7bnc6baumzl heat-engine: 2015-02-04 15:10:21.733 138441 TRACE oslo_messaging.rpc.dispatcher     executor_callback))
>> Feb  4 15:10:21 minicloud-allinone-controller0-i7bnc6baumzl heat-engine: 2015-02-04 15:10:21.733 138441 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/venvs/heat/local/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch
>> Feb  4 15:10:21 minicloud-allinone-controller0-i7bnc6baumzl heat-engine: 2015-02-04 15:10:21.733 138441 TRACE oslo_messaging.rpc.dispatcher     executor_callback)
>> Feb  4 15:10:21 minicloud-allinone-controller0-i7bnc6baumzl heat-engine: 2015-02-04 15:10:21.733 138441 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/venvs/heat/local/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 130, in _do_dispatch
>> Feb  4 15:10:21 minicloud-allinone-controller0-i7bnc6baumzl heat-engine: 2015-02-04 15:10:21.733 138441 TRACE oslo_messaging.rpc.dispatcher     result = func(ctxt, **new_args)
>> Feb  4 15:10:21 minicloud-allinone-controller0-i7bnc6baumzl heat-engine: 2015-02-04 15:10:21.733 138441 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/venvs/heat/local/lib/python2.7/site-packages/osprofiler/profiler.py", line 105, in wrapper
>> Feb  4 15:10:21 minicloud-allinone-controller0-i7bnc6baumzl heat-engine: 2015-02-04 15:10:21.733 138441 TRACE oslo_messaging.rpc.dispatcher     return f(*args, **kwargs)
>> Feb  4 15:10:21 minicloud-allinone-controller0-i7bnc6baumzl heat-engine: 2015-02-04 15:10:21.733 138441 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/venvs/heat/local/lib/python2.7/site-packages/heat/engine/service.py", line 74, in wrapped
>> Feb  4 15:10:21 minicloud-allinone-controller0-i7bnc6baumzl heat-engine: 2015-02-04 15:10:21.733 138441 TRACE oslo_messaging.rpc.dispatcher     return func(self, ctx, *args, **kwargs)
>> Feb  4 15:10:21 minicloud-allinone-controller0-i7bnc6baumzl heat-engine: 2015-02-04 15:10:21.733 138441 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/venvs/heat/local/lib/python2.7/site-packages/heat/engine/service.py", line 1386, in show_software_config
>> Feb  4 15:10:21 minicloud-allinone-controller0-i7bnc6baumzl heat-engine: 2015-02-04 15:10:21.733 138441 TRACE oslo_messaging.rpc.dispatcher     sc = db_api.software_config_get(cnxt, config_id)
>> Feb  4 15:10:21 minicloud-allinone-controller0-i7bnc6baumzl heat-engine: 2015-02-04 15:10:21.733 138441 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/venvs/heat/local/lib/python2.7/site-packages/heat/db/api.py", line 258, in software_config_get
>> Feb  4 15:10:21 minicloud-allinone-controller0-i7bnc6baumzl heat-engine: 2015-02-04 15:10:21.733 138441 TRACE oslo_messaging.rpc.dispatcher     return IMPL.software_config_get(context, config_id)
>> Feb  4 15:10:21 minicloud-allinone-controller0-i7bnc6baumzl heat-engine: 2015-02-04 15:10:21.733 138441 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/venvs/heat/local/lib/python2.7/site-packages/heat/db/sqlalchemy/api.py", line 717, in software_config_get
>> Feb  4 15:10:21 minicloud-allinone-controller0-i7bnc6baumzl heat-engine: 2015-02-04 15:10:21.733 138441 TRACE oslo_messaging.rpc.dispatcher     result = model_query(context, models.SoftwareConfig).get(config_id)
>> Feb  4 15:10:21 minicloud-allinone-controller0-i7bnc6baumzl heat-engine: 2015-02-04 15:10:21.733 138441 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/venvs/heat/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 818, in get
>> Feb  4 15:10:21 minicloud-allinone-controller0-i7bnc6baumzl heat-engine: 2015-02-04 15:10:21.733 138441 TRACE oslo_messaging.rpc.dispatcher     if len(ident) != len(mapper.primary_key):
>> Feb  4 15:10:21 minicloud-allinone-controller0-i7bnc6baumzl heat-engine: 2015-02-04 15:10:21.733 138441 TRACE oslo_messaging.rpc.dispatcher TypeError: object of type 'NoneType' has no len()
>> Feb  4 15:10:21 minicloud-allinone-controller0-i7bnc6baumzl heat-engine: 2015-02-04 15:10:21.733 138441 TRACE oslo_messaging.rpc.dispatcher
>> Feb  4 15:10:21 minicloud-allinone-controller0-i7bnc6baumzl heat-engine: 2015-02-04 15:10:21.735 138441 ERROR oslo_messaging._drivers.common [req-f8fbb6d4-924d-4c0c-8b60-16ed30358765 ] Returning exception object of type 'NoneType' has no len() to caller
>>
>> Is there anything wrong with the template (it's attached)? Or I met a bug inside Heat?
>> Thanks a lot.
>>
>> BR
>> Zhou Zhenzan
>
>> __________________________________________________________________________
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev




More information about the OpenStack-dev mailing list