Ask Your Question
0

%index% in resource group not returning index number

asked 2014-10-28 12:15:34 -0500

randomdba gravatar image

updated 2014-11-01 13:17:02 -0500

I'm not sure if I missed something but when creating a group of servers via the heat command line using the following template i get multiple servers with the name ob-devp-app-%index% instead of ob-devp-app1,ob-devp-app2,etc.....

heat_template_version: 2013-05-23

description: Template to deploy a number of servers

parameters:
  pdc_app_server_count:
    type: number
  pdc_app_server_image:
    type: string
  pdc_app_server_flavour:
    type: string

resources:
  pdc_app_servers:
    type: OS::Heat::ResourceGroup
    properties:
      count: { get_param: pdc_app_server_count }
      resource_def:
        type: OS::Nova::Server
        properties:
          name: ob-devp-app-%index%
          image: { get_param: pdc_app_server_image }
          flavor: { get_param: pdc_app_server_flavour }
          networks:
            - network: "fixed"

I've tried various different formats for the name property(enclosed in ",using _ as the sperator) but nothing seems to be working. reading the template guide I can't see anything obviously wrong with the template so I'm a bit stuck now. http://docs.openstack.org/developer/heat/template_guide/openstack.html#OS::Heat::ResourceGroup (http://docs.openstack.org/developer/h...)

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2014-11-17 16:40:13 -0500

asalkeld gravatar image

Hi

That seems strange as we have tests that prove that this works: https://github.com/openstack/heat/blo...

What version of heat do you have? Here is the commit that added that feature: https://github.com/openstack/heat/com...

-Angus

edit flag offensive delete link more
0

answered 2014-11-18 03:45:25 -0500

randomdba gravatar image

Thanks,

Looks like we have an older version and I will have to harass the vendor and our internal support for an update.

Version info:-

zypper info openstack-heat
Loading repository data...
Reading installed packages...

Information for package openstack-heat:

Repository: SUSE-Cloud-4-Pool
Name: openstack-heat
Version: 2014.1.2.dev16.gbb7cc36-0.7.2
Arch: x86_64
Vendor: SUSE LINUX Products GmbH, Nuernberg, Germany
Support Level: Level 3
Installed: Yes
Status: up-to-date
Installed Size: 76.0 KiB
edit flag offensive delete link more

Comments

Going to bring this back to life. I'm having the same issue - my platform is on Icehouse and I'm using 2013--05-23 templates. Does that mean that I am unable to use %index%? If I understand the docs correctly, 2014-10-16 was introduced in Juno.

chriscowley gravatar imagechriscowley ( 2015-07-27 07:07:21 -0500 )edit

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

3 followers

Stats

Asked: 2014-10-28 12:15:34 -0500

Seen: 2,248 times

Last updated: Nov 18 '14