Bug #108068 Improve logging of error "The recovery user name for instance ...."
Submitted: 4 Aug 2022 8:49 Modified: 4 Aug 2022 9:57
Reporter: Simon Mudd (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Document Store: MySQL Shell Severity:S4 (Feature request)
Version:8.0.29 OS:Any
Assigned to: CPU Architecture:Any
Tags: windmill

[4 Aug 2022 8:49] Simon Mudd
Description:
Attempting to removing a 8.0.29 server from a GR cluster gives this error:

INFO [MySQL shell]: {'note': "The recovery user name for instance 'host.example.com:3306' does not match the expected format for users created automatically by InnoDB Cluster. Skipping its removal.\n"}

The mysql-shell is also 8.0.29.

- We're missing the username that is not "liked" by the shell.
- It's also not clear why this error is being given as I do not believe that our configuration is deliberately using wrong usernames.
- I believe there was a change in the username handling.  A pointer to the docs here might be helpful.

How to repeat:
Remove a server from the group with the shell.
See this message.

Suggested fix:
Improve the error reporting to clarify the points raised in the description.
[4 Aug 2022 8:53] Simon Mudd
Also the shell does not produce error codes? Should it?

It makes it much easier to report an error number and while I guess you do not intend to translate error messages into multiple languages as was done with MySQL for automation to handle errors when invoking the shell it's much better to use an error code that rely on the exact error message.
[4 Aug 2022 9:23] MySQL Verification Team
Hello Simon,

Thank you for the feature request!

regards,
Umesh
[4 Aug 2022 9:57] Simon Mudd
It looks like this was fixed by doing a cluster rescan().

e.g. 
> c = dba.get_cluster()
> c.rescan()

However, more tolerance and better logging would seem to be good here.