Action `remove-instance` works but appears to fail
Bug #1954306 reported by
Peter Matulis
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MySQL InnoDB Cluster Charm |
Triaged
|
Medium
|
Unassigned | ||
mysql-8.0 (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Prior to removing a mysql-innodb-
$ juju run-action --wait mysql-innodb-
The output included text that suggested the action did not succeed:
===
"message: Remove instance failed"
"nmysqlsh.DBError: MySQL Error (1238): Cluster.
Variable 'group_
"status: failed"
===
However, the model status looks reasonable as does the cluster status.
See attachment for details:
mysql-innodb-
Changed in charm-mysql-innodb-cluster: | |
status: | New → Invalid |
To post a comment you must log in.
I don't think this is a charm bug. The issue appears when using the mysql to remove a node from the cluster. From what I can see you cannot persist group_replicati on_force_ members and is correctly unset. So the error being reported seems wrong
https:/ /pastebin. ubuntu. com/p/sx6ZB3rs6 r/
root@juju- 1f04f3- zaza-90b9e082f2 aa-2:/var/ lib/juju/ agents/ unit-mysql- innodb- cluster- 1/charm# /snap/bin/mysqlsh
Cannot set LC_ALL to locale en_US.UTF-8: No such file or directory
MySQL Shell 8.0.23
Copyright (c) 2016, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.
Type '\help' or '\?' for help; '\quit' to exit. 'clusteruser: d2Z27kpxZmJ826t SVWL6SVV4LYZhZw wryHtM@ 172.20. 0.111') 172.20. 0.111' 0ubuntu0. 20.04.1 (Ubuntu) clusteruser@ 172.20. 0.111:33060> cluster( 'jujuCluster' ) remove_ instance( 'clusteruser@ 172.20. 0.166', {'force': False})
mysql-py> shell.connect(
Creating a session to 'clusteruser@
Fetching schema names for autocompletion... Press ^C to stop.
Your MySQL connection id is 1644 (X protocol)
Server version: 8.0.27-
No default schema selected; type \use <schema> to set one.
<Session:
mysql-py []> cluster = dba.get_
mysql-py []> cluster.
The instance will be removed from the InnoDB cluster. Depending on the instance
being the Seed or not, the Metadata session might become invalid. If so, please
start a new session to the Metadata Storage R/W instance.
Instance '172.20.0.166:3306' is attempting to leave the cluster... replication_ force_members' is a non persistent variable remove_ instance: Variable 'group_ replication_ force_members' is a non persistent variable replication_ force_members' ; ------- ------- ------- ------+ ------- + ------- ------- ------- ------+ ------- + on_force_ members | | ------- ------- ------- ------+ ------- +
ERROR: Instance '172.20.0.166:3306' failed to leave the cluster: Variable 'group_
Traceback (most recent call last):
File "<string>", line 1, in <module>
mysqlsh.DBError: MySQL Error (1238): Cluster.
mysql-py []> \sql show variables like 'group_
+------
| Variable_name | Value |
+------
| group_replicati
+------
1 row in set (0.0086 sec)