MySQL on M1: use architecture-specific image, and health check for readiness detection #25878
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Partial resolution of #25428. See also discussion in #25648. This PR makes modules with docker-maven-plugin tests which use mysql able to run cleanly when
-Dstart-containers
is set on M1 with podman. There are other modules with ‘mysql’ in the name, but they use mariadb under the covers, so were dealt with in another commit.Like with #25830, this will change the default dev services image, but only when quarkus is built on M1. That’s not ideal in either direction - in the unlikely event that we built on M1 and then released to all platforms, the mysql name would be wrong. For normal releases, the dev services image still won’t work out of the box on M1. However, I think that’s ok for the moment, since the alternative is some very complex architecture-detecting system for default dev services images, which kind of defeats the point of what containers are supposed to help with.
To test
With
-dtest-containers
I still see failures, but they’re outside the scope of this PR.What’s changed
Like for DB2, I got a 404 if I tried to pull the image without explicitly specifying the architecture. However, just specifying the architecture wasn’t enough for the container to start. It would work on the command line with podman, but not in fabric8 with podman.
Following https://www.emmanuelgautier.com/blog/mysql-docker-arm-m1 and https://stackoverflow.com/questions/65456814/docker-apple-silicon-m1-preview-mysql-no-matching-manifest-for-linux-arm64-v8 I instead changed the image name to one with better behaviour on arm. Hopefully this tuning can be removed as M1 support matures.
I also switched to a health check for startup detection.