[MDEV-31550] "mariadb-admin ping" exits zero when authentication fails Created: 2023-06-26 Updated: 2023-06-26 Resolved: 2023-06-26 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Scripts & Clients |
| Fix Version/s: | N/A |
| Type: | Task | Priority: | Minor |
| Reporter: | Brian Kroth | Assignee: | Sergei Golubchik |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
1. Start a server from the latest docker image using a non-empty password:
2. Attempt to run a simple health check on it using mariadb-ping:
Notice that authentication fails, but the exit code is 0 (success). 3. Do the same thing, but with a status check instead:
Notice that the authentication fails, so the exit code is 1 (fail). I believe both should fail with a non-zero code upon authentication failure. Without this, docker containers, or other setups that rely on "mysqladmin ping" may incorrectly succeed if the server is overwhelmed or otherwise having trouble succeeding with authentication requests. |
| Comments |
| Comment by Daniel Black [ 2023-06-26 ] | |||||||||||||
|
Also see: https://mariadb.org/mariadb-server-docker-official-images-healthcheck-without-mysqladmin/ Why mysqladmin ping/mariadb-admin ping is incorrect as a healthcheck. With https://github.com/docker-library/official-images/pull/14936 very soon it should be simpiler
| |||||||||||||
| Comment by Sergei Golubchik [ 2023-06-26 ] | |||||||||||||
|
This is intentional and documented behavior. See https://mariadb.com/kb/en/mariadb-admin/
|