Heat创建stack时报错:'NoneType' object has no attribute 'rstrip'

提问于 2014-06-15 08:40:12 -0500

agenge 图像

各位: 目前在使用heat时遇到下面这个问题: ERROR: Property error :MyInstance: ImageId 'NoneType' object has no attribute 'rstrip'

  1. OP环境:
  2. Ubuntu14.04 LTS通过apt-get 安装的heat,版本为Icehouse

  3. 操作步骤(使用的DEMO租户,_member_角色):

    root@op-i-controller:~# source demo-openrc root@op-i-controller:~# heat stack-create -f heat-templates/cfn/F17/getting_started.template -P "KeyName=testkey" mystack ERROR: Property error : MyInstance: ImageId 'NoneType' object has no attribute 'rstrip' root@op-i-controller:~# cat heat-templates/cfn/F17/getting_started.template { "AWSTemplateFormatVersion" : "2010-09-09", "Parameters" : { "KeyName" : { "Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instance", "Type" : "String" } },

    "Resources" : { "MyInstance" : { "Type" : "AWS::EC2::Instance", "Properties" : { "KeyName" : { "Ref" : "KeyName" }, "ImageId" : "0cec3084-02ca-4e3a-ba32-e0609cbafa10", "InstanceType": "m1.small", "UserData" : { "Fn::Base64" : "80" } } } }, "Outputs" : { "InstanceIp" : { "Value" : { "Fn::Join" : ["", ["ssh ec2-user@", {"Fn::GetAtt": ["MyInstance", "PublicIp"]}]]}, "Description" : "My ssh command" } }

  4. 网络使用的Neutron + gre

  5. heat具体安装方式:apt-get install -y heat-api heat-api-cfn heat-engine heat-api-cloudwatch
  6. 在执行时 /var/log/heat/heat-enginer.log 的调试(DEBUG)日志:

    2014-06-15 21:32:52.185 17216 DEBUG heat.openstack.common.rpc.amqp [-] received {u'_msg_id': u'bb578b36d60b4b34b4be7df95b90e85b', u'_context_request_id': u'req-baad3203-4454-4919-a890-6a40e257391a', u'_context_trust_id': None, u'_context_auth_token': '<sanitized>', u'_context_user_id': u'ecb5b7daca544285b5d70070da3d36e0', u'_context_username': u'demo', u'_reply_q': u'reply_b6549841cee24a5ab305a40514a0fc93', u'_context_show_deleted': False, u'namespace': None, u'_context_is_admin': False, u'version': u'1.0', u'_context_user': u'demo', u'method': u'create_stack', u'_context_roles': [u'_member_'], u'_context_auth_url': None, u'args': {u'stack_name': u'mystack', u'files': {}, u'args': {u'disable_rollback': True, u'timeout_mins': 60}, u'params': {u'parameters': {u'KeyName': u'testkey'}, u'resource_registry': {}}, u'template': {u'AWSTemplateFormatVersion': u'2010-09-09', u'Outputs': {u'InstanceIp': {u'Description': u'My ssh command', u'Value': {u'Fn::Join': [u'', [u'ssh ec2-user@', {u'Fn::GetAtt': [u'MyInstance', u'PublicIp']}]]}}}, u'Parameters': {u'KeyName': {u'Type': u'String', u'Description': u'Name of an existing EC2 KeyPair to enable SSH access to the instance'}}, u'Resources': {u'MyInstance': {u'Type': u'AWS::EC2::Instance', u'Properties': {u'UserData': {u'Fn::Base64': u'80'}, u'KeyName': {u'Ref': u'KeyName'}, u'InstanceType': u'm1.small', u'ImageId': u'0cec3084-02ca-4e3a-ba32-e0609cbafa10'}}}}}, u'_unique_id': u'bbb758097f39490daec67f293a3ef41d', u'_context_tenant_id': u'7b24b437532846d9a3a3e4c6a58f14e5', u'_context_password': '<sanitized>', u'_context_trustor_user_id': None, u'_context_aws_creds': None, u'_context_tenant': u'demo'} _safe_log /usr/lib/python2.7/dist-packages/heat/openstack/common/rpc/common.py:280 2014-06-15 21:32:52.186 17216 DEBUG heat.openstack.common.rpc.amqp [-] unpacked context: {'username': u'demo', 'user_id': u'ecb5b7daca544285b5d70070da3d36e0', 'show_deleted': False, 'roles': [u'_member_'], 'tenant_id': u'7b24b437532846d9a3a3e4c6a58f14e5', 'auth_token': '<sanitized>', 'trust_id': None, 'is_admin': False, 'user': u'demo', 'request_id': u'req-baad3203-4454-4919-a890-6a40e257391a', 'auth_url': None, 'password': '<sanitized>', 'aws_creds': None, 'tenant': u'demo', 'trustor_user_id': None} _safe_log /usr/lib/python2.7/dist-packages/heat/openstack/common/rpc/common.py:280 2014-06-15 21:32:52.187 17216 INFO heat.engine.service [req-baad3203-4454-4919-a890-6a40e257391a None] template is {u'AWSTemplateFormatVersion': u'2010-09-09', u'Outputs': {u'InstanceIp': {u'Description': u'My ssh command', u'Value': {u'Fn::Join': [u'', [u'ssh ec2-user@', {u'Fn::GetAtt': [u'MyInstance', u'PublicIp']}]]}}}, u'Resources': {u'MyInstance': {u'Type': u'AWS::EC2::Instance', u'Properties': {u'UserData': {u'Fn::Base64': u'80'}, u'KeyName': {u'Ref': u'KeyName'}, u'InstanceType': u'm1.small', u'ImageId': u'0cec3084-02ca-4e3a-ba32-e0609cbafa10'}}}, u'Parameters': {u'KeyName': {u'Type': u'String ...

(更多)
edit retag flag offensive close merge delete