_assess_status: RuntimeError: Dba.get_cluster: This function is not available through a session to an instance belonging to an unmanaged replication group
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MySQL InnoDB Cluster Charm |
Fix Released
|
Medium
|
Unassigned | ||
OpenStack Charm Guide |
Fix Released
|
Medium
|
Peter Matulis |
Bug Description
Encountered here: https:/
A new unit has been added to the cluster after a removal of a different unit. Juju status:
mysql-innodb-
mysql-innodb-
mysql-innodb-
tracer: -- dequeue handler reactive/
2020-07-28 18:55:25 DEBUG juju-log certificates:4: Running _assess_status()
2020-07-28 18:55:26 DEBUG certificates-
2020-07-28 18:55:27 DEBUG juju-log certificates:4: Opening db connection for root@localhost
2020-07-28 18:55:27 DEBUG juju-log certificates:4: Checking cluster status.
2020-07-28 18:55:53 ERROR juju-log certificates:4: Cluster is unavailable: Logger: Tried to log to an uninitialized logger.
Traceback (most recent call last):
File "<string>", line 2, in <module>
SystemError: RuntimeError: Dba.get_cluster: This function is not available through a session to an instance belonging to an unmanaged replication group
There isn't a lot of information about this error (0 docs) but I managed to find some in the mysql-shell repo:
https:/
void check_precondit
// ...
case GRInstanceType:
error +=
" to an instance belonging to an unmanaged replication "
break;
Unit tests also suggest that getCluster is not available for standalone instances:
https:/
//@# Dba_preconditio
// getCluster is not allowed on standalone instances
||Dba.getCluster: This function is not available through a session to an instance belonging to an unmanaged replication group
Based on the error logs from multiple units, I can see that the 4th unit left the group at some point which triggered the error since it was no longer a part of the group at that point:
mysql-innodb-
2020-07-
2020-07-
2020-07-
2020-07-
2020-07-
2020-07-
2020-07-
2020-07-
mysql-innodb-
2020-07-
2020-07-
Either way, we need to handle status checks better in that regard as this does not help a lot:
mysql-innodb-
tags: | added: scaleback |
Changed in charm-mysql-innodb-cluster: | |
importance: | High → Medium |
Changed in charm-deployment-guide: | |
status: | New → In Progress |
Changed in charm-deployment-guide: | |
assignee: | nobody → Peter Matulis (petermatulis) |
importance: | Undecided → Medium |
affects: | charm-deployment-guide → charm-guide |
This seems to be still an issue. Hybrid512 is seeing this consistently on fresh deployments, both with rev. 3 (20.10) and rev. 5 (21.01) of charm-mysql- innodb- cluster.