-
Notifications
You must be signed in to change notification settings - Fork 121
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
Always ensure to have machine-delete-finalizer #811
Always ensure to have machine-delete-finalizer #811
Conversation
After creating a new provider instancewe always want to hacve the machine-delete-finalizer possible provider specific finalizers can't be deleted without it. Signed-off-by: Phillip Stagnet <p.stagnet@syseleven.de>
Hi @phiphi282. Thanks for your PR. I'm waiting for a kubermatic member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/assign @xrstf |
/ok-to-test |
Is there any progress on this? :) |
Hey @phiphi282. Let me see if I got your problem right. With some providers (at least Azure) the instance is created requiring clean-up and an error returned at the same time by |
The problem is with the deletion of the If the provider instance is created but the function returns an error, the The |
@phiphi282 Ok, I think I got your point right. Having an error returned by Do you have an example at hand of error that is returned with Azure |
I kind of forgot what we did exactly unfortunately, but we created and deleted some instances relatively fast. I think this caused the machine to be created on the azure side but without completely finishing the creation. The machine already got all azure related finalizers attached to it already which kept the machine from being deleted. |
I'm afraid that I don't have the logs here anymore. |
I think that this PR risks to have side effects. The fact that cluster deletion hanged as mentioned bu @eduardostalinho is probably because the instance was created despite the error returned by The problem I see is that when
causing the machine deletion to hang. |
@PhillipAmend @eduardostalinho What I propose is to keep this on hold at the moment, wait for a re-occurrence of the issues to have a better understanding of what happened. Is it ok for you? |
@irozzo-1A From what I could see in the provider code all e.g aws: instance, err := p.get(machine)
if err != nil {
if err == cloudprovidererrors.ErrInstanceNotFound {
return true, nil
}
return false, err
} With this the machine deletion should not be hanging because of a failed delete. If we don't try to delete the machine at all however (because of the missing finalizer) the machine deletion will definitely hang when there are still other finalizers on the machine. I would be okay for me to wait a bit but we probably won't have re-occurrence of the issue from our side, since we are already using this fix (and from what we can tell it works fine on openstack, aws and azure at least). |
Hi @phiphi282, I agree that if all I will take another look beginning of next week. |
/lgtm |
LGTM label has been added. Git tree hash: 16b55425d25d9741145de0adea18c534c243119e
|
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: irozzo-1A, phiphi282 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Thx for this contribution @phiphi282. I double-checked and I think you were right, this should not have side-effects. If we will observer regressions for some providers won't be critical. |
What this PR does / why we need it:
After creating a new provider instance we always want to have the
machine-delete-finalizer. Possible provider specific finalizers can't be
deleted without it.
We have noted this especially for azure clusters, where the machine-controller doesn't try to run deleteCloudProvider instance because the finalizer
machine-delete-finalizer
is missing.Which issue(s) this PR fixes (optional, in
fixes #<issue number>
format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer:
Optional Release Note: