In this test we went from application version ABC
to 500
in the stacks:
BasicAsgRollingUpdate
(CFN stackplayground-CODE-basic-asg-rolling-update
)NoDesiredAsgRollingUpdate
(CFN stackplayground-CODE-no-desired-asg-rolling-update
)
The ASG should have an explicit desired capacity.
If the desired capacity is not explicitly provided, deploying a failing healthcheck results in an over-capacity service.
-
The CFN stacks
playground-CODE-basic-asg-rolling-update
andplayground-CODE-no-desired-asg-rolling-update
started updating.First:
Rolling update initiated. Terminating 5 obsolete instance(s) in batches of 5, while keeping at least 5 instance(s) in service. Waiting on resource signals with a timeout of PT5M when new instances are added to the autoscaling group.
Then the ASG capacity is updated:
Temporarily setting autoscaling group MinSize and DesiredCapacity to 10.
-
No successful signals are received and CloudFormation moves to
UPDATE_FAILED
, thenUPDATE_ROLLBACK_IN_PROGRESS
.- In the
playground-CODE-basic-asg-rolling-update
stack, the ASG capacity rolls back to Min=5, Desired=5, Max=10. - In the
playground-CODE-no-desired-asg-rolling-update
stack, the ASG capacity rolls back to Min=5, Max=10. The Desired is not rolled back, remaining at 10 from step 2.
- In the
-
Once the CFN stacks enter
UPDATE_ROLLBACK_COMPLETE
, the deployment has finished.- In the
playground-CODE-basic-asg-rolling-update
stack, there are 5 instances running artifactABC
. - In the
playground-CODE-no-desired-asg-rolling-update
stack, there are 10 instances running artifactABC
. This is over-capacity.
This can be seen on the dashboard.
- In the
-
We receive a failed deployment message, and create a fix. Deploying it succeeds, However, the ASG without an explicit desired capacity remains over-capacity with 10 in-service instances.
This can be seen on the dashboard.
The desired needs to be manually reduced.