Comment 8 for bug 1989505

Revision history for this message
Nishant Dash (dash3) wrote :

Hello,

Running into a similar case. Using 8.0.31 (8.0/stable 35) on a focal-ussuri deployment.

When trying to migrate a unit (add a new unit, remove an old unit) for an application with a corresponding mysql-router, we would that the db-router relation data would contain the allowed units in an inconsistent state. Specifically, the master innodb unit would report the right units of the application but the non master nodes would not have the new unit we added in its allowed lists. This was the case for every app we had to deal with from cinder to n-c-c, etc...

Workaround;
Scenario
mysql-innodb-cluster/0 -> non master, R/O
mysql-innodb-cluster/2 -> non master, R/W
mysql-innodb-cluster/4 -> master R/O

1) grab the relation id of db-router from `juju show-unit $APP-mysql-router/3`

Taking aodh as an example,
2) grab LIST, i.e, correct entry from `juju show-unit $APP-mysql-router/<X>` under master innodb

3)
LIST="aodh-mysql-router/26 aodh-mysql-router/27 aodh-mysql-router/28"
juju run -u mysql-innodb-cluster/0 -- "relation-set -r db-router:36 mysqlrouter_allowed_units='\"$LIST\"' MRUP_allowed_units='\"$LIST\"'"

- repeat same command as above for mysql-innodb-cluster/2

4) Then you can verify that all innodbs will have the same entries, and can also see it propagate to the unit itself in allowed units like so,
juju show-unit $APP/{A,B,C} | grep allowed