No longer able to install mysql-server package in Ubuntu 22.04 container on zfs

I recently encountered an issue where the new version of the mysql-server package (8.0.30-0ubuntu0.22.04.1) will not install in an Ubuntu 22.04 container. I Tried with an Ubuntu 20.04 container also and got the same result.

I can reproduce the issue by launching a fresh container and installing mysql-server without any additional steps needed.

lxc launch ubuntu:22.04 test
lxc exec test bash
apt update && apt upgrade
apt install mysql-server

I get the following errors:

update-alternatives: using /var/lib/mecab/dic/ipadic-utf8 to provide /var/lib/mecab/dic/debian (mecab-dictionary) in auto mode
Setting up libhtml-parser-perl:amd64 (3.76-1build2) ...
Setting up libhttp-message-perl (6.36-1) ...
Setting up mysql-server-8.0 (8.0.30-0ubuntu0.22.04.1) ...
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Renaming removed key_buffer and myisam-recover options (if present)
mysqld will log errors to /var/log/mysql/error.log
mysqld is running as pid 3446
Created symlink /etc/systemd/system/multi-user.target.wants/mysql.service → /lib/systemd/system/mysql.service.
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xeu mysql.service" for details.
invoke-rc.d: initscript mysql, action "start" failed.
● mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Mon 2022-08-01 15:51:06 UTC; 5ms ago
    Process: 3643 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
    Process: 3651 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
   Main PID: 3651 (code=exited, status=1/FAILURE)
     Status: "Server shutdown complete"
      Error: 22 (Invalid argument)
dpkg: error processing package mysql-server-8.0 (--configure):
 installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
Setting up libcgi-pm-perl (4.54-1) ...
Setting up libhtml-template-perl (2.97-1.1) ...
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-8.0; however:
  Package mysql-server-8.0 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
Setting up libcgi-fast-perl (1:2.15-1) ...
Processing triggers for man-db (2.10.2-1) ...
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
Errors were encountered while processing:
 mysql-server-8.0
 mysql-server
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)

The package installs fine on a bare metal Ubuntu 22.04 machine. Any ideas what the issue might be?

Here’s my host machine info:

snap 2.56.2
snapd 2.56.2
series 16
ubuntu 20.04
kernel 5.15.0-41-generic
lxd 4.0.9-8e2046b

I think this has to do with an issue with MySQL on ZFS. I installed MariaDB instead and everything worked. You could also try a different storage pool.

Weird. Yeah it is on a ZFS pool. MariaDB seems to install fine, so I’ll just go with that. Thanks!

Yes thats right. I think @sdeziel knows the launchpad issue in question?

https://bugs.launchpad.net/ubuntu/+source/mysql-8.0/+bug/1969247 should be addressed by the next kernel update batch.

2 Likes