neutron error while launching with heat
I get the following error while using heat to provision a VM from a template:
JSON response :
{"stacks": [{"description": "Generated template", "links": [{"href": "http://9.148.45.17:8004/v1/5eae73fa860c4291bab537f5e45e849b/stacks/stack/995f363c-00d4-49c6-9907-aca1470d28ea", "rel": "self"}], "stack_status_reason": "Resource CREATE failed: HT-15306C5 NeutronClientException: 503-{u'NeutronError': {u'message': u'Unable to create the network. No tenant network is available for allocation.', u'type': u'NoNetworkAvailable', u'detail': u''}}", "stack_name": "stack", "creation_time": "2014-08-05T13:51:07Z", "updated_time": null, "stack_status": "CREATE_FAILED", "id": "995f363c-00d4-49c6-9907-aca1470d28ea"},
The neutron flat network exists at the target openstack when I use the : heat -f <template file=""> stack-create command . Even if I erase the flat network from the target openstack system I get the same error . If I drop the network sections from the template the heat template gets applied ok at the target Openstack and IP is assigned from the existing flat network there to the launched VM .
The template was generated on one openstack then used on another target openstack with the network IP allocation ranges modified
attached below the heat template used :
########## Heat Template ##########
description: Generated template
heat_template_version: 2013-05-23
parameters:
server_0_flavor:
default: m1.tiny
description: Flavor to use for server server_0
type: string
server_0_image:
default: e35d4491-fd0d-4241-8524-8703c27608ff
description: Image to use to boot server server_0
type: string
resources:
network_0:
properties:
admin_state_up: true
name: public_net
shared: false
tenant_id: 5eae73fa860c4291bab537f5e45e849b
type: OS::Neutron::Net
server_0:
properties:
block_device_mapping:
- device_name: /dev/vdb
volume_id:
get_resource: volume_0
diskConfig: AUTO
flavor:
get_param: server_0_flavor
image:
get_param: server_0_image
name: test1
networks:
- network:
get_resource: network_0
type: OS::Nova::Server
subnet_0:
properties:
allocation_pools:
- "end": 9.148.45.94
"start": 9.148.45.81
cidr: 9.148.45.0/24
dns_nameservers:
- 9.148.5.22
enable_dhcp: true
host_routes: []
ip_version: 4
name: public_subnet
tenant_id: 5eae73fa860c4291bab537f5e45e849b
network_id:
get_resource: network_0
type: OS::Neutron::Subnet
volume_0:
properties:
metadata:
attached_mode: rw
readonly: 'False'
name: my_vol
size: 1
type: OS::Cinder::Volume
Could you edit the question and convert the Template to a code block with CRLF.. currently impossible to read it.
The ref to network_0 is in server_0 using the clause :
server_o:
Will that create a new net and subnet or just directs the launched VM to allocate IP from such existing net ? In fact even if I erased the existing net at the target openstack and applied the heat template
I got the same error . so the template defined network was not generated from scratch