mysql8 db images: Test `mysqladmin ping` when waiting for mysqld startup

Created on 5 August 2024, 5 months ago
Updated 2 September 2024, 4 months ago

Problem/Motivation

Have observed a race condition in which the startup script sees mysqld port open, before DB logs it is ready to accept connections. Script tries to create users before DB is ready, which fails and causes subsequent tests to fail.

Goal is that this will prevent creating users until DB is ready for these operations.

Steps to reproduce

This is a race condition and not reliably reproduced, I have only reproduced with mysql-8 image. Both the mysql 8 + 8.4 images had a change to use `echo > /dev/tcp/localhost/3306;`. I am unsure if this problem exists on images that test port with `netcat -vz localhost 3306;`.

Proposed resolution

Test DB with `mysqladmin ping`

Remaining tasks

Change mysql 8 images to use `mysqladmin ping` and test.

πŸ› Bug report
Status

Fixed

Component

Database Containers

Created by

πŸ‡ΊπŸ‡ΈUnited States MaxWhitehead

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024