Skip to content

add tested workaround for retrying DNS lookups #8

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

Merged
merged 1 commit into from
Jun 15, 2018

Conversation

szuecs
Copy link
Collaborator

@szuecs szuecs commented Jun 15, 2018

use workaround to handle golang/go#23427

main.go Outdated
select {
case <-time.After(30 * time.Second):
kubeConfig.Transport.CloseIdleConnections()
case <-stopChan:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This channel is being read from twice, here and in the controller. We need two different channels or something like this, for this to work.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see https://play.golang.org/p/M1QJsNKw4Pu we use it in skipper to shutdown >1 goroutines, too

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah you are right, we close the channel, I was thinking that you can't read twice!

@szuecs szuecs force-pushed the fix/transport-miss-dns-retries branch from 42e6d0f to 2f0a4c1 Compare June 15, 2018 09:38
@coveralls
Copy link

Coverage Status

Coverage increased (+0.7%) to 43.956% when pulling 2f0a4c1 on fix/transport-miss-dns-retries into 02f51f6 on master.

@szuecs
Copy link
Collaborator Author

szuecs commented Jun 15, 2018

@mikkeloscar based on your comment here code showing that the shutdown handling works https://play.golang.org/p/M1QJsNKw4Pu . We use it in skipper to shutdown all goroutines from one channel.

@mikkeloscar
Copy link
Owner

👍

@mikkeloscar mikkeloscar merged commit 9a14647 into master Jun 15, 2018
@mikkeloscar mikkeloscar deleted the fix/transport-miss-dns-retries branch June 15, 2018 09:49
@aermakov-zalando
Copy link
Collaborator

Unfortunately, client-go complains if you try to use a custom transport:

time="2018-06-15T14:46:06Z" level=fatal msg="using a custom transport with TLS certificate options or the insecure flag is not allowed"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants