-
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
Continue operation if parsing some ASG fails #1728
Comments
This happens not only when there are 0 instances in an ASG but also if all nodes are cordoned in that ASG :/ |
Yeah. As you know, Mixed instance type in one ASG are not supported. Maybe we can change to skip invalid ASG instead to prevent CA stop working. What do you think? |
sounds good. |
/sig aws |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
@jaypipes I think I am still seeing this issue; the root cause I identified in my comment: #2248 (comment) in PR #2248 but this was merged without handling this case... I still think that the code should be robust against provider implementation errors though as turning off the autoscaling when an error starts occurring is a bad undesirable behaviour (and could be very costly!) |
For the record its clusters create via kops that generates ASGs which fallback to the default version for the template and don't explicitly set it. |
@jsharpe OK, I'm not understanding whether this is an issue in the autoscaler or this is an issue with kops. Are you recommending that the cluster-autoscaler AWS cloud provider code that builds a launch template from the AWS SDK's autoscaling launchTemplateSpec should set the returned launch template version to "$Default" when when the AWS SDK returned an empty string for the launch template spec's version? |
Yes, I'm currently running a fork with that setup and it seems to resolve the issue I was seeing. I think the issue is with the autoscaler as the aws sdk says that the version parameter field is optional and has a default of "$Default" which I take to mean that you should use "$Default" if the field is empty? I guess ideally the AWS Go SDK would fill this in for us. |
The LaunchTemplateSpecification.Version is a pointer to string. When the pointer is nil, EC2 AutoScaling API considers the value to be "$Default", however aws.StringValue(ltSpec.Version) will return an empty string (which is not considered the same as "$Default" or a nil string pointer. So, in order to not pass an empty string as the version for the launch template when we communicate with the EC2 AutoScaling API using the information in the launchTemplate, we store the string "$Default" when the ltSpec.Version is a nil pointer. Fixes kubernetes#1728
The LaunchTemplateSpecification.Version is a pointer to string. When the pointer is nil, EC2 AutoScaling API considers the value to be "$Default", however aws.StringValue(ltSpec.Version) will return an empty string (which is not considered the same as "$Default" or a nil string pointer. So, in order to not pass an empty string as the version for the launch template when we communicate with the EC2 AutoScaling API using the information in the launchTemplate, we store the string "$Default" when the ltSpec.Version is a nil pointer. Issue kubernetes#1728
/assign @jaypipes |
The LaunchTemplateSpecification.Version is a pointer to string. When the pointer is nil, EC2 AutoScaling API considers the value to be "$Default", however aws.StringValue(ltSpec.Version) will return an empty string (which is not considered the same as "$Default" or a nil string pointer. So, in order to not pass an empty string as the version for the launch template when we communicate with the EC2 AutoScaling API using the information in the launchTemplate, we store the string "$Default" when the ltSpec.Version is a nil pointer. Issue kubernetes#1728
The LaunchTemplateSpecification.Version is a pointer to string. When the pointer is nil, EC2 AutoScaling API considers the value to be "$Default", however aws.StringValue(ltSpec.Version) will return an empty string (which is not considered the same as "$Default" or a nil string pointer. So, in order to not pass an empty string as the version for the launch template when we communicate with the EC2 AutoScaling API using the information in the launchTemplate, we store the string "$Default" when the ltSpec.Version is a nil pointer. Issue kubernetes#1728
The LaunchTemplateSpecification.Version is a pointer to string. When the pointer is nil, EC2 AutoScaling API considers the value to be "$Default", however aws.StringValue(ltSpec.Version) will return an empty string (which is not considered the same as "$Default" or a nil string pointer. So, in order to not pass an empty string as the version for the launch template when we communicate with the EC2 AutoScaling API using the information in the launchTemplate, we store the string "$Default" when the ltSpec.Version is a nil pointer. Issue kubernetes#1728
The LaunchTemplateSpecification.Version is a pointer to string. When the pointer is nil, EC2 AutoScaling API considers the value to be "$Default", however aws.StringValue(ltSpec.Version) will return an empty string (which is not considered the same as "$Default" or a nil string pointer. So, in order to not pass an empty string as the version for the launch template when we communicate with the EC2 AutoScaling API using the information in the launchTemplate, we store the string "$Default" when the ltSpec.Version is a nil pointer. Issue kubernetes#1728
The LaunchTemplateSpecification.Version is a pointer to string. When the pointer is nil, EC2 AutoScaling API considers the value to be "$Default", however aws.StringValue(ltSpec.Version) will return an empty string (which is not considered the same as "$Default" or a nil string pointer. So, in order to not pass an empty string as the version for the launch template when we communicate with the EC2 AutoScaling API using the information in the launchTemplate, we store the string "$Default" when the ltSpec.Version is a nil pointer. Issue kubernetes#1728
The LaunchTemplateSpecification.Version is a pointer to string. When the pointer is nil, EC2 AutoScaling API considers the value to be "$Default", however aws.StringValue(ltSpec.Version) will return an empty string (which is not considered the same as "$Default" or a nil string pointer. So, in order to not pass an empty string as the version for the launch template when we communicate with the EC2 AutoScaling API using the information in the launchTemplate, we store the string "$Default" when the ltSpec.Version is a nil pointer. Issue kubernetes#1728
Signed-off-by: Yuki Iwai <[email protected]>
One of our ASGs uses mixed instance types and has 0 instances.
Expected Behaviour:
Autoscaler behaves like described in: #1647.
The autoscaler fails to parse the mixed ASG with
Unable to build proper template node for {{ASG_NAME}}: Unable to get instance type from launch config or launch template
and continues with the existing others.
Actual Behaviour:
The autoscaler fails to parse the mixed ASG with
Unable to build proper template node for {{ASG_NAME}}: Unable to get instance type from launch config or launch template
and stops processing ASGs with the following message:static_autoscaler.go:312] Failed to scale up: failed to build node infos for node groups: Unable to get instance type from launch config or launch template
I just had to remove the ASG and everything was fine, but a single invalid ASG shouldn't incapacitate the Autoscaler IMO.
The text was updated successfully, but these errors were encountered: