-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ecs] Step Scaling policy does not create all steps #10141
Comments
Even worse I added in the 65 step twice to test, and now it works. This is definitely a bug construct.scaling.scaleOnMetric('scale-up-policy', {
scalingSteps: [
{
lower: 65,
change: +2,
},
{
lower: 65, // Duplicate of above
change: +2,
},
{
lower: 85,
change: +3,
},
],
metric: construct.service.metricCpuUtilization({
statistic: 'Maximum',
period: cdk.Duration.minutes(1),
}),
cooldown: cdk.Duration.minutes(2),
}); |
Same issue in with the Python version; it's a very annoying bug. |
@olivier-schmitt try this
|
Hi @kyler-hyuna , What happens when you use the aws cli to describe the service/autoscaling policy? |
Hey @SoManyHs The code: scaleOnMetric('scale-up-policy', {
scalingSteps: [
{
lower: 40,
change: +3,
},
{
// FIXME: https://github.com/aws/aws-cdk/issues/10141
lower: 40,
change: +3,
},
{
lower: 60,
change: +5,
},
],
metric: construct.service.metricCpuUtilization({
statistic: 'Maximum',
period: cdk.Duration.minutes(1),
}),
cooldown: cdk.Duration.minutes(2),
}); The describe (just kept the scaling part of it): "StepScalingPolicyConfiguration": {
"AdjustmentType": "ChangeInCapacity",
"StepAdjustments": [
{
"MetricIntervalLowerBound": 0.0,
"MetricIntervalUpperBound": 20.0,
"ScalingAdjustment": 3
},
{
"MetricIntervalLowerBound": 20.0,
"ScalingAdjustment": 5
}
],
"Cooldown": 120,
"MetricAggregationType": "Maximum"
} |
We are seeing similar unexpected behaviors. I'm using the .netcore CDK version 1.76.0, and nodejs v10.19.0 The configuration
Results in the following:
Wheras I think is should be:
|
Any updates? |
Hi @SoManyHs |
…oes not start at 0 (#15345) Before this fix, the first scaling step would be ignored whenever its lower bound was greater than zero (see linked issue). Now, instead of *replacing* the first interval with a "dummy" one, we *prepend* the list of intervals. This behavior complements what was already implemented in case the last interval's upper bound was not Infinity: a dummy one was appended. This fixes #10141 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
Thanks for fixing this @ruancomelli 🎉 |
…oes not start at 0 (aws#15345) Before this fix, the first scaling step would be ignored whenever its lower bound was greater than zero (see linked issue). Now, instead of *replacing* the first interval with a "dummy" one, we *prepend* the list of intervals. This behavior complements what was already implemented in case the last interval's upper bound was not Infinity: a dummy one was appended. This fixes aws#10141 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
I'm using the
scaleOnMetric
method of the FargateService construct. My requirements need 2 policies.However it never creates the 65 step. It only creates >85 step.
Reproduction Steps
What did you expect to happen?
I should have 2 alarms created with the actions:
low alarm
high alarm
What actually happened?
Environment
Other
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: