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

retry to remove the pediacluster's finalizer #289

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Iceber
Copy link
Member

@Iceber Iceber commented Aug 4, 2022

Signed-off-by: Iceber Gu [email protected]

What type of PR is this?

/kind feature
What this PR does / why we need it:
Use retry.RetryOnConflict to remove the finalizer of pediacluster

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

None

@Iceber Iceber added this to the v0.5.0 milestone Aug 4, 2022
@Iceber Iceber added the kind/feature New feature label Aug 4, 2022
@calvin0327
Copy link

why does removing finalizer conflict?

@Iceber
Copy link
Member Author

Iceber commented Aug 8, 2022

why does removing finalizer conflict?

When delete a pediacluster, only the delete timestamp is set, the user or other components may still update this pediacluster, which will cause the resource version to be modified, and removing the finalizer will cause a conflict

@wuyingjun-lucky
Copy link
Member

wuyingjun-lucky commented Aug 14, 2022

why does removing finalizer conflict?

When delete a pediacluster, only the delete timestamp is set, the user or other components may still update this pediacluster, which will cause the resource version to be modified, and removing the finalizer will cause a conflict

which components may also modify pediacluster when it is on deleting

@Iceber
Copy link
Member Author

Iceber commented Aug 16, 2022

@wuyingjun-lucky There are other components inside daocloud that update pediacluster, and user updates can also cause the resource version changes.

However, the fix for this pr is incorrect:

  1. the operation of the finalizer could use patch to avoid conflict
  2. when cleaning cluster or removing the finalizer, it should always retry no matter what the error is. If the retry count is set, pediacluster may not be removed when the retry count is exceeded.

@Iceber Iceber removed this from the v0.5.0 milestone Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants