[Openstack] heat nested stack -icehouse, nova-network, centos, ResourceGroup

kevin parrikar kevin.parker092 at gmail.com
Sat Sep 19 16:35:31 UTC 2015


Hello All,
                i am trying to create 3 instances,with cinder volume
attached using "OS::Heat::ResourceGroup",but it returns

"ERROR: Unknown resource Type : cinderattached.yml". Can any one please
help me in this


heat_template_version: 2013-05-23

resources:
  rg:
    type: OS::Heat::ResourceGroup
    properties:
      count: 3
      resource_def: {type: cinderattached.yml}


cinderattached.yml

heat_template_version: 2013-05-23

parameters:
  key_name:
    type: string
    default: key
  instance_type:
    type: string
    default: m1.small
  image_id:
    type: string
    default: Centos 6.6
#  pvt_network:
#    type: string
#    default: tester
  availability_zone:
    type: string
    default: indexer
  volume_type:
    type: string
    description: ceph or ssd
    default: ssd
  volume_size:
    type: number
    default: 1


resources:
  volume:
    type: OS::Cinder::Volume
    properties:
      size: { get_param: volume_size }
      description: Volume for stack
      volume_type: { get_param: volume_type }

  volume_attachment:
    type: OS::Cinder::VolumeAttachment
    properties:
      volume_id: { get_resource: volume }
      instance_uuid: { get_resource: instance }

  instance:
    type: OS::Nova::Server
    properties:
      image: { get_param: image_id }
      flavor: { get_param: instance_type }
      key_name: { get_param: key_name }

Debug Log:

DEBUG (session) REQ: curl -i -X POST
http://controller:8004/v1/bef416f4a12841d3a88eb1028a03aec2/stacks -H
"Accept: application/json" -H "X-Auth-Token:
MIIMlAYJKoZIhvcNAQcCoIIMhTCCDIECAQExCTAHBgUrDgMCGjCCCuoGCSqGSIb3DQEHAaCCCtsEggrXeyJhY2Nlc3MiOiB7InRva2VuIjogeyJpc3N1ZWRfYXQiOiAiMjAxNS0wOS0xOVQxNToyNDozMS45MDIxOTciLCAiZXhwaXJlcyI6ICIyMDE1LTA5LTE5VDE2OjI0OjMxWiIsICJpZCI6ICJwbGFjZWhvbGRlciIsICJ0ZW5hbnQiOiB7ImRlc2NyaXB0aW9uIjogIiIsICJlbmFibGVkIjogdHJ1ZSwgImlkIjogImJlZjQxNmY0YTEyODQxZ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jogW10sICJpZCI6ICI0NWZkNDhjMTA5YWE0NTI4YmRkYWRmZTA1OGZlNjliNyIsICJyb2xlcyI6IFt7Im5hbWUiOiAiX21lbWJlcl8ifV0sICJuYW1lIjogInRlc3RlciJ9LCAibWV0YWRhdGEiOiB7ImlzX2FkbWluIjogMCwgInJvbGVzIjogWyI5ZmUyZmY5ZWU0Mzg0YjE4OTRhOTA4NzhkM2U5MmJhYiJdfX19MYIBgTCCAX0CAQEwXDBXMQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVW5zZXQxDjAMBgNVBAcMBVVuc2V0MQ4wDAYDVQQKDAVVbnNldDEYMBYGA1UEAwwPd3d3LmV4YW1wbGUuY29tAgEBMAcGBSsOAwIaMA0GCSqGSIb3DQEBAQUABIIBAJ0eAnb1-Y+OaHMAnWXJAu7zu--UdK5fek43Hku7zTYUBfS-yn2fiiQtcwp0TxYzg48q+QhIA3plTO1kJnbFWQSGgeNvyyGLLwXbKmKgsi9POkZKZ8zwVvFPnlwZX9gnrjTgbpFXisk66fC53uEkaHPHjO8YVsy8p3DILlLR-enCkpU+VglKspOht5lm0mzNnY5bbXDHc6bofa0WO0W3ScNg+o+w9rqxTXwT6TZ9ux7xN7i4dX01QIbm1KNU041nRA6BErGPZGrCwQFsnPkYxDnWrW7SAaETHu1D5gOjYgtZ4CBUDR4vop7UaKDYpyqGOEDGzo5KEbBfuZtJV+ZqnF8="
-H "X-Auth-Key: tester" -H "X-Auth-User: tester" -H "User-Agent:
python-heatclient" -H "Content-Type: application/json" -H "X-Auth-Url:
http://10.99.10.124:5000/v2.0" -d '{"files": {}, "disable_rollback": true,
"parameters": {}, "stack_name": "multins", "environment": {}, "template":
{"heat_template_version": "2013-05-23", "resources": {"rg": {"type":
"OS::Heat::ResourceGroup", "properties": {"count": 3, "resource_def":
{"type": "cinder-attached.yml"}}}}}}'
DEBUG (session) RESP: [400] {'date': 'Sat, 19 Sep 2015 15:24:32 GMT',
'content-length': '274', 'content-type': 'application/json; charset=UTF-8'}
RESP BODY: {"explanation": "The server could not comply with the request
since it is either malformed or otherwise incorrect.", "code": 400,
"error": {"message": "Unknown resource Type : cinder-attached.yml",
"traceback": null, "type": "StackValidationFailed"}, "title": "Bad Request"}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20150919/2b4a5405/attachment.html>


More information about the Openstack mailing list