Skip to content
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

Consider only the desired instances for total Instances #323

Open
shreyas-badiger opened this issue Mar 23, 2022 · 0 comments
Open

Consider only the desired instances for total Instances #323

shreyas-badiger opened this issue Mar 23, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@shreyas-badiger
Copy link
Collaborator

totalNodes = len(scalingGroup.Instances)

totalNodes = len(scalingGroup.Instances)
		targets    = make([]*autoscaling.Instance, 0)
	)
	unavailableInt := CalculateMaxUnavailable(batchSize, totalNodes)

If upgrade-manager crashes in between and picks up an existing rolling upgrade CR, there could be replacement instances considered in the len(scalingGroup.Instances). For example, if an ASG has 3 instances and the upgrade-manager crashed after setting all the instances to standBy, when the upgrade-manager next picks the CR, will have the totalNodes as 6 and that is incorrect.

@shreyas-badiger shreyas-badiger added the bug Something isn't working label Mar 23, 2022
@shreyas-badiger shreyas-badiger self-assigned this Mar 23, 2022
@shreyas-badiger shreyas-badiger changed the title Consider inService instances only for totalInstances Consider desired instances only for totalInstances May 17, 2022
@shreyas-badiger shreyas-badiger changed the title Consider desired instances only for totalInstances Consider only the desired instances for totalInstances May 17, 2022
@shreyas-badiger shreyas-badiger changed the title Consider only the desired instances for totalInstances Consider only the desired instances for total Instances May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant