[CLI] Uninstall fails if a mongodb sharded cluster is in Deleting state

Description

Test setup is same as .

Create a mongodb 5 node database with 4 shards and 5 configuration servers, enable hourly scheduled backups and PITR

Take two scheduled backups. Add data of about 1-2 GB, then shard the database and collection.

Create a new database using PITR. For the new database, use 4 shards, 5 nodes, and 5 configuration servers.

The new database comes up, but the restore fails.

Delete the restored database.

While the database is being deleted, uninstall Everest. The uninstallation fails

However the deletion of other databases is triggered by the uninstall.

After all databases are deleted, uninstall is successful

Issues

  1. Uninstall should not fail and should be able to handle the scenario in which databases could be in different state such as Initializing, Deleting, Paused/Suspended, Restoring etc.

  2. Should all the databases be deleted by the uninstall if the uninstall fails to run?

Environment

None

Attachments

2

Activity

Show:

Manish Chawla January 3, 2025 at 12:00 PM

Tested with Everest v1.4.0-rc6 version.

Deleted a mongodb sharded database and then uninstalled everest using cli. The uninstall was succesful

Manish Chawla November 25, 2024 at 4:43 PM

Cli version

One mongodb sharded database was stuck in Deleting status, other databases were in Up status

Uninstalled Everest

The databases in Up status aren’t deleted.

Uninstalled Everest and delete all databases

All databases are deleted, the cli doesn’t give an error for the database stuck in Deleting status but times out, which is fine as the database could not be deleted.

Diogo Recharte November 14, 2024 at 1:49 PM

I think that the behavior depends whether the users selected to delete the DBs or not. One of the steps of the uninstall wizard is:

If the user answers yes I think we should block until the DB is deleted like we do if the DB is in a running state.

If the user answered no then we should leave those DBs alone.

 

I believe that the problem here is that we are trying to edit the finalizers of a DB that’s already being deleted. I think that we only need to make sure that we don’t try to add any finalizers to DBs that are already getting deleted.

Michal November 14, 2024 at 1:25 PM

what would be the expected behavior in this case?
Shall we block uninstall until a DB is deleted or shall we skip DBs which cannot be deleted and the user will need to run uninstallation again?

Unresolved

Details

Assignee

Reporter

Fix versions

Priority

Smart Checklist

Created November 5, 2024 at 9:50 AM
Updated January 8, 2025 at 4:58 PM