PSMDB clusters with error state stuck in deleting

Description

If there is a psmbdb cluster in an error state (in particular bc of a wrong configuration) and the cluster has finalizers it's going to stuck in the deletion.

The reason seems to be that the reconciliation never got to the checkFinalizers step if there is an error appeared previously in the Reconcile() method, that's why the finalizers are still there and the CR never gets deleted.

An example of psmdb configuration for which the problem is reproducible:

(it has finalizers and an error in the configuration - the max_allowed_packet=128M can’t be parsed to a map).

Steps to reproduce:

  1. Apply the above config. Expected result: a psmdb cluster in error state.

  2. Delete the cluster. Expected result: the cluster CR is deleted. Actual result: the cluster is not deleted.

It’s quite easy to get to this situation currently using Everest and it is confusing for the end user why they can’t delete a failed cluster.

Environment

None

Activity

Slava Sarzhan July 16, 2024 at 11:44 AM

It was fixed.

Slava Sarzhan May 15, 2024 at 9:08 AM

I agree with you and we will improve it. I just mentioned that we need to have validation on Everest’s end as well.

Oksana Grishchenko May 15, 2024 at 8:35 AM

I mean, it’s ok the cluster got to an error state, it’s not ok it can’t be deleted in this case.

Oksana Grishchenko May 15, 2024 at 8:32 AM
Edited

Everest certainly should validate the configuration. From the other side - I’m not sure if Everest should duplicate the 500 lines of code that validates the different aspects of the configuration in the operator. Also error can appear by other reason, not only in the configuration.

The point is that whatever the reason of the failure is - a cluster with finalizers should perform the deletion properly.

Done

Details

Assignee

Reporter

Needs QA

Yes

Story Points

Sprint

Fix versions

Priority

Smart Checklist

Created May 15, 2024 at 8:16 AM
Updated September 9, 2024 at 1:31 PM
Resolved August 30, 2024 at 8:38 AM