Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

heat stack creation for autoscaling fails with StackValidation error

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