Ask Your Question
0

Heat: Resource create failed: InvalidTemplateAttribute: The Referenced Attribute (instance0_port0 security_groups)

asked 2014-02-18 12:06:45 -0500

malleshicn gravatar image

Hello team,

getting the below error while deploying heat on 3 node havana - ubuntu

Log messages: 2014-02-18 09:07:23.904 14679 INFO heat.engine.resource [-] creating Port "instance0_port0" 2014-02-18 09:07:23.977 14679 ERROR heat.engine.resource [-] CREATE : Port "instance0_port0" 2014-02-18 09:07:23.977 14679 TRACE heat.engine.resource Traceback (most recent call last): 2014-02-18 09:07:23.977 14679 TRACE heat.engine.resource File "/usr/lib/python2.7/dist-packages/heat/engine/resource.py", line 358, in _do_action 2014-02-18 09:07:23.977 14679 TRACE heat.engine.resource handle_data = handle() 2014-02-18 09:07:23.977 14679 TRACE heat.engine.resource File "/usr/lib/python2.7/dist-packages/heat/engine/resources/neutron/port.py", line 85, in handle_create 2014-02-18 09:07:23.977 14679 TRACE heat.engine.resource self.neutron()) 2014-02-18 09:07:23.977 14679 TRACE heat.engine.resource File "/usr/lib/python2.7/dist-packages/heat/engine/resources/neutron/neutron.py", line 146, in get_secgroup_uuids 2014-02-18 09:07:23.977 14679 TRACE heat.engine.resource key=props_name) 2014-02-18 09:07:23.977 14679 TRACE heat.engine.resource InvalidTemplateAttribute: The Referenced Attribute (instance0_port0 security_groups) is incorrect. 2014-02-18 09:07:23.977 14679 TRACE heat.engine.resource 2014-02-18 09:07:24.029 14679 WARNING heat.engine.service [-] Stack create failed, status FAILED

my template: heat_template_version: 2013-05-23 description: Simple template to deploy a single compute instance

parameters: key_name: type: string default: heat_key description: Name of an existing key pair to use for the instance flavor: type: string description: Instance type for the instance to be created default: m1.small constraints: - allowed_values: [m1.nano, m1.tiny, m1.small, m1.large] description: Value must be one of 'm1.tiny', 'm1.small' or 'm1.large' image: type: string default: cirros description: ID or name of the image to use for the instance

private_net_id: type: string default: ad5a1e6c-24b7-4190-b4e7-6e4f19b046ce description: Private network id private_subnet_id: type: string default: 69b3ddd9-b092-4361-b541-4f171c736a9d description: Private subnet id public_net_id: type: string default: fbfc3fa8-473b-40fa-89e8-8c7a1acb0d0b description: Public network id

resources: instance0: type: OS::Nova::Server properties: name: instance0 image: { get_param: image } flavor: { get_param: flavor } key_name: { get_param: key_name } networks: - port: { get_resource: instance0_port0 } instance0_port0: type: OS::Neutron::Port properties: network_id: { get_param: private_net_id } security_groups: - default fixed_ips: - subnet_id: { get_param: private_subnet_id } instance0_public: "sam.template" 64L, 1947C

could you please help me to fix this and let me know where I am doing a mistake

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
0

answered 2014-02-18 16:02:14 -0500

zaneb gravatar image

That error message is unfortunately misleading (and it has been improved in Icehouse). It appears when the security group is not found in Neutron - I suspect because it requires a UUID instead of a name. (This has also been improved in Icehouse.) So you could try passing a UUID or get_resource on a security group defined in the template.

However the security_groups property is optional, and if you leave it off I imagine the port ends up in the default security group, so just removing it might be the first thing to try.

edit flag offensive delete link more
0

answered 2014-02-20 06:17:33 -0500

malleshicn gravatar image

Hi Zane,

Thanks for the answer . I commented out the security_group , No mu instance creation is successfull.

instance0_port0: type: OS::Neutron::Port properties: network_id: { get_param: private_net_id } # security_groups: # OS::Neutron::SecurityGroup # - default need a one more favor from you .. could you pleae refer me the guide from which I can create and understand the templates in heat , So that I can learn to create my own templates.

it will be a great help for me.. Thanks again for your reply :)

edit flag offensive delete link more
0

answered 2014-02-20 15:07:24 -0500

zaneb gravatar image

Our template guide is here: http://docs.openstack.org/developer/heat/template_guide/index.html (http://docs.openstack.org/developer/h...)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-02-18 12:06:45 -0500

Seen: 1,149 times

Last updated: Feb 20 '14