Ask Your Question
0

heat stack creation for autoscaling fails with StackValidation error

asked 2014-10-01 10:15:46 -0500

geeth m gravatar image

hi,

I am using Icehouse Release on Redhat 7 and trying the autoscaling feature using heat stack.

But the heat stack creation fails with the StackValidation property error ..... not a list

2014-10-01 00:21:25.518 4853 INFO heat.engine.resource [-] creating CeilometerAlarm "cpu_alarm_high" Stack "teststack" [a24239aa-f6b1-46ab-99a4-d32a6e61ed79]
2014-10-01 00:21:25.562 4853 ERROR heat.engine.resource [-] CREATE : CeilometerAlarm "cpu_alarm_high" Stack "teststack" [a24239aa-f6b1-46ab-99a4-d32a6e61ed79]
2014-10-01 00:21:25.562 4853 TRACE heat.engine.resource Traceback (most recent call last):
2014-10-01 00:21:25.562 4853 TRACE heat.engine.resource   File "/usr/lib/python2.7/site-packages/heat/engine/resource.py", line 436, in _do_action
2014-10-01 00:21:25.562 4853 TRACE heat.engine.resource     pre_func()
2014-10-01 00:21:25.562 4853 TRACE heat.engine.resource   File "/usr/lib/python2.7/site-packages/heat/engine/properties.py", line 315, in validate
2014-10-01 00:21:25.562 4853 TRACE heat.engine.resource     raise exception.StackValidationFailed(message=msg)
2014-10-01 00:21:25.562 4853 TRACE heat.engine.resource StackValidationFailed: Property error : cpu_alarm_high: alarm_actions "u'http://10.3.10.14:8000/v1/signal/arn%3Aopenstack%3Aheat%3A%3A39c14a6cec2d44829cfe81a074d28c9b%3Astacks%2Fteststack%2Fa24239aa-f6b1-46ab-99a4-d32a6e61ed79%2Fresources%2Fweb_server_scaleup_policy?Timestamp=2014-10-01T07%3A21%3A24Z&SignatureMethod=HmacSHA256&AWSAccessKeyId=178dd451bf6f49efbd95805ddefe9d40&SignatureVersion=2&Signature=vYv2dbrpYpoh%2FWXtcY2jpamNZHtNLUu94dq%2BnO1na0I%3D'" is not a list
2014-10-01 00:21:25.562 4853 TRACE heat.engine.resource
2014-10-01 00:21:25.601 4853 WARNING heat.engine.service [-] Stack create failed, status FAILED

Below is part of the heat template (taken from the autoscaling.yaml available in github)

  web_server_scaleup_policy:
    type: OS::Heat::ScalingPolicy
    properties:
      adjustment_type: change_in_capacity
      auto_scaling_group_id: { get_resource: web_server_group }
      cooldown: 60
      scaling_adjustment: 1

  web_server_scaledown_policy:
    type: OS::Heat::ScalingPolicy
    properties:
      adjustment_type: change_in_capacity
      auto_scaling_group_id: { get_resource: web_server_group }
      cooldown: 60
      scaling_adjustment: -1

  cpu_alarm_high:
    type: OS::Ceilometer::Alarm
    properties:
      description: Scale-up if the average CPU > 50% for 1 minute
      meter_name: cpu_util
      statistic: avg
      period: 600
      evaluation_periods: 1
      threshold: 50
      alarm_actions: { get_attr: [web_server_scaleup_policy, alarm_url] }
      matching_metadata: { 'metadata.user_metadata.stack': { get_param: "OS::stack_id" } }
      comparison_operator: gt

When i remove the alarm_actions line from the template file , the heat stack gets created successfully. I am not able to figure out why the stack validation fails for the alarm_url . Am i missing some configuration ?

Thanks geeth

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2014-10-01 10:24:20 -0500

larsks gravatar image

I think the error message is reasonably clear. It says:

StackValidationFailed: Property error : cpu_alarm_high: alarm_actions ... is not a list

As documented here, the alarm_actions property must be a list (because there may be multiple actions). So modify your template to make that a list:

  cpu_alarm_high:
    type: OS::Ceilometer::Alarm
    properties:
      description: Scale-up if the average CPU > 50% for 1 minute
      meter_name: cpu_util
      statistic: avg
      period: 600
      evaluation_periods: 1
      threshold: 50
      alarm_actions: 
        - { get_attr: [web_server_scaleup_policy, alarm_url] }
      matching_metadata: { 'metadata.user_metadata.stack': { get_param: "OS::stack_id" } }
      comparison_operator: gt
edit flag offensive delete link more

Comments

Please consider marking this answer as accepted by clicking the checkbox to the left of the answer. This helps indicate to others that the question has been answered.

larsks gravatar imagelarsks ( 2014-10-01 13:55:05 -0500 )edit
1

answered 2014-10-01 11:49:39 -0500

geeth m gravatar image

Thank you for pointing out the error. That solved the issue i was facing

edit flag offensive delete link more

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

1 follower

Stats

Asked: 2014-10-01 10:12:35 -0500

Seen: 1,174 times

Last updated: Oct 01 '14