-
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
Fix auto_scaling_group asg failed multi line warn log #7703
base: master
Are you sure you want to change the base?
Fix auto_scaling_group asg failed multi line warn log #7703
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: krrrr38 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Welcome @krrrr38! |
Hi @krrrr38. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@@ -548,7 +548,7 @@ func (m *asgCache) isNodeGroupAvailable(group *autoscaling.Group) (bool, error) | |||
if activity.StartTime.Before(lut) { | |||
break | |||
} else if *activity.StatusCode == "Failed" { | |||
klog.Warningf("ASG %s scaling failed with %s", asgRef.Name, *activity) | |||
klog.Warningf("ASG %s scaling failed with %s", asgRef.Name, *activity.StatusMessage) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ASG Name is already shown, so we may require only StatusMessage only. And this become single line output.
W0116 07:10:42.815402 1 auto_scaling_groups.go:551] ASG eks-batch-spot202407091400-ap-northeast-1a-72c85d24-0d0c-3317-6d99-xxxxxxxxxxxx scaling failed with {
ActivityId: "4b6651b7-c98a-a0c3-5fe1-xxxxxxxxxxxx",
AutoScalingGroupARN: "arn:aws:autoscaling:ap-northeast-1:xxxxxxxxxxxx:autoScalingGroup:15be2ddc-7564-4bf2-bb35-xxxxxxxxxxxx:autoScalingGroupName/eks-batch-spot202407091400-ap-northeast-1a-72c85d24-0d0c-3317-6d99-xxxxxxxxxxxx",
AutoScalingGroupName: "eks-batch-spot202407091400-ap-northeast-1a-72c85d24-0d0c-3317-6d99-xxxxxxxxxxxx",
Cause: "At 2025-01-16T07:09:48Z an instance was started in response to a difference between desired and actual capacity, increasing the capacity from 0 to 1.",
Description: "Launching a new EC2 instance. Status Reason: Could not launch Spot Instances. UnfulfillableCapacity - Unable to fulfill capacity due to your request configuration. Please adjust your request and try again. Launching EC2 instance failed.",
Details: "{\"Subnet ID\":\"subnet-xxxxxxxxxxxx\",\"Availability Zone\":\"ap-northeast-1a\"}",
EndTime: 2025-01-16 07:09:49 +0000 UTC,
Progress: 100,
StartTime: 2025-01-16 07:09:49.096 +0000 UTC,
StatusCode: "Failed",
StatusMessage: "Could not launch Spot Instances. UnfulfillableCapacity - Unable to fulfill capacity due to your request configuration. Please adjust your request and try again. Launching EC2 instance failed."
}
586e2a4
to
13e6a8c
Compare
/ok-to-test |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Change multiline warn log into single log using required information not to output multi line output.
See also #7702
Which issue(s) this PR fixes:
Fixes #7702
Special notes for your reviewer:
N/A
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
NONE