canonical / mongodb-operator

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

Units hanging on shard removal #301

Closed MiaAltieri closed 11 months ago

MiaAltieri commented 11 months ago

This bug is flakey and may take several times to reproduce

Steps to reproduce

juju deploy ./*charm --config role="config-server" config-server-one -n2
juju deploy ./*charm --config role="shard" shard-one -n2
juju deploy ./*charm --config role="shard" shard-two -n2
juju integrate config-server-one:config-server shard-one:sharding
juju integrate config-server-one:config-server shard-two:sharding
juju remove-relation config-server-one:config-server shard-two:sharding

Then see that the non-leader unit for shard-two is stuck forever draining

Expected behaviour

Shard-two to complete draining when mongos shows it has finished draining

Actual behaviour

Shard-two is shown forever draining (but is not actually draining by the mongos status)

Why this is happening

The leader updates the draining status to finished in the app data but the non-leader units do not get the updated app data

github-actions[bot] commented 11 months ago

https://warthogs.atlassian.net/browse/DPE-2889