Bug #103761 AdminAPI shows conflicting results when it fails to change the primary instance
| Submitted: | 20 May 2021 17:16 | Modified: | 22 May 2021 14:10 |
|---|---|---|---|
| Reporter: | Keith Lammers | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | Shell AdminAPI InnoDB Cluster / ReplicaSet | Severity: | S3 (Non-critical) |
| Version: | 8.0.25 | OS: | Any |
| Assigned to: | CPU Architecture: | Any |
[22 May 2021 14:10]
MySQL Verification Team
Hello Keith, Thank you for the report and feedback. regards, Umesh
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.049 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
Description: Worked with Miguel to confirm this bug. When using cluster.setPrimaryInstance fails to change the primary, MySQL Shell returns conflicting information: cluster.setPrimaryInstance('instance02') Setting instance 'instance02' as the primary instance of cluster 'cluster01'... Instance 'instance02:3306' remains SECONDARY. Instance 'instance03:3306' remains SECONDARY. Instance 'instance01:3306' remains PRIMARY. The instance 'instance02' was successfully elected as primary. Notice that instance01 remains primary, but no error is reported, and the last line says that instance02 was successfully set as primary, even though it wasn't. How to repeat: * All cluster instances on 8.0.24 * instance01 is the primary R/W instance * Upgrade the R/O instances (instance02 and instance03) to 8.0.25 * Try to run cluster.setPrimaryInstance('instance02') and it will return the output above The primary failed to change because it's a lower version than the other instances, so that's fine. In this case the bug is only that MySQL Shell is presenting the wrong results of the command. Suggested fix: MySQL Shell should return a meaningful error, and also not show that the primary was changed successfully.