-
Notifications
You must be signed in to change notification settings - Fork 39k
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
Include more information when multiple security groups are tagged #58874
Conversation
/assign @justinsb |
return nil, fmt.Errorf("Multiple tagged security groups found for instance %s; ensure only the k8s security group is tagged", instanceID) | ||
taggedGroups := "" | ||
for _, v := range tagged { | ||
taggedGroups += fmt.Sprintf("%v(%v) ", v.GroupId, v.GroupName) |
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.
I think these are *string
so you should fmt.Printf("%s(%s) ", aws.StringValue(v.GroupId), aws.StringValue(v.GroupName))
for _, v := range tagged { | ||
taggedGroups += fmt.Sprintf("%v(%v) ", v.GroupId, v.GroupName) | ||
} | ||
return nil, fmt.Errorf("Multiple tagged security groups found for instance %s; ensure only the k8s security group is tagged; the tagged groups was %v", instanceID, taggedGroups) |
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.
nit (only because we need a change here anyway): the tagged groups were %v
Love the idea here, but I think we need to use |
cb27142
to
927c8cf
Compare
@justinsb addressed your comments, also added a few tests for good measure |
/ok-to-test /lgtm Thanks @sorenmat |
When trying to create ELB we can sometime fail if there is more then one AWS security group tagged. It very useful to get the list of security groups printed in the error message. **Release note**: ```release-note Include the list of security groups when failing with the errors that more then one is tagged ```
927c8cf
to
7c7e691
Compare
@justinsb I've updated the code so it should pass the steps |
/test pull-kubernetes-typecheck |
re-apply lgtm /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dims, justinsb, sorenmat The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test all [submit-queue is verifying that this PR is safe to merge] |
/test all Tests are more than 96 hours old. Re-running tests. |
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here. |
What this PR does / why we need it:
When trying to create ELB we can sometime fail if there is more then one AWS
security group tagged. It very useful to get the list of security groups printed in
the error message.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer:
Release note: