[Openstack] Request for help - Heat Auto-scaling

Nadya Privalova nprivalova at mirantis.com
Fri Mar 14 12:45:45 UTC 2014


Hi all,

It would be great to check 'interval' in Ceilometer's pipeline.yaml. Maybe
the problem is in 'insufficient data' state of Ceilometer's alarm. In your
template period: '60' so 'interval' in pipeline.yaml should not be more.
Try 50 instead of 600.
Hope it will help.

Nadya



On Fri, Mar 14, 2014 at 4:05 PM, Eoghan Glynn <eglynn at redhat.com> wrote:

>
> Try changing:
>
>    "repeat_actions": "true"
>
> to:
>
>    "repeat_actions": True
>
> ----- Original Message -----
> > Eoghan, thanks for your reply.
> >
> >
> > I modified the alarm in my template, like this:
> >  67     "CPUAlarmLow": {
> >  68       "Type": "OS::Ceilometer::Alarm",
> >  69       "Properties": {
> >  70         "description": "Scale-down if CPU is less than 20% for 10
> > seconds",
> >  71         "meter_name": "cpu_util",
> >  72         "statistic": "avg",
> >  73         "period": "10",
> >  74         "evaluation_periods": "1",
> >  75         "threshold": "20",
> >  76         "alarm_actions": [ {"Fn::GetAtt": ["ScaleDownPolicy",
> > "AlarmUrl"]} ],
> >  77         "matching_metadata": {"metadata.user_metadata.server_group":
> > "WebServerGroup" },
> >  78         "comparison_operator": "lt",
> >  79         "repeat_actions": "true"
> >  80       }
> >  81     }
> >
> >
> > but there's an error while creating the stack, here is the log:
> >
> >
> > {"error_message": {"debuginfo": null, "faultcode": "Server",
> "faultstring":
> > "repeat_actions: Wrong type. Expected '<type 'bool'>', got '<type
> 'str'>'"}}
> > 160  log_http_response
> > /usr/lib/python2.6/site-packages/ceilometerclient/common/http.py:121
> > 161 2014-03-14 16:55:08.835 2997 WARNING ceilometerclient.common.http [-]
> > Request returned failure status.
> > 162 2014-03-14 16:55:08.835 2997 ERROR heat.engine.resource [-] CREATE :
> > CeilometerAlarm "CPUAlarmHigh"
> >
> >
> >
> >
> > 2014-03-13 19:26 GMT+08:00 Eoghan Glynn <eglynn at redhat.com>:
> >
> > >
> > > What version of Heat are you using?
> > >
> > > The repeat_actions attribute on the alarms was needed to set
> > > explicitly True in Havana (whereas this is now the default).
> > >
> > > This continuous notification is needed for the Heat autoscaling
> > > logic to kick in successfully.
> > >
> > > So if using Havana, please add this setting to CPUAlarmHigh
> > > & CPUAlarmLow.
> > >
> > > Cheers,
> > > Eoghan
> > >
> > >
> > > ----- Original Message -----
> > > > Hello Jay,
> > > > Thanks, here is my template:
> > > >
> > > > {
> > > > "AWSTemplateFormatVersion" : "2014-03-06",
> > > >
> > > > "Parameters" : {
> > > > "InstanceType" : {
> > > > "Description" : "WebServer EC2 instance type",
> > > > "Type" : "String",
> > > > "Default" : "m1.small",
> > > > "ConstraintDescription" : "must be a valid EC2 instance type."
> > > > },
> > > > "WebServerPort" : {
> > > > "Description" : "TCP/IP port of the web server",
> > > > "Type" : "String",
> > > > "Default" : "8888"
> > > > },
> > > > "KeyName" : {
> > > > "Description" : "Name of an existing EC2 KeyPair to enable SSH
> access to
> > > the
> > > > instances",
> > > > "Type" : "String",
> > > > "Default" : "damonkey"
> > > > }
> > > > },
> > > >
> > > > "Resources" : {
> > > > "WebServerGroup" : {
> > > > "Type" : "AWS::AutoScaling::AutoScalingGroup",
> > > > "Properties" : {
> > > > "AvailabilityZones" : { "Fn::GetAZs" : "" },
> > > > "LaunchConfigurationName" : { "Ref" : "LaunchConfig" },
> > > > "MinSize" : "1",
> > > > "MaxSize" : "3"
> > > > }
> > > > },
> > > > "ScaleUpPolicy": {
> > > > "Type": "AWS::AutoScaling::ScalingPolicy",
> > > > "Properties": {
> > > > "AdjustmentType": "ChangeInCapacity",
> > > > "AutoScalingGroupName": "WebServerGroup",
> > > > "Cooldown": "60",
> > > > "ScalingAdjustment": "1"
> > > > }
> > > > },
> > > > "ScaleDownPolicy": {
> > > > "Type": "AWS::AutoScaling::ScalingPolicy",
> > > > "Properties": {
> > > > "AdjustmentType": "ChangeInCapacity",
> > > > "AutoScalingGroupName": "WebServerGroup",
> > > > "Cooldown": "60",
> > > > "ScalingAdjustment": "-1"
> > > > }
> > > > },
> > > > "CPUAlarmHigh": {
> > > > "Type": "OS::Ceilometer::Alarm",
> > > > "Properties": {
> > > > "description": "Scale-up if CPU is greater than 90% for 10 seconds",
> > > > "meter_name": "cpu_util",
> > > > "statistic": "avg",
> > > > "period": "10",
> > > > "evaluation_periods": "1",
> > > > "threshold": "90",
> > > > "alarm_actions": [ {"Fn::GetAtt": ["ScaleUpPolicy", "AlarmUrl"]} ],
> > > > "matching_metadata": {"metadata.user_metadata.server_group":
> > > "WebServerGroup"
> > > > },
> > > > "comparison_operator": "gt"
> > > > }
> > > > },
> > > > "CPUAlarmLow": {
> > > > "Type": "OS::Ceilometer::Alarm",
> > > > "Properties": {
> > > > "description": "Scale-down if CPU is less than 50% for 10 seconds",
> > > > "meter_name": "cpu_util",
> > > > "statistic": "avg",
> > > > "period": "10",
> > > > "evaluation_periods": "1",
> > > > "threshold": "50",
> > > > "alarm_actions": [ {"Fn::GetAtt": ["ScaleDownPolicy", "AlarmUrl"]} ],
> > > > "matching_metadata": {"metadata.user_metadata.server_group":
> > > "WebServerGroup"
> > > > },
> > > > "comparison_operator": "lt"
> > > > }
> > > > },
> > > > "LaunchConfig" : {
> > > > "Type" : "AWS::AutoScaling::LaunchConfiguration",
> > > > "Properties" : {
> > > > "KeyName" : { "Ref" : "KeyName" },
> > > > "ImageId" : "CirrOS 0.3.1",
> > > > "UserData" : { "Fn::Base64" : { "Ref" : "WebServerPort" }},
> > > > "SecurityGroups" : [ "default" ],
> > > > "InstanceType" : { "Ref" : "InstanceType" }
> > > > }
> > > > }
> > > > }
> > > >
> > > > }
> > > >
> > > >
> > > > 2014-03-13 13:29 GMT+08:00 Micheal < pannov.tsth at gmail.com > :
> > > >
> > > >
> > > >
> > > > Does Heat support auto-scaling in Havana ? The cloudwatch seems to be
> > > > deprecated, and the new mechanism with ceilometer seems not working
> > > either.
> > > > I can create stack successfully, but the stack with
> > > > AWS::AutoScaling::AutoScalingGroup can not auto-scaling as expected.
> > > > All replies appreciated, thanks!
> > > >
> > > >
> > > > _______________________________________________
> > > > Mailing list:
> > > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> > > > Post to     : openstack at lists.openstack.org
> > > > Unsubscribe :
> > > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> > > >
> > >
> >
>
> _______________________________________________
> Mailing list:
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> Post to     : openstack at lists.openstack.org
> Unsubscribe :
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20140314/890a4037/attachment.html>


More information about the Openstack mailing list