Bug #100875 MysqlCluster under Docker shows [unhealthy]
Submitted: 17 Sep 2020 10:00 Modified: 26 Oct 2022 11:59
Reporter: Matthias Radde Email Updates:
Status: Verified Impact on me:
Category:MySQL Package Repos Severity:S3 (Non-critical)
Version:7.6, 8.0.25 OS:Debian
Assigned to: CPU Architecture:x86

[17 Sep 2020 10:00] Matthias Radde
created a simple MySQLCluster using Docker according to https://hub.docker.com/r/mysql/mysql-cluster
using "docker ps -a" to display status of docker containers
container "mysql1" shows "(healthy)" as status
containers "management1", "ndb1" and "ndb2" show "(unhealthy)" as status.
As some monitoring-software checks this status we get alerted for these containers (which in fact/besides this status are running as expected).

Checked this on Debian but I'm sure it will happen on other OS, too.

How to repeat:
simply follow the steps at https://hub.docker.com/r/mysql/mysql-cluster
wait for a minute or so (until status switches from "(starting)" to "(healthy)" or "(unhealthy)")
run "docker ps -a" to display container's status

Suggested fix:
Within "/entrypoint.sh" a "touch /mysql-init-complete" is only done for the container running "mysqld"
In addition the next condition in "healthcheck.sh" will fail, as the "/healtcheck.cnf" is missing, too.
So maybe a complete different "/healthcheck.sh" is needed for the NDB- and the management-containers? Maybe created in the "/entrypoint.sh"?
[21 May 2021 11:47] MySQL Verification Team
Hello Matthias Radde,

Thank you for the report and feedback.

[11 Feb 2022 21:52] Jose Ramirez
Posted by developer:
Redirecting to correct team.