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

support recreate a backup pod with full annotation #3144

Merged
merged 3 commits into from
Aug 16, 2023

Conversation

bobz965
Copy link
Collaborator

@bobz965 bobz965 commented Aug 16, 2023

What type of this PR

Examples of user facing changes:

  • Bug fixes

在一些开源软件的部署逻辑中,可能是通过备份 pod yaml 以及 pvc 的方式来异地恢复业务,其他框架可能不会处理掉pod的annotation中的一些标志键,比如allocated routed等。 这些框架的应用在 release-1.11 有点问题。由于release1.12 已经支持了ip pool,可以有效避免ip被抢占,同时需要新增部分pod创建直接重入以及cni循环等待ip的逻辑,以便能够兼容这些场景。

比如一个备份框架: https://velero.io/docs/v1.11/how-velero-works/

Which issue(s) this PR fixes:

Fixes #(issue-number)

WHAT

🤖 Generated by Copilot at f83b7c1

This pull request fixes some race conditions and conflicts when syncing pods and IP custom resources in the controller and daemon components. It adds a check for IP CR existence in pkg/controller/pod.go and a retry loop for IP CR update in pkg/daemon/handler.go.

🤖 Generated by Copilot at f83b7c1

Pod and IP CR
Race and conflict in sync
Autumn leaves retry

HOW

🤖 Generated by Copilot at f83b7c1

  • Add check for IP CR existence before syncing pod (link)
  • Add retry loop to update IP CR after pod attachment (link)

@bobz965 bobz965 force-pushed the reuse-pod branch 2 times, most recently from edd489f to ed5b046 Compare August 16, 2023 03:11
@bobz965 bobz965 changed the title add more check support recreate a backup pod with full annotation Aug 16, 2023
@bobz965 bobz965 requested a review from hongzhen-ma August 16, 2023 03:19
pkg/daemon/handler.go Outdated Show resolved Hide resolved
@bobz965 bobz965 merged commit d6e5aba into kubeovn:master Aug 16, 2023
@bobz965 bobz965 deleted the reuse-pod branch August 16, 2023 08:11
bobz965 added a commit that referenced this pull request Aug 16, 2023
* Support full ready annotation but no ip ,  pod handle add

* cni wait for backup pod ip to be created

* no need to make sure node on ip
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.

2 participants