Files
datastore/tests/integration/compose/docker_compose_mysql_8_0.yml
Alexey MilovidovandClaude Opus 4.6 667d982c85 Fix sporadic MySQL 8 container startup failure in integration tests
MySQL 8 sporadically fails during data directory initialization with
"Could not generate RSA Private/Public key pair" in resource-constrained
CI environments (ARM, container-in-container). These RSA keys are used
for `sha256_password` / `caching_sha2_password` authentication plugins,
which these tests don't use (`mysql_native_password` is the default).

The fix provides pre-generated RSA keys to the MySQL 8 container and
disables auto-generation, eliminating the sporadic failure.

Failure: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=96238&sha=856f7c28ba3cf10f393598a6f629af2af41de311&name_0=PR&name_1=Integration%20tests%20%28arm_binary%2C%20distributed%20plan%2C%203%2F4%29

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-02-06 23:29:29 +01:00

39 lines
1.6 KiB
YAML

services:
mysql80:
image: clickhouse/test-mysql80:${DOCKER_TEST_MYSQL80_TAG:-latest}
stop_grace_period: 5s
restart: always
environment:
MYSQL_ROOT_PASSWORD: ClickHouse_MySQL_P@ssw0rd
MYSQL_ROOT_HOST: ${MYSQL8_ROOT_HOST}
DATADIR: /var/log/mysql/
expose:
- ${MYSQL8_PORT:-3306}
command: --server_id=100 --log-bin='mysql-bin-1.log'
--default_authentication_plugin='mysql_native_password'
--default-time-zone='+3:00' --gtid-mode="ON"
--enforce-gtid-consistency
--log-error-verbosity=3
--log-error=/var/log/mysql/error.log
--general-log=ON
--general-log-file=/var/log/mysql/general.log
--ssl-ca=/etc/mysql/certs/ca.pem
--ssl-cert=/etc/mysql/certs/server-cert.pem
--ssl-key=/etc/mysql/certs/server-key.pem
--sha256_password_auto_generate_rsa_keys=OFF
--caching_sha2_password_auto_generate_rsa_keys=OFF
--sha256_password_private_key_path=/etc/mysql/certs/private_key.pem
--sha256_password_public_key_path=/etc/mysql/certs/public_key.pem
--caching_sha2_password_private_key_path=/etc/mysql/certs/private_key.pem
--caching_sha2_password_public_key_path=/etc/mysql/certs/public_key.pem
volumes:
- type: ${MYSQL8_LOGS_FS:-tmpfs}
source: ${MYSQL8_LOGS:-}
target: /var/log/mysql/
- ../helpers/mysql_cert:/etc/mysql/certs
user: ${MYSQL8_DOCKER_USER}
cap_add:
- NET_ADMIN
privileged: true
cpus: 3