Skip to content

Commit

Permalink
Anexia Provider: fix failed vm deletion deadlock (#1609)
Browse files Browse the repository at this point in the history
Signed-off-by: Mario Schäfer <mschaefer@anexia-it.com>
Co-authored-by: Mario Schäfer <mschaefer@anexia-it.com>
  • Loading branch information
kubermatic-bot and Mario Schäfer authored Mar 28, 2023
1 parent 9487516 commit 1a34949
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/cloudprovider/provider/anexia/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,10 @@ func (p *provider) GetCloudConfig(_ clusterv1alpha1.MachineSpec) (string, string

func (p *provider) Cleanup(ctx context.Context, machine *clusterv1alpha1.Machine, data *cloudprovidertypes.ProviderData) (isDeleted bool, retErr error) {
if inst, err := p.Get(ctx, machine, data); err != nil {
if cloudprovidererrors.IsNotFound(err) {
return true, nil
}

return false, err
} else if inst.Status() == instance.StatusCreating {
klog.Warningf("Unable to cleanup machine %q. Instance is still creating", machine.Name)
Expand Down

0 comments on commit 1a34949

Please sign in to comment.