-
Notifications
You must be signed in to change notification settings - Fork 84
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
Extreme slowdown since upgrading to v0.9.7 (5 minutes) #309
Comments
I can not replicate this issue. I see
If you only see the line you posted and nothing else. Then it seems like it's stuck somewhere. |
Super weird. Any idea how I can find out where it's stuck on? |
@ruudk normally I would try Does it makes sense to let the issue open or should we close it? |
@ruudk you can always ssh to your node, find the process and use the mentioned command. |
Was able to do it like this:
Doesn't give much info, because by the time I'm able to strace it, the program is already waiting... and I miss all the history. Any tips? |
@ruudk Maybe use an initContainer that does "sleep 600", or create your own docker container and start the container with |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Ok, after some debugging and investigation I found out that version 0.9.7 does work, it's just extremely slow. It takes more than 5 minutes to startup. See logs:
This is caused by the update of AWS Go SDK. It introduces support for Instance Metadata Service v2 (IMDSv2) in aws/aws-sdk-go#2958. IMDSv2 has a new security method. You first need to ask for a token by issuing a After some sort of timeout (5 minutes) it seems to fallback to IMDSv1 and starts working. In order to fix this, you need to increase the hop limit. Luckily AWS has provided a way to do this with:
This increases the hop limit from (default) 1 to 2 and allows to create the IMDSv2 token. @mikkeloscar, you couldn't reproduce this, you must be running |
After running |
Maybe kube2iam or kube-Aws-iam-controller have already the credentials cached in our case. |
I found out what causes this issue. The AwsAdapter overrides the default HttpClient with an kube-ingress-aws-controller/aws/adapter.go Line 156 in df00edd
But the What to do here? |
It seems like an aws-sdk issue if you can't provide a custom http client the way we do it. Either they should allow setting a client specifically for the ec2 metadata or maybe use a context in the calls which has a timeout so they don't need to modify the whole client. From our side I would also be ok with a flag to disable the instrumented http client if this would be helpful for you? |
How is the instrumented HTTP client used? I don't think I need it. |
@ruudk it exposes Prometheus metrics for HTTP calls. We depend on this to some extend so I would like to not remove it, but I'm ok disabling it with a flag. |
@mikkeloscar Like this? #327 |
When I run on 0.9.6 I get all debug messages with
--debug
flag.But starting from
v0.9.7
it stops, and I only see:I don't see anything weird in v0.9.6...v0.9.7
The text was updated successfully, but these errors were encountered: