CSNAPC-8104: MySQL instance discovery fails on Linux when multiple instances are configured to run on the same port
Issue
- When multiple MySQL instances running on same port(default 3306),
- During shallow discovery, SnapCenter (SC) executes the command:
export LANG=C; ss -nltp | grep mysqld
to list the running instances on the plugin host.
- We then creates a UID for each instance by prefixing the port number with "mysqld_", resulting in "mysqld_3306" for all instances since they all use port 3306. Later in the code, a duplicate UID check is performed, and if a resource with the same UID is found, discovery fails with the error: "Auto Discovery for plug-in [MySQL] failed with error [The plugin returned a duplicate UID: mysqld_3306 .] and exit code [-1]. Exiting."