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

Cleanup finalizer removal in instance update #1389

Merged
merged 3 commits into from
Mar 4, 2020

Conversation

ANeumann82
Copy link
Member

Only try to remove finalizers if we're actually in the deletion process

Signed-off-by: Andreas Neumann aneumann@mesosphere.com

Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
@@ -271,7 +271,11 @@ func updateInstance(instance *kudov1beta1.Instance, oldInstance *kudov1beta1.Ins

// 1. check if the finalizer can be removed (if the instance is being deleted and cleanup is completed) and then
// update instance spec and metadata. this will not update Instance.Status field
isDelete := tryRemoveFinalizer(instance)
isDeletionComplete := false
Copy link
Contributor

@zen-dog zen-dog Mar 4, 2020

Choose a reason for hiding this comment

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

Still misleading IMHO, because the DELETE is complete when the Instance is removed, which is not the case here. We could call it what it is: isFinalizerRemoved (1) or what it means to us: isCleanupDone (2). I'd prefer the first one.

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, the result from tryRemoveFinalizer is not important for us, that could also happend on an upgrade if the cleanup plan is removed. I've pushed another version...

ANeumann82 and others added 2 commits March 4, 2020 17:14
Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
Signed-off-by: Ken Sipe <kensipe@gmail.com>
Copy link
Member

@kensipe kensipe left a comment

Choose a reason for hiding this comment

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

/lgtm

@kensipe kensipe merged commit 337490d into master Mar 4, 2020
@kensipe kensipe deleted the an/cleanup-instance-update-deletion branch March 4, 2020 17:46
runyontr pushed a commit that referenced this pull request Mar 11, 2020
Co-authored-by: Ken Sipe <kensipe@gmail.com>
Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
Signed-off-by: Thomas Runyon <runyontr@gmail.com>
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.

3 participants