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

Mitigate unavailability of instance type in AZ #92

Closed
anbrsap opened this issue Aug 3, 2021 · 5 comments
Closed

Mitigate unavailability of instance type in AZ #92

anbrsap opened this issue Aug 3, 2021 · 5 comments
Labels
kind/discussion Discussion (enaging others in deciding about multiple options) kind/enhancement Enhancement, improvement, extension lifecycle/icebox Temporarily on hold (will not age; may have dependencies, lack priority, miss feedback, etc.) status/closed Issue is closed (either delivered or triaged)

Comments

@anbrsap
Copy link

anbrsap commented Aug 3, 2021

What would you like to be added:

The cluster autoscaler should mitigate the unavailability of instances of certain types in an availability zone (AZ).

Currently Gardener just reports an error in such case and retries:

Action required

There is a problem with your secret secret1: The underlying infrastructure provider proclaimed that it does not have enough resources to fulfill your request at this point in time. You might want to wait or change your shoot configuration.

Worker extension (shoot--group1--cluster1/cluster1) reports failing health check: machine "shoot--group1--cluster1-worker1-z1-11111-11111" failed: Cloud provider message - machine codes error: code = [Internal] message = [InsufficientInstanceCapacity: We currently do not have sufficient m5zn.metal capacity in the Availability Zone you requested (eu-central-1a). Our system will be working on provisioning additional capacity. You can currently get m5zn.metal capacity by not specifying an Availability Zone in your request or choosing eu-central-1b.
status code: 500, request id: edb75363-7217-4f15-912b-5b11bcd89a85].

I propose to add the following two fallback mechanisms applied in the given order:

  • Try to create a new instance in another AZ if the respective worker group has been configured for more than one AZ.
  • Try to get an instance of a fallback instance type (which may be more expensive). Fallback instance types should be configurable for worker groups.

Why is this needed:

The current mitigation of retrying, i.e. waiting for the cloud provider to make instances available, leads to possibly very long delays in node provisioning, with the consequence that pods remain unscheduled for that time. Depending on the type of workload this could lead to SLA violations.

Mitigating the problem by over-provisioning cluster nodes, for instance via low-priority spacer pods, is possible but increases costs. In particular for low-utilized clusters the extra costs can be significant, especially when expensive instance types like AWS metal instances are required.

@anbrsap anbrsap added the kind/enhancement Enhancement, improvement, extension label Aug 3, 2021
@gardener-robot gardener-robot added the lifecycle/stale Nobody worked on this for 6 months (will further age) label Jan 31, 2022
@gardener-robot gardener-robot added lifecycle/rotten Nobody worked on this for 12 months (final aging stage) and removed lifecycle/stale Nobody worked on this for 6 months (will further age) labels Jul 30, 2022
@himanshu-kun
Copy link

Post grooming discussion

Try to create a new instance in another AZ if the respective worker group has been configured for more than one AZ.

This is already provided by Cluster Autoscaler where it backs off from the node grp and tries the other node grp. (currently in some cases , issues have been seen with the backoff , see #154

Try to get an instance of a fallback instance type (which may be more expensive). Fallback instance types should be configurable for worker groups.

This needs more discussion internally , and doesn't seem to be a required soln. We'll also have to look whether autoscaler supports node-grps with fall-back instance types.

@himanshu-kun himanshu-kun added kind/discussion Discussion (enaging others in deciding about multiple options) lifecycle/icebox Temporarily on hold (will not age; may have dependencies, lack priority, miss feedback, etc.) and removed lifecycle/rotten Nobody worked on this for 12 months (final aging stage) labels Feb 28, 2023
@himanshu-kun
Copy link

@anbrsap if you want to achieve the fallback to another instance type in the same zone, then with the current logic in-place , you can define multiple node grps in the same zone with different machine types . Then you use priority expander to define the order of fallback.

@himanshu-kun
Copy link

/close as the second soln could be implemented using the already existing first solution with the help of priority expander.

@gardener-robot gardener-robot added the status/closed Issue is closed (either delivered or triaged) label Feb 28, 2023
@anbrsap
Copy link
Author

anbrsap commented Feb 28, 2023

@anbrsap if you want to achieve the fallback to another instance type in the same zone, then with the current logic in-place , you can define multiple node grps in the same zone with different machine types . Then you use priority expander to define the order of fallback.

@himanshu-kun Please explain how the priority expander should solve this! To my understanding, expanders are codified strategies to decide which node group out of possible candidates to expand. But they cannot do any fallback, i.e. choose another node group in case expanding on one node group failed (e.g. due to instance type unavailability).

@himanshu-kun
Copy link

Every expander type (priority , least-waste , maxPods and others) is designed to ignore the backed off node group and then decide the next one from other node group.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/discussion Discussion (enaging others in deciding about multiple options) kind/enhancement Enhancement, improvement, extension lifecycle/icebox Temporarily on hold (will not age; may have dependencies, lack priority, miss feedback, etc.) status/closed Issue is closed (either delivered or triaged)
Projects
None yet
Development

No branches or pull requests

3 participants