MariaDB 10.6 Container Fails On Initialization
Summary
MariaDB 10.6.3 container start fails due to SQL error when populating tz data. Also, config files are ignored due to incorrect permissions.
Steps to reproduce
Start new container using basic params: podman run --name mariadb -e MARIADB_ROOT_PASSWORD=changeme registry1.dso.mil/ironbank/opensource/mariadb/mariadb:10.6.3
What is the current bug behavior?
-
MariaDB outputs error messsage to log and container exits with code 1: ERROR 1064 (42000) at line 27: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'Offset``, Is_DST, Abbreviation) VALUES (@time_zone_id, 0, -968, 0, 'LMT') ,(...' at line 1
-
Log contains multiple warning messages about /etc/my.cnf: Warning: World-writable config file '/etc/my.cnf' is ignored
What is the expected correct behavior?
MariaDB initializes and is available for use from the mysql client
Relevant logs and/or screenshots
Startup log: 2021-12-30 19:29:00+00:00 [Note] [Entrypoint]: Database files initialized 2021-12-30 19:29:00+00:00 [Note] [Entrypoint]: Starting temporary server 2021-12-30 19:29:00+00:00 [Note] [Entrypoint]: Waiting for server startup Warning: World-writable config file '/etc/my.cnf' is ignored 2021-12-30 19:29:00 0 [Note] mysqld (mysqld 10.6.3-MariaDB) starting as process 69 ... 2021-12-30 19:29:00 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 2021-12-30 19:29:00 0 [Note] InnoDB: Number of pools: 1 2021-12-30 19:29:00 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions 2021-12-30 19:29:00 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts) 2021-12-30 19:29:00 0 [Note] InnoDB: Using Linux native AIO 2021-12-30 19:29:00 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728 2021-12-30 19:29:00 0 [Note] InnoDB: Completed initialization of buffer pool 2021-12-30 19:29:00 0 [Note] InnoDB: 128 rollback segments are active. 2021-12-30 19:29:00 0 [Note] InnoDB: Creating shared tablespace for temporary tables 2021-12-30 19:29:00 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... 2021-12-30 19:29:00 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB. 2021-12-30 19:29:00 0 [Note] InnoDB: 10.6.3 started; log sequence number 42173; transaction id 14 2021-12-30 19:29:00 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool 2021-12-30 19:29:00 0 [Note] Plugin 'FEEDBACK' is disabled. 2021-12-30 19:29:00 0 [Note] InnoDB: Buffer pool(s) load completed at 211230 19:29:00 2021-12-30 19:29:00 0 [Note] mysqld: ready for connections. Version: '10.6.3-MariaDB' socket: '/var/lib/mysql/mysql.sock' port: 0 MariaDB Server 2021-12-30 19:29:01+00:00 [Note] [Entrypoint]: Temporary server started. Warning: World-writable config file '/etc/my.cnf' is ignored Warning: World-writable config file '/etc/my.cnf' is ignored ERROR 1064 (42000) at line 27: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'Offset``, Is_DST, Abbreviation) VALUES (@time_zone_id, 0, -968, 0, 'LMT') ,(...' at line 1
Possible fixes
-
Fix for tz load error: https://repo1.dso.mil/dsop/opensource/mariadb/mariadb106/-/blob/master/scripts/docker-entrypoint.sh#L260 This line (268) should be removed, the quoting of Offset to handle the change referenced in MDEV-25556 is already handled in the mysql_tzinfo_to_sql script included in MariaDB 10.6.
-
Fix for my.cnf permission warnings: After copying the two config files at line 36 and 37 in the Dockerfile (https://repo1.dso.mil/dsop/opensource/mariadb/mariadb106/-/blob/master/Dockerfile#L37), the file permission for both files needs to be set to something like 444. It is currently set to 666.
Defintion of Done
-
Bug has been identified and corrected within the container, container starts normally