Comment 6 for bug 1889792

Revision history for this message
David Ames (thedac) wrote :

TRIAGE:

*This bug* is a documentation bug. Create documentation on the proper removal of an instance from the cluster.

The original bug was caused by attempting to add a new instance with the same IP address as the instance that had been removed.

The smoking gun is to check the `cluster-status` action on a healthy instance. It will show the IP address of the original (and now duplicated) instance as "MISSING."

juju run-action --wait mysql-innnodb-cluster/leader cluster-status

DOCUMENTATION

Ideally, one should remove an instance using the `remove-instance` action before tearing down the machine running the instance. Obviously, that is not always possible, but it still remains necessary to run the `remove-instance` action (even when the instance is gone) in order to update the cluster metadata.

While the instance is running:

juju run-action --wait mysql-innnodb-cluster/leader remove-instance address=<INSTANCE IP TO REMOVE>

When machine is down or gone:

juju run-action --wait mysql-innnodb-cluster/leader remove-instance address=<INSTANCE IP TO REMOVE> force=True

Check cluster status:

juju run-action --wait mysql-innnodb-cluster/leader cluster-status

The removed instance's IP should no longer be in the cluster status metadata output. It is now safe to add a new instance even with the original IP.

**********************
*Note*: Due to a generic work load status of "MySQL InnoDB Cluster not healthy: None" more than one bug has been filed against this bug number. I have filed LP Bug#1917337 [0] to make this clearer.

For all bugs other than removing and replacing an instance with the same IP address, please file a new bug with debug-logs for all the msyql-innodb-cluster units attached for further investigation. The logs rather than the workload status identify the bug.
**********************

[0] https://bugs.launchpad.net/charm-mysql-innodb-cluster/+bug/1917337