Ask Your Question

why heatautoscaling create two instances?

asked 2015-02-08 12:32:20 -0600

chitranshi-shubham gravatar image


I am using this file (autoscaling.yaml) to create a demo setup. In my understanding the AutoscalingGroup calls lb_server.yaml to create instances, and so initially it will create 1 instance. But when I create the stack, it creates two instances, although

  1. in the stack topology view I can see only one instance (Nova::Server)(Horizon)
  2. $ heat resource-list <stackid> -gives one instance only

so my question is :-

  1. why does heatautoscaling creates two instances ?
  2. how can I know which instance is created by heat stack out of all the instances shown by Nova ?
edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted

answered 2015-03-14 06:36:15 -0600

Qiming gravatar image

So, this is not about heat creating two instances. It is about how to tell which nova server is created by Heat. If that is the question, you can try this:

1) heat resource-list <your-stack-name> find out the physical resource id of your autoscalinggroup resource, say <xxx-yyy>

2) heat resource-list <xxx-yyy> now the physical_resource_id shows the Nova server IDs in that autoscaling-group

Or, you can do one command: heat resource-list -n 3 <your-stack-name>. Your Nova server in included in the resulted list.

edit flag offensive delete link more

answered 2015-03-15 04:19:24 -0600

ccebrian gravatar image

I see that in your template you do not specify the INITIAL size of the autoscaling group. In my opinion you should state it (else, it could takes an arbitrary or random value, for example "2"), i.e. something like:

desired_capacity: 1 (or the number you really want to start with).

Note: of course, as you know, this is the initial number of VM to be instantiated, after this number can go up or down depending in the load For TESTING purpose (I mean to see how it works) let me suggest you too to use a wider range for VM possible variation, for example: asg: type: OS::Heat::AutoScalingGroup properties: min_size: 1 max_size: 5 desired_capacity: 3

Besides, please also note than according to your threshold definition for the AUTOMATIC scaling (“up” or “down”) it won't happen anything in the range between 15% and 50% of the %cpu_util. Once again, for TESTING purposes, it could be a good idea to change those thresholds, and so forth.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2015-02-08 12:32:20 -0600

Seen: 230 times

Last updated: Mar 15 '15