Ask Your Question
0

heat stack-create - ERROR: The template section is invalid: NetID

asked 2015-03-20 02:38:26 -0500

updated 2015-04-10 14:08:25 -0500

zaneb gravatar image

While running heat stack-create command I am getting error "The template section is invalid: NetID". Please help.

[root@controller ~]# NET_ID=$(nova net-list | awk '/ demo-net / { print $2 }')
[root@controller ~]# heat stack-create -f test-stack.yml \
>   -P "ImageID=cirros-0.3.3-x86_64;NetID=$NET_ID" testStack
**ERROR: The template section is invalid: NetID**

Following is the output of nova net-list:

[root@controller ~]# nova net-list
+--------------------------------------+----------+------+
| ID                                   | Label    | CIDR |
+--------------------------------------+----------+------+
| e3731e81-a9d4-44c8-9536-7f667227715e | demo-net | None |
| 12fafe20-cfd3-4a3c-b54d-8992de2acac2 | ext-net  | None |
+--------------------------------------+----------+------+
edit retag flag offensive close merge delete

Comments

Having same problem, just following the Juno setup guide and when attempting heat stack-create got the same error message.

eneficus gravatar imageeneficus ( 2015-03-20 14:33:41 -0500 )edit

3 answers

Sort by ยป oldest newest most voted
0

answered 2015-04-11 15:45:04 -0500

pas-ha gravatar image

BTW, you can use the names instead of UUIDs for those "image" and "networks: -network" properties, which would save you couple of nova outputs parses.

edit flag offensive delete link more
3

answered 2015-03-30 04:05:15 -0500

ygoodman gravatar image

Hi Had the same issue:

Problem seemed to be,I copied exactly from the example template into a text file, where the text file formatting disappeared in VIM.

I added the "spaces" and "returns" then ran the following after getting the imageID from "nova image-list":

heat -d stack-create -f test-stack.yml -P "ImageID=f514eeae-9b49-499c-aaa4-911a66f30c61;NetID=$NET_ID" testStack

It then worked.

###################################################################################################

heat_template_version: 2014-10-16
description: A simple server.

parameters:
 ImageID:
  type: string
  description: Image use to boot a server
 NetID:
  type: string
  description: Network ID for the server

resources:
 server:
  type: OS::Nova::Server
  properties:
   image: { get_param: ImageID }
   flavor: m1.tiny
   networks:
   - network: { get_param: NetID }

outputs:
 private_ip:
  description: IP address of the server in the private network
  value: { get_attr: [ server, first_address ] }
edit flag offensive delete link more
0

answered 2015-03-20 03:55:11 -0500

Praveen N gravatar image

Try running the command as below specifying the parameters as per your environment:

heat stack-create StackName -f filename.template -P "image=<ImageName/ID>;public_network=<UUID/Name>;private_network=<UUID/Name>;key=<SSH_key_name>;flavor=<type>;database_name=<db_name>;database_user=<db_user>;database_flavor=<db_flavor>;database_password=<dbPassword>;database_root_password=<db_rootPassword>"

Also ensure there exists all these parameters properly specified with correct indentation in your template(YAML script).

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-03-20 02:38:26 -0500

Seen: 4,059 times

Last updated: Apr 11 '15