adding index_var to AutoScalingGroup

Bug #1500475 reported by Peng Wu
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Won't Fix
Undecided
Unassigned
heat (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

This is a follow up to question https://answers.launchpad.net/ubuntu/+source/heat/+question/271809 , asking for the plan on adding index_var to AutoScalingGroup.

I already saw related change commit:
https://review.openstack.org/gitweb?p=openstack%2Fheat.git;a=commitdiff;h=84e0d64d578ad302ccca2db2ec45ff336a6a0dc7
Two questions from this:
Which OpenStack release will include the above change?
Can above change to back-ported to OpenStack Kilo installations without other changes?

The above change is not visible in an OpenStack Kilo insallation.

What we need is to have the following templates to work this way: the instances spawn by the autoscaling group will have names like server0, server1, etc. where "server" is a server name stem specified on the name property and %index% is mimicking the default index_var of OS::Heat::ResourceGroup which is expected to be provided by the OS::Heat::AutoScalingGroup.

Below are sample templates adopted from http://www.gossamer-threads.com/lists/openstack/dev/48054#48054 -- corrections welcome because we obviously have not tested them:

hosts:
 depends_on: external_router_interface
 type: OS::Heat::AutoScalingGroup
 properties:
 desired_capacity: {get_param: node_count}
 cooldown: 60
 min_size: 0
 max_size: 100
 resource:
 type: host.yaml
 properties:
 image: {get_param: server_image}
 flavor: {get_param: flavor}
 key_name: {get_param: ssh_key_name}
 external_network: {get_param: external_network}
 fixed_network: {get_resource: fixed_network}
 fixed_subnet: {get_resource: fixed_subnet}

With this being called as host.yaml:-
resources:
 server:
  type: OS::Nova::Server
  properties:
  name: server%index%
  image: {get_param: image}
  flavor: {get_param: flavor}
  key_name: {get_param: key_name}
  networks:
  - port: {get_resource: port}
  admin_user: cloud-user
  user_data_format: RAW

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in heat (Ubuntu):
status: New → Confirmed
Revision history for this message
Chuck Short (zulcss) wrote :

This should be fixed in the latest release.

Changed in heat (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Thiago Martins (martinx) wrote :

Is it available on Newton? If yes, any chances to backport it to Mitaka?

Revision history for this message
Corey Bryant (corey.bryant) wrote :

Changing status back to New and targeting bug toward upstream heat as it appears this isn't fixed. The commit referenced in the Bug Description above was abandoned:

https://review.openstack.org/#/c/194054/

Changed in heat (Ubuntu):
status: Fix Released → New
Revision history for this message
Rabi Mishra (rabi) wrote :

We don't plan to add resource index (index_var) to ASG. Autoscaling would not work well with resource indexing(i.e, when we remove the oldest resource in the group when scaling down).That's the reason the above patch has been abandoned(you can check the discussion in that patch for the reasons).

Changed in heat:
status: New → Won't Fix
Changed in heat (Ubuntu):
status: New → Won't Fix
Revision history for this message
Thiago Martins (martinx) wrote :

If I remember well, AutoScaling on Amazon EC2 works very well with index.

Why OpenStack can't do it?

Revision history for this message
Amit Bhardwaj (bhardwajamit23) wrote :

can anyone suggest any work around for this problem?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.