https://github.com/canonical/mysql-k8s-operator/issues/407
When a node is drained along with the pods on that node + the PV of the unit is deleted, then when the unit is restarted, the unit tries to rejoin the cluster. However, there is already metadata for that unit in the cluster metadata that prevents the unit's SST.
Solution
If the instance is already in non-online state when trying to join the cluster, run cluster.rescan() on the primary node so that the rejoining unit's SST completes without errors.
Issue
https://github.com/canonical/mysql-k8s-operator/issues/407 When a node is drained along with the pods on that node + the PV of the unit is deleted, then when the unit is restarted, the unit tries to rejoin the cluster. However, there is already metadata for that unit in the cluster metadata that prevents the unit's SST.
Solution
If the instance is already in non-online state when trying to join the cluster, run
cluster.rescan()
on the primary node so that the rejoining unit's SST completes without errors.