Ask Your Question
1

Heat autoscaling template triggers alarm but new instance is not created

asked 2014-06-27 07:09:18 -0500

Calvin gravatar image

updated 2014-06-27 16:25:16 -0500

smaffulli gravatar image

Hi,

I'm working on autoscaling with Heat, but it seems not work. Please see my template below.

Since it's just a test, I set cpu threshold to 1 and 2 just for triggering the alarm. I can see cpu-high alarm has been triggered, but I cannot see new instance of "asm" created.

My questions: 1) My monitor interval is only 10 seconds, do I need to change interval in /etc/ceilometer/pipeline.yaml? Since alarm has been triggered, I guess not. 2) What logs should I look or provide here for troubleshooting?

I'm using RDO Icehouse version.

Any advice is appreciated! --Calvin

ceilometer alarm-list
+--------------------------------------+-----------------------------------+-------+---------+------------+-------------------------------+------------------+
| Alarm ID                             | Name                              | State | Enabled | Continuous | Alarm condition               | Time constraints |
+--------------------------------------+-----------------------------------+-------+---------+------------+-------------------------------+------------------+
| 740371e2-53d0-47d4-89db-3961f7280b9a | tsoft-cpu_alarm_high-jo4hkggnuf77 | alarm | True    | False      | cpu_util > 2.0 during 1 x 10s | None             |
| bb72489a-e496-41ec-a29d-883662a40da9 | tsoft-cpu_alarm_low-hooflstwjilb  | ok    | True    | False      | cpu_util < 1.0 during 1 x 10s | None             |
+--------------------------------------+-----------------------------------+-------+---------+------------+-------------------------------+------------------+


heat_template_version: 2013-05-23

parameters:
  min_asm:
    type: number
    default: 1
  max_asm:
    type: number
    default: 8
  cooldown_seconds:
    type: number
    default: 30
  cpu_monitor_seconds:
    type: number
    default: 10
  cpu_high_threshold:
    type: number
    default: 2
  cpu_low_threshold:
    type: number
    default: 1

resources:

  asm_group:
    type: OS::Heat::AutoScalingGroup
    properties:
      min_size: {get_param: min_asm}
      max_size: {get_param: max_asm}
      resource:
        type: asm.yaml
        properties:
          #omitted
          metadata: {"metering.stack": {get_param: "OS::stack_id"}}

  scaleup_policy:
    type: OS::Heat::ScalingPolicy
    properties:
      adjustment_type: change_in_capacity
      auto_scaling_group_id: {get_resource: asm_group}
      cooldown: {get_param: cooldown_seconds}
      scaling_adjustment: 1
  scaledown_policy:
    type: OS::Heat::ScalingPolicy
    properties:
      adjustment_type: change_in_capacity
      auto_scaling_group_id: {get_resource: asm_group}
      cooldown: {get_param: cooldown_seconds}
      scaling_adjustment: -1
  cpu_alarm_high:
    type: OS::Ceilometer::Alarm
    properties:
      meter_name: cpu_util
      statistic: avg
      period: {get_param: cpu_monitor_seconds}
      evaluation_periods: 1
      threshold: {get_param: cpu_high_threshold}
      alarm_actions:
        - {get_attr: [scaleup_policy, alarm_url]}
      matching_metadata: {'metadata.user_metadata.stack': {get_param: "OS::stack_id"}}
      comparison_operator: gt
  cpu_alarm_low:
    type: OS::Ceilometer::Alarm
    properties:
      meter_name: cpu_util
      statistic: avg
      period: {get_param: cpu_monitor_seconds}
      evaluation_periods: 1
      threshold: {get_param: cpu_low_threshold}
      alarm_actions:
        - {get_attr: [scaledown_policy, alarm_url]}
      matching_metadata: {'metadata.user_metadata.stack': {get_param: "OS::stack_id"}}
      comparison_operator: lt
edit retag flag offensive close merge delete

Comments

occasionally seeing this as well. but when I do a 'nova show', then the instance is created or deleted. So I'm suspecting some message queue problems causing this unstable.

Qiming gravatar imageQiming ( 2014-06-27 10:20:53 -0500 )edit

I never saw a new instance on dashboard or "nova list", after a long time trying. just want to know how to locate the issue.

Calvin gravatar imageCalvin ( 2014-06-27 19:16:10 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
2

answered 2014-06-27 23:34:57 -0500

Calvin gravatar image

The problem has been solved. the alarm_url attribute got from scaleup_policy and scaledown_policy is not working because I didn't install heat-api-cfn server. See this similar post: https://ask.openstack.org/en/question...

After installing openstack-heat-api-cfn and starting the service, everything is working like a charm!

edit flag offensive delete link more

Comments

Thanks for the update.

Qiming gravatar imageQiming ( 2014-06-28 04:45:28 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-06-27 07:09:18 -0500

Seen: 1,004 times

Last updated: Jun 27 '14