sclorg / mysql-container

MySQL container images based on Red Hat Software Collections and intended for OpenShift and general usage. Users can choose between Red Hat Enterprise Linux, Fedora, and CentOS based images.
http://softwarecollections.org
Apache License 2.0
129 stars 201 forks source link

Support mysql 8.4 on CentOS Stream 10 #376

Closed phracek closed 2 months ago

phracek commented 3 months ago

This pull request adds support for testing Mysql 8.4 on CentOS Stream 10. The rest of operation systems is skipped for now.

The pull request is separated into several commit for better review.

1) Moving sources from 8.0 -> 8.4 2) Copy sources from 8.4 -> 8.0 3) Add some changes in 8.4 4) Update Documentation and Makefile with support 8.4 5) Some fixes caught by testing

phracek commented 3 months ago

Dockerfile diffs.

Difference Dockerfile.c9s against Dockerfile.c10s:

$ diff -u Dockerfile.c9s Dockerfile.c10s
--- Dockerfile.c9s  2024-08-08 09:40:02
+++ Dockerfile.c10s 2024-08-08 09:32:14
@@ -1,4 +1,4 @@
-FROM quay.io/sclorg/s2i-core-c9s:c9s
+FROM quay.io/sclorg/s2i-core-c10s:c10s

 # MySQL image for OpenShift.
 #
@@ -10,13 +10,13 @@
 #  * $MYSQL_DATABASE - Name of the database to create
 #  * $MYSQL_ROOT_PASSWORD (Optional) - Password for the 'root' MySQL account

-ENV MYSQL_VERSION=8.0 \
-    MYSQL_SHORT_VERSION=80 \
+ENV MYSQL_VERSION=8.4 \
+    MYSQL_SHORT_VERSION=84 \
     APP_DATA=/opt/app-root/src \
     HOME=/var/lib/mysql \
     NAME=mysql

-ENV SUMMARY="MySQL 8.0 SQL database server" \
+ENV SUMMARY="MySQL 8.4 SQL database server" \
     DESCRIPTION="MySQL is a multi-user, multi-threaded SQL database server. The container \
 image provides a containerized packaging of the MySQL mysqld daemon and client application. \
 The mysqld server daemon accepts connections from clients and provides access to content from \
@@ -29,10 +29,10 @@
       io.openshift.expose-services="3306:mysql" \
       io.openshift.tags="database,mysql,mysql$MYSQL_SHORT_VERSION,mysql-$MYSQL_SHORT_VERSION" \
       com.redhat.component="$NAME-$MYSQL_SHORT_VERSION-container" \
-      name="sclorg/$NAME-$MYSQL_SHORT_VERSION-c9s" \
+      name="sclorg/$NAME-$MYSQL_SHORT_VERSION-c10s" \
       version="1" \
       com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#rhel" \
-      usage="podman run -d -e MYSQL_USER=user -e MYSQL_PASSWORD=pass -e MYSQL_DATABASE=db -p 3306:3306 quay.io/sclorg/$NAME-$MYSQL_SHORT_VERSION-c9s:c9s" \
+      usage="podman run -d -e MYSQL_USER=user -e MYSQL_PASSWORD=pass -e MYSQL_DATABASE=db -p 3306:3306 quay.io/sclorg/$NAME-$MYSQL_SHORT_VERSION-c10s:c10s" \
       maintainer="SoftwareCollections.org <sclorg@redhat.com>"

 EXPOSE 3306
@@ -51,9 +51,9 @@
 ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/mysql \
     MYSQL_PREFIX=/usr

-COPY 8.0/root-common /
-COPY 8.0/s2i-common/bin/ $STI_SCRIPTS_PATH
-COPY 8.0/root /
+COPY 8.4/root-common /
+COPY 8.4/s2i-common/bin/ $STI_SCRIPTS_PATH
+COPY 8.4/root /

 # Hard links are not supported in Testing Farm approach during sync to guest
 # operation system. Therefore tests are failing on error

Differences between Dockerfile.fedora against Dockerfile.c10s

$ diff -u Dockerfile.fedora Dockerfile.c10s
--- Dockerfile.fedora   2024-08-08 08:36:43
+++ Dockerfile.c10s 2024-08-08 09:32:14
@@ -1,4 +1,4 @@
-FROM quay.io/fedora/s2i-core:40
+FROM quay.io/sclorg/s2i-core-c10s:c10s

 # MySQL image for OpenShift.
 #
@@ -13,37 +13,34 @@
 ENV MYSQL_VERSION=8.4 \
     MYSQL_SHORT_VERSION=84 \
     APP_DATA=/opt/app-root/src \
-    HOME=/var/lib/mysql
+    HOME=/var/lib/mysql \
+    NAME=mysql

-ENV SUMMARY="MySQL $MYSQL_VERSION SQL database server" \
+ENV SUMMARY="MySQL 8.4 SQL database server" \
     DESCRIPTION="MySQL is a multi-user, multi-threaded SQL database server. The container \
 image provides a containerized packaging of the MySQL mysqld daemon and client application. \
 The mysqld server daemon accepts connections from clients and provides access to content from \
-MySQL databases on behalf of the clients." \
-    NAME=mysql
+MySQL databases on behalf of the clients."

 LABEL summary="$SUMMARY" \
       description="$DESCRIPTION" \
       io.k8s.description="$DESCRIPTION" \
       io.k8s.display-name="MySQL $MYSQL_VERSION" \
       io.openshift.expose-services="3306:mysql" \
-      io.openshift.tags="database,mysql,mysql$MYSQL_SHORT_VERSION" \
-      com.redhat.component="$NAME" \
-      name="fedora/$NAME-$MYSQL_SHORT_VERSION" \
-      version="$MYSQL_VERSION" \
-      usage="docker run -d -e MYSQL_USER=user -e MYSQL_PASSWORD=pass -e MYSQL_DATABASE=db -p 3306:3306 quay.io/fedora/$NAME-$MYSQL_SHORT_VERSION" \
+      io.openshift.tags="database,mysql,mysql$MYSQL_SHORT_VERSION,mysql-$MYSQL_SHORT_VERSION" \
+      com.redhat.component="$NAME-$MYSQL_SHORT_VERSION-container" \
+      name="sclorg/$NAME-$MYSQL_SHORT_VERSION-c10s" \
+      version="1" \
+      com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#rhel" \
+      usage="podman run -d -e MYSQL_USER=user -e MYSQL_PASSWORD=pass -e MYSQL_DATABASE=db -p 3306:3306 quay.io/sclorg/$NAME-$MYSQL_SHORT_VERSION-c10s:c10s" \
       maintainer="SoftwareCollections.org <sclorg@redhat.com>"

 EXPOSE 3306

-# On Fedora, we fake missing python binary. In case user installs the python2
-# in the container, this hack will be removed by installing /usr/bin/python from RPM.
-RUN ln -s /usr/bin/python3 /usr/bin/python
-
 # This image must forever use UID 27 for mysql user so our volumes are
 # safe in the future. This should *never* change, the last test is there
 # to make sure of that.
-RUN INSTALL_PKGS="rsync tar gettext hostname bind-utils groff-base community-mysql-server policycoreutils" && \
+RUN INSTALL_PKGS="policycoreutils rsync tar gettext hostname bind-utils groff-base mysql-server" && \
     dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
     rpm -V $INSTALL_PKGS && \
     dnf -y clean all --enablerepo='*' && \
@@ -54,9 +51,9 @@
 ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/mysql \
     MYSQL_PREFIX=/usr

-COPY 8.0/root-common /
-COPY 8.0/s2i-common/bin/ $STI_SCRIPTS_PATH
-COPY 8.0/root /
+COPY 8.4/root-common /
+COPY 8.4/s2i-common/bin/ $STI_SCRIPTS_PATH
+COPY 8.4/root /

 # Hard links are not supported in Testing Farm approach during sync to guest
 # operation system. Therefore tests are failing on error

Differences between Dockerfile.rhel9 and Dockerfile.c10s

$ diff -u Dockerfile.rhel9 Dockerfile.c10s
--- Dockerfile.rhel9    2024-08-08 09:43:05
+++ Dockerfile.c10s 2024-08-08 09:32:14
@@ -1,4 +1,4 @@
-FROM ubi9/s2i-core
+FROM quay.io/sclorg/s2i-core-c10s:c10s

 # MySQL image for OpenShift.
 #
@@ -10,13 +10,13 @@
 #  * $MYSQL_DATABASE - Name of the database to create
 #  * $MYSQL_ROOT_PASSWORD (Optional) - Password for the 'root' MySQL account

-ENV MYSQL_VERSION=8.0 \
-    MYSQL_SHORT_VERSION=80 \
+ENV MYSQL_VERSION=8.4 \
+    MYSQL_SHORT_VERSION=84 \
     APP_DATA=/opt/app-root/src \
     HOME=/var/lib/mysql \
     NAME=mysql

-ENV SUMMARY="MySQL 8.0 SQL database server" \
+ENV SUMMARY="MySQL 8.4 SQL database server" \
     DESCRIPTION="MySQL is a multi-user, multi-threaded SQL database server. The container \
 image provides a containerized packaging of the MySQL mysqld daemon and client application. \
 The mysqld server daemon accepts connections from clients and provides access to content from \
@@ -29,10 +29,10 @@
       io.openshift.expose-services="3306:mysql" \
       io.openshift.tags="database,mysql,mysql$MYSQL_SHORT_VERSION,mysql-$MYSQL_SHORT_VERSION" \
       com.redhat.component="$NAME-$MYSQL_SHORT_VERSION-container" \
-      name="rhel9/$NAME-$MYSQL_SHORT_VERSION" \
+      name="sclorg/$NAME-$MYSQL_SHORT_VERSION-c10s" \
       version="1" \
       com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#rhel" \
-      usage="podman run -d -e MYSQL_USER=user -e MYSQL_PASSWORD=pass -e MYSQL_DATABASE=db -p 3306:3306 rhel9/$NAME-$MYSQL_SHORT_VERSION" \
+      usage="podman run -d -e MYSQL_USER=user -e MYSQL_PASSWORD=pass -e MYSQL_DATABASE=db -p 3306:3306 quay.io/sclorg/$NAME-$MYSQL_SHORT_VERSION-c10s:c10s" \
       maintainer="SoftwareCollections.org <sclorg@redhat.com>"

 EXPOSE 3306
@@ -51,9 +51,9 @@
 ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/mysql \
     MYSQL_PREFIX=/usr

-COPY 8.0/root-common /
-COPY 8.0/s2i-common/bin/ $STI_SCRIPTS_PATH
-COPY 8.0/root /
+COPY 8.4/root-common /
+COPY 8.4/s2i-common/bin/ $STI_SCRIPTS_PATH
+COPY 8.4/root /

 # Hard links are not supported in Testing Farm approach during sync to guest
 # operation system. Therefore tests are failing on error
phracek commented 3 months ago

@hhorak @FaramosCZ I have caught some errors. What could be a problem?

Running test run_configuration_tests (starting at 2024-08-08 03:46:38-04:00) ...
-----------------------------------------------
  Testing image configuration settings
    Created container cdd1c3664fe8cba8b06ece892e89c913d17bdb2c00bd8f354b1b50764283867d
  Testing MySQL connection to 10.88.1.191...
    Trying to connect...... FAIL
  Giving up: Failed to connect.
Error: no such object: "config_test"
  Container finised with exit code .
Logs:
=> sourcing 20-validate-variables.sh ...
=> sourcing 25-validate-replication-variables.sh ...
=> sourcing 30-base-config.sh ...
---> 03:46:39     Processing basic MySQL configuration files ...
=> sourcing 60-replication-config.sh ...
=> sourcing 70-s2i-config.sh ...
---> 03:46:39     Processing additional arbitrary  MySQL configuration provided by s2i ...
=> sourcing 20-default-authentication-plugin.cnf ...
=> sourcing 40-paas.cnf ...
=> sourcing 50-my-tuning.cnf ...
---> 03:46:39     Initializing database ...
---> 03:46:39     Running /usr/libexec/mysqld --initialize --datadir=/var/lib/mysql/data
---> 03:46:43     Starting MySQL server with disabled networking ...
---> 03:46:44     Waiting for MySQL to start ...
2024-08-08T07:46:43.963764Z 0 [System] [MY-015015] [Server] MySQL Server - start.
2024-08-08T07:46:44.460972Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
2024-08-08T07:46:44.475809Z 0 [System] [MY-010116] [Server] /usr/libexec/mysqld (mysqld 8.4.0) starting as process 66
2024-08-08T07:46:44.493022Z 0 [Warning] [MY-013907] [InnoDB] Deprecated configuration parameters innodb_log_file_size and/or innodb_log_files_in_group have been used to compute innodb_redo_log_capacity=8388608. Please use innodb_redo_log_capacity instead.
2024-08-08T07:46:44.496566Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
---> 03:46:45     Waiting for MySQL to start ...
2024-08-08T07:46:45.196062Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
mysqld: Table 'mysql.plugin' doesn't exist
2024-08-08T07:46:45.427977Z 0 [ERROR] [MY-010735] [Server] Could not open the mysql.plugin table. Please perform the MySQL upgrade procedure.
2024-08-08T07:46:45.428440Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-08-08T07:46:45.428747Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-08-08T07:46:45.429054Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-08-08T07:46:45.429500Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-08-08T07:46:45.429774Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-08-08T07:46:45.430067Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-08-08T07:46:45.430347Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-08-08T07:46:45.543453Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2024-08-08T07:46:45.596420Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2024-08-08T07:46:45.604373Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2024-08-08T07:46:45.604404Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2024-08-08T07:46:45.608615Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-08-08T07:46:45.608996Z 0 [ERROR] [MY-013129] [Server] A message intended for a client cannot be sent there as no client-session is attached. Therefore, we're sending the information to the error-log instead: MY-001146 - Table 'mysql.component' doesn't exist
2024-08-08T07:46:45.609033Z 0 [Warning] [MY-013129] [Server] A message intended for a client cannot be sent there as no client-session is attached. Therefore, we're sending the information to the error-log instead: MY-003543 - The mysql.component table is missing or has an incorrect definition.
2024-08-08T07:46:45.609139Z 0 [ERROR] [MY-000067] [Server] unknown variable 'default_authentication_plugin=mysql_native_password'.
2024-08-08T07:46:45.609749Z 0 [ERROR] [MY-010119] [Server] Aborting
2024-08-08T07:46:46.978891Z 0 [System] [MY-010910] [Server] /usr/libexec/mysqld: Shutdown complete (mysqld 8.4.0)  Source distribution.
2024-08-08T07:46:46.978914Z 0 [System] [MY-015016] [Server] MySQL Server - end.
---> 03:46:46     Waiting for MySQL to start ...
Test for image 'quay.io/sclorg/mysql-84-c10s:1' FAILED (exit code: 1)
Error: can only create exec sessions on running containers: container state improper
Error: can only create exec sessions on running containers: container state improper
FAIL: option 'lower_case_table_names' should have value '1', but it wasn't found in any of the configuration files ():

Test for image 'quay.io/sclorg/mysql-84-c10s:1' FAILED (exit code: 1)
Error: can only create exec sessions on running containers: container state improper
FAIL: option 'general_log' should have value '1', but it wasn't found in any of the configuration files ():

Test for image 'quay.io/sclorg/mysql-84-c10s:1' FAILED (exit code: 1)
Error: can only create exec sessions on running containers: container state improper
FAIL: option 'max_connections' should have value '1337', but it wasn't found in any of the configuration files ():

Test for image 'quay.io/sclorg/mysql-84-c10s:1' FAILED (exit code: 1)
Error: can only create exec sessions on running containers: container state improper
FAIL: option 'ft_min_word_len' should have value '8', but it wasn't found in any of the configuration files ():

Test for image 'quay.io/sclorg/mysql-84-c10s:1' FAILED (exit code: 1)
Error: can only create exec sessions on running containers: container state improper
FAIL: option 'ft_max_word_len' should have value '15', but it wasn't found in any of the configuration files ():

Test for image 'quay.io/sclorg/mysql-84-c10s:1' FAILED (exit code: 1)
Error: can only create exec sessions on running containers: container state improper
FAIL: option 'max_allowed_packet' should have value '10M', but it wasn't found in any of the configuration files ():

Test for image 'quay.io/sclorg/mysql-84-c10s:1' FAILED (exit code: 1)
Error: can only create exec sessions on running containers: container state improper
FAIL: option 'table_open_cache' should have value '100', but it wasn't found in any of the configuration files ():

Test for image 'quay.io/sclorg/mysql-84-c10s:1' FAILED (exit code: 1)
Error: can only create exec sessions on running containers: container state improper
FAIL: option 'sort_buffer_size' should have value '256K', but it wasn't found in any of the configuration files ():

Test for image 'quay.io/sclorg/mysql-84-c10s:1' FAILED (exit code: 1)
Error: can only create exec sessions on running containers: container state improper
FAIL: option 'key_buffer_size' should have value '16M', but it wasn't found in any of the configuration files ():

Test for image 'quay.io/sclorg/mysql-84-c10s:1' FAILED (exit code: 1)
Error: can only create exec sessions on running containers: container state improper
FAIL: option 'read_buffer_size' should have value '16M', but it wasn't found in any of the configuration files ():

Test for image 'quay.io/sclorg/mysql-84-c10s:1' FAILED (exit code: 1)
Error: can only create exec sessions on running containers: container state improper
FAIL: option 'innodb_buffer_pool_size' should have value '16M', but it wasn't found in any of the configuration files ():

Test for image 'quay.io/sclorg/mysql-84-c10s:1' FAILED (exit code: 1)
Error: can only create exec sessions on running containers: container state improper
FAIL: option 'innodb_log_file_size' should have value '4M', but it wasn't found in any of the configuration files ():

Test for image 'quay.io/sclorg/mysql-84-c10s:1' FAILED (exit code: 1)
Error: can only create exec sessions on running containers: container state improper
FAIL: option 'innodb_log_buffer_size' should have value '4M', but it wasn't found in any of the configuration files ():

Test for image 'quay.io/sclorg/mysql-84-c10s:1' FAILED (exit code: 1)
Error: can only create exec sessions on running containers: container state improper
FAIL: option 'default_authentication_plugin' should have value 'mysql_native_password', but it wasn't found in any of the configuration files ():

Test for image 'quay.io/sclorg/mysql-84-c10s:1' FAILED (exit code: 1)
  Done!
  Testing image auto-calculated configuration settings
    Created container 3e2f6eb71c2b388e11a0f931194a1e1ace8f702d7623b4dd2f9dd6214939573a
  Testing MySQL connection to 10.88.1.195...
    Trying to connect..... FAIL
  Giving up: Failed to connect.
Error: no such object: "dynamic_config_test"
  Container finised with exit code .
Logs:
=> sourcing 20-validate-variables.sh ...
=> sourcing 25-validate-replication-variables.sh ...
=> sourcing 30-base-config.sh ...
---> 03:46:52     Processing basic MySQL configuration files ...
=> sourcing 60-replication-config.sh ...
=> sourcing 70-s2i-config.sh ...
---> 03:46:52     Processing additional arbitrary  MySQL configuration provided by s2i ...
=> sourcing 20-default-authentication-plugin.cnf ...
=> sourcing 40-paas.cnf ...
=> sourcing 50-my-tuning.cnf ...
---> 03:46:52     Initializing database ...
---> 03:46:52     Running /usr/libexec/mysqld --initialize --datadir=/var/lib/mysql/data
---> 03:46:56     Starting MySQL server with disabled networking ...
---> 03:46:56     Waiting for MySQL to start ...
2024-08-08T07:46:56.692246Z 0 [System] [MY-015015] [Server] MySQL Server - start.
2024-08-08T07:46:56.998197Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
2024-08-08T07:46:57.000976Z 0 [System] [MY-010116] [Server] /usr/libexec/mysqld (mysqld 8.4.0) starting as process 66
2024-08-08T07:46:57.015170Z 0 [Warning] [MY-013907] [InnoDB] Deprecated configuration parameters innodb_log_file_size and/or innodb_log_files_in_group have been used to compute innodb_redo_log_capacity=159383552. Please use innodb_redo_log_capacity instead.
2024-08-08T07:46:57.016940Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
---> 03:46:57     Waiting for MySQL to start ...
2024-08-08T07:46:58.422704Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
mysqld: Table 'mysql.plugin' doesn't exist
2024-08-08T07:46:58.642151Z 0 [ERROR] [MY-010735] [Server] Could not open the mysql.plugin table. Please perform the MySQL upgrade procedure.
2024-08-08T07:46:58.642383Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-08-08T07:46:58.642540Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-08-08T07:46:58.642691Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-08-08T07:46:58.642924Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-08-08T07:46:58.643036Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-08-08T07:46:58.643142Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-08-08T07:46:58.643243Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-08-08T07:46:58.742039Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2024-08-08T07:46:58.774629Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2024-08-08T07:46:58.781066Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2024-08-08T07:46:58.781098Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2024-08-08T07:46:58.784915Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-08-08T07:46:58.785101Z 0 [ERROR] [MY-013129] [Server] A message intended for a client cannot be sent there as no client-session is attached. Therefore, we're sending the information to the error-log instead: MY-001146 - Table 'mysql.component' doesn't exist
2024-08-08T07:46:58.785127Z 0 [Warning] [MY-013129] [Server] A message intended for a client cannot be sent there as no client-session is attached. Therefore, we're sending the information to the error-log instead: MY-003543 - The mysql.component table is missing or has an incorrect definition.
2024-08-08T07:46:58.785218Z 0 [ERROR] [MY-000067] [Server] unknown variable 'default_authentication_plugin=caching_sha2_password'.
2024-08-08T07:46:58.785832Z 0 [ERROR] [MY-010119] [Server] Aborting
2024-08-08T07:47:00.155198Z 0 [System] [MY-010910] [Server] /usr/libexec/mysqld: Shutdown complete (mysqld 8.4.0)  Source distribution.
2024-08-08T07:47:00.155233Z 0 [System] [MY-015016] [Server] MySQL Server - end.
---> 03:47:00     Waiting for MySQL to start ...
Test for image 'quay.io/sclorg/mysql-84-c10s:1' FAILED (exit code: 1)
Error: can only create exec sessions on running containers: container state improper
Error: can only create exec sessions on running containers: container state improper
FAIL: option 'key_buffer_size' should have value '51M', but it wasn't found in any of the configuration files ():

Test for image 'quay.io/sclorg/mysql-84-c10s:1' FAILED (exit code: 1)
Error: can only create exec sessions on running containers: container state improper
FAIL: option 'read_buffer_size' should have value '25M', but it wasn't found in any of the configuration files ():

Test for image 'quay.io/sclorg/mysql-84-c10s:1' FAILED (exit code: 1)
Error: can only create exec sessions on running containers: container state improper
FAIL: option 'innodb_buffer_pool_size' should have value '256M', but it wasn't found in any of the configuration files ():

Test for image 'quay.io/sclorg/mysql-84-c10s:1' FAILED (exit code: 1)
Error: can only create exec sessions on running containers: container state improper
FAIL: option 'innodb_log_file_size' should have value '76M', but it wasn't found in any of the configuration files ():

Test for image 'quay.io/sclorg/mysql-84-c10s:1' FAILED (exit code: 1)
Error: can only create exec sessions on running containers: container state improper
FAIL: option 'innodb_log_buffer_size' should have value '76M', but it wasn't found in any of the configuration files ():

Test for image 'quay.io/sclorg/mysql-84-c10s:1' FAILED (exit code: 1)
Error: can only create exec sessions on running containers: container state improper
FAIL: option 'default_authentication_plugin' should have value 'caching_sha2_password', but it wasn't found in any of the configuration files ():

Test for image 'quay.io/sclorg/mysql-84-c10s:1' FAILED (exit code: 1)
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
  Success!
Tests finished with EXIT=0
FaramosCZ commented 3 months ago

Weird.

The basic setup & usage works without any issue in VM.

(1) Is the problem reproducible?

(2) Can I get a result of (or an equivalent of) rpm -qa | grep -i -e "maria" -e "mysql" from inside of the container just before the sourcing 50-my-tuning.cnf step ?

hhorak commented 3 months ago

There seems to be something different when it comes to datadir initialization and steps we do after it in the container, as it starts to fail pretty soon:

---> 08:45:46     Waiting for MySQL to start ...
2024-08-08T12:45:46.181356Z 0 [System] [MY-015015] [Server] MySQL Server - start.
2024-08-08T12:45:46.479286Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
2024-08-08T12:45:46.481996Z 0 [System] [MY-010116] [Server] /usr/libexec/mysqld (mysqld 8.4.0) starting as process 66
2024-08-08T12:45:46.500268Z 0 [Warning] [MY-013907] [InnoDB] Deprecated configuration parameters innodb_log_file_size and/or innodb_log_files_in_group have been used to compute innodb_redo_log_capacity=16777216. Please use innodb_redo_log_capacity instead.
2024-08-08T12:45:46.502981Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2024-08-08T12:45:46.776504Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
mysqld: Table 'mysql.plugin' doesn't exist
2024-08-08T12:45:46.953704Z 0 [ERROR] [MY-010735] [Server] Could not open the mysql.plugin table. Please perform the MySQL upgrade procedure.

The issues after are symptoms of not having the daemon started properly. Looking...

hhorak commented 3 months ago

For the reproducer, this is something that might get to the same error:

podman build -t testimg -f 8.4/Dockerfile.c10s .
podman run -ti --rm -e MYSQL_ROOT_PASSWORD=test testimg bash
bash-5.2$ run-mysqld
hhorak commented 3 months ago

There are more incompatible changes in 8.4 (https://dev.mysql.com/doc/refman/8.4/en/mysql-nutshell.html) that we'll need to address in the container, so far:

hhorak commented 2 months ago

[test]

phracek commented 2 months ago

@FaramosCZ PTAL. Your review is mandatory

FaramosCZ commented 2 months ago

Otherwise LGTM

phracek commented 2 months ago

Let's get test it. As soon as tests PASSWED we can merge it. [test]

phracek commented 2 months ago

[test-openshift][test-openshift-pytest]

hhorak commented 1 month ago

@phracek thanks for taking care for the left-over changes, I was just about to finish it and saw you did it for me, thanks a lot!!