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

optimize provider network #2099

Merged
merged 2 commits into from
Dec 5, 2022
Merged

optimize provider network #2099

merged 2 commits into from
Dec 5, 2022

Conversation

fanriming
Copy link
Member

@fanriming fanriming commented Nov 30, 2022

What type of this PR

Examples of user facing changes:

  • Bug fixes

Currently, the same provider-network resource will be updated by all kube-ovn-cni pods. When the number of nodes is large and there are several inconsistent states, update events will trigger all kube-ovn-cni to patch provider-network again and again. In this case, the apiserver will receive a large number of patch requests and the cpu will be high load, and the apiserver will become very slow to respond.

The state of provider-network does not need to be changed frequently. provider-network should be read-only to the kube-ovn-cni. Update operations of provider-network should be minimized to avoid conflicts and inconsistencies. The optimization is as follows:

  1. Removes the code that performs updates to provider-network in kube-ovn-cni.
  2. Write error messages to kube-ovn-cni pod annotations.
  3. Optimize controller timing synchronization code to update provider-network status based on node and kube-ov-cni annotations.
  4. Add the notReadyNodes field to the status for clearer display of configuration results.

@zhangzujian zhangzujian linked an issue Dec 2, 2022 that may be closed by this pull request
@fanriming
Copy link
Member Author

@zhangzujian It has been modified as suggested, please review it again, thanks.

@zhangzujian
Copy link
Member

Please run go fmt ./... to fix gofmt issues.

@zhangzujian zhangzujian added the performance Anything that can make Kube-OVN faster label Dec 5, 2022
@zhangzujian zhangzujian merged commit b8e15e1 into kubeovn:master Dec 5, 2022
zhangzujian added a commit that referenced this pull request Dec 6, 2022
zhangzujian added a commit that referenced this pull request Dec 6, 2022
zhangzujian added a commit that referenced this pull request Dec 6, 2022
zhangzujian added a commit to zhangzujian/kube-ovn that referenced this pull request Dec 6, 2022
zhangzujian added a commit to zhangzujian/kube-ovn that referenced this pull request Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need backport performance Anything that can make Kube-OVN faster
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

ProviderNetwork 资源不停的被ovn-Controller和ovn-cni patch
2 participants