eks-rolling-update
eks-rolling-update copied to clipboard
Ambiguous check of running instances
https://github.com/hellofresh/eks-rolling-update/blob/70306efbf8d9a6c587d8f82af60d995827122537/eksrollup/lib/aws.py#L112-L126
Causes a failure to run when you have more running instances than desired:
00:04:19.030 2022-01-25 16:24:43,568 INFO Checking asg golf-dev-mgmt-worker-node-0-20191108085402700900000002 instance count...
00:04:19.030 2022-01-25 16:24:43,701 INFO Asg golf-dev-mgmt-worker-node-0-20191108085402700900000002 does not have enough running instances to proceed
00:04:19.030 2022-01-25 16:24:43,701 INFO Actual instances: 7 Desired instances: 6
Im curious how did you get in the scenario where you have more instances than desired? The change is easy enough to make but Im concerned if saying throw an error only if actual instances is less than desired capacity because 1 maybe the scaling is not working properly and 2 maybe there is left over cordoned instances that have not yet been removing being considered.
Also the description of the function does say matches
""" Checks that the number of EC2 instances in an ASG matches desired capacity """