Skip to content
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

controller: fix apiserver connection timeout on startup #2545

Merged
merged 3 commits into from Mar 24, 2023

Conversation

zhangzujian
Copy link
Member

@zhangzujian zhangzujian commented Mar 24, 2023

What type of this PR

Examples of user facing changes:

  • Features
  • Bug fixes
  • Docs
  • Tests

Which issue(s) this PR fixes:

After node reboot, there is a chance that kube-ovn-controller/kube-ovn-cni reports connection timeout and crashes.

This patch makes the controller try to connect the apiserver service's TCP port before creating the k8s client(s).

I0324 09:55:26.024115       7 config.go:247] no --kubeconfig, use in-cluster kubernetes config
W0324 09:55:26.036828       7 k8s.go:28] failed to dial 10.96.0.1:443: dial tcp 10.96.0.1:443: connect: connection refused
W0324 09:55:32.031709       7 k8s.go:28] failed to dial 10.96.0.1:443: dial tcp 10.96.0.1:443: i/o timeout
I0324 09:55:32.044155       7 config.go:305] no --kubeconfig, use in-cluster kubernetes config

@zhangzujian zhangzujian added need backport bug Something isn't working labels Mar 24, 2023
@zhangzujian zhangzujian force-pushed the fix-timeout branch 3 times, most recently from 9ebfade to acbfa27 Compare March 24, 2023 02:41
@zhangzujian zhangzujian marked this pull request as ready for review March 24, 2023 03:05
@zhangzujian zhangzujian merged commit b8fc9d9 into kubeovn:master Mar 24, 2023
52 checks passed
@zhangzujian zhangzujian deleted the fix-timeout branch March 24, 2023 05:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need backport
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants