canonical / mongodb-operator

Charmed solution for MongoDB
Apache License 2.0
12 stars 14 forks source link

[DPE-3813] make cluster password sync more robust #377

Closed MiaAltieri closed 8 months ago

MiaAltieri commented 8 months ago

Issue

During sharding integration tests, sharding components will occasionally go into error state when executing update_status. However when the hook gets fired again the component goes out of error. The errors are either SeverSelectionError or OperationFailure (code 18) indicating the cluster is still syncing either password or internal membership. The current check for cluster_password_synced is not robust enough to catch these.

Solution

Update cluster_password_synced and its dependent functions to catch these errors right away.