Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5
-
None
-
Ubuntu bionic
Description
When running mariadb process in the container the process is created in isolated namespace.
MDEV-21331 explained the error that happens on Debian and this is expected situation.
Problem is that on Ubuntu distro (tested with bionic) we don't get the same situation; so installing mariadb on a host system over started container will not raise the error.
# Start container (no mariadb server installed)
|
$ docker container run --rm --name mysql-cont -e MYSQL_ROOT_PASSWORD=secret -d mysql |
# Install mariadb on a host
|
$ sudo apt install mariadb-server-10.2 # version 10.2.31 (use archive.mariadb.org) |
# The last command should fail prior 10.2.31, but on Ubuntu is not failing |
Attachments
Issue Links
- relates to
-
MDEV-21331 installation fails in an server with containers
-
- Closed
-
Activity
Hi otto, I wrote in bug report:
$ sudo apt install mariadb-server-10.2 # version 10.2.31 (use archive.mariadb.org) |
# The last command should fail prior 10.2.31, but on Ubuntu is not failing |
1) Expected output - should fail when you start prior mariadb container (and it is failing on Debian, but it is not failing on Ubuntu)
2) Actual output - not failing on Ubuntu when you start prior mariadb container (and it is failing on Debian)
Have tested with faust and got confirmation.
You just re-iterated the bug report description without copy-pasting here what the output is, so I still didn't learn anything about what the expected and actual outputs are. Anyway, you don't have to paste them. I made the comment mainly to notify that I don''t understand the issue and thus cannot help with it. If you fully understand the issue and know the recent change will fix it, then nothing more is needed.
Sorry, I didn't understand you want actual terminal outputs.
Will add them tomorrow, have again to setup VM for Ubuntu (switched my future work on Debian only).
I think the fix for PR 2076 didn't solve this bug, but will come again with terminal outputs.
Sorry for 1d delay.
I cannot repeat the error on debian 11, ubuntu 20 so I will close this issue, sorry for the noise. Cannot install debian 9 VM atm for testing further.
However this is what I have done
- Ubuntu
$ lsb_release -a
LSB Version: core-11.1.0ubuntu2-noarch:security-11.1.0ubuntu2-noarch
Distributor ID: Ubuntu
Description: Ubuntu 20.04.4 LTS
Release: 20.04
Codename: focal
# Get old version
$ sudo touch /etc/apt/sources.list.d/mariadb.list
$ echo "deb [arch=amd64] https://archive.mariadb.org/repo/10.5.9/ubuntu focal main"| sudo tee -a /etc/apt/sources.list.d/mariadb.list
$ sudo apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc'
$ sudo apt-key list|grep Maria
uid [ unknown] MariaDB Signing Key <signing-key@mariadb.org>
$ sudo apt update
https://archive.mariadb.org/repo/10.5.9/ubuntu focal/main amd64 Packages [17.2 kB]
$ docker run --name mariadb-cont --rm -e MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=yes -d mariadb:latest
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c81a402f5db7 mariadb:latest "docker-entrypoint.s…" 47 minutes ago Up 47 minutes 3306/tcp mariadb-cont
a) First start container and after that install on host - conclusion: no problem both PID created in separate namespace
Show all
$ docker run --name mariadb-cont --rm -e MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=yes -d mariadb:latest
# Output status of the container
$ ps aux|grep -E "mariadb|mysqld"
systemd+ 3509 0.0 0.4 1606656 77952 ? Ssl 05:49 0:00 mariadb
$ ps -eo pidns,pid,args|grep maria
- 3509 mariadbd
# Nothing installed
$ dpkg -l|grep -E "maria|mysql"
ii libmysqlclient21:amd64 8.0.29-0ubuntu0.20.04.3 amd64 MySQL database client library
ii mysql-common 5.8+1.0.5ubuntu2 all MySQL database common files, e.g. /etc/mysql/my.cnf
# Install 10.5
$ sudo apt install mariadb-server-10.5
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libfprint-2-tod1 libfwupdplugin1 libllvm9
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
galera-4 gawk libaio1 libcgi-fast-perl libcgi-pm-perl libdbd-mariadb-perl libdbi-perl libfcgi-perl libhtml-template-perl libmariadb3 libreadline5 libsigsegv2
libterm-readkey-perl mariadb-client-10.5 mariadb-client-core-10.5 mariadb-common mariadb-server-core-10.5 socat
Suggested packages:
gawk-doc libclone-perl libmldbm-perl libnet-daemon-perl libsql-statement-perl libipc-sharedcache-perl mailx mariadb-test
The following NEW packages will be installed:
galera-4 gawk libaio1 libcgi-fast-perl libcgi-pm-perl libdbd-mariadb-perl libdbi-perl libfcgi-perl libhtml-template-perl libmariadb3 libreadline5 libsigsegv2
libterm-readkey-perl mariadb-client-10.5 mariadb-client-core-10.5 mariadb-common mariadb-server-10.5 mariadb-server-core-10.5 socat
0 upgraded, 19 newly installed, 0 to remove and 5 not upgraded.
Need to get 27.7 MB of archives.
#Output result
$ dpkg -l|grep -E "maria|mysql"
ii libdbd-mariadb-perl 1.11-3ubuntu2 amd64 Perl5 database interface to the MariaDB/MySQL databases
ii libmariadb3:amd64 1:10.5.9+maria~focal amd64 MariaDB database client library
ii libmysqlclient21:amd64 8.0.29-0ubuntu0.20.04.3 amd64 MySQL database client library
ii mariadb-client-10.5 1:10.5.9+maria~focal amd64 MariaDB database client binaries
ii mariadb-client-core-10.5 1:10.5.9+maria~focal amd64 MariaDB database core client binaries
ii mariadb-common 1:10.5.9+maria~focal all MariaDB common configuration files
ii mariadb-server-10.5 1:10.5.9+maria~focal amd64 MariaDB database server binaries
ii mariadb-server-core-10.5 1:10.5.9+maria~focal amd64 MariaDB database core server files
ii mysql-common 5.8+1.0.5ubuntu2 all MySQL database common files, e.g. /etc/mysql/my.cnf
$ ps aux|grep -E "mariadb|mysqld"
systemd+ 3509 0.0 0.4 1606656 77952 ? Ssl 05:49 0:00 mariadbd
mysql 7377 0.2 0.5 1279496 87840 ? Ssl 06:40 0:00 /usr/sbin/mariadbd
$ sudo ps -eo pidns,pid,args|grep maria
4026532599 3509 mariadbd
4026531836 7377 /usr/sbin/mariadbd #host namespace
b) Removing of mariadb on host - conclusion: it is removing only the mariadb process in specific namespace
Show all
$ sudo apt remove mariadb-server-10.5
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
galera-4 libaio1 libcgi-fast-perl libcgi-pm-perl libdbd-mariadb-perl libdbi-perl libfcgi-perl libfprint-2-tod1 libfwupdplugin1 libhtml-template-perl libllvm9 libmariadb3
libreadline5 libterm-readkey-perl mariadb-client-10.5 mariadb-client-core-10.5 mariadb-common mariadb-server-core-10.5 socat
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
mariadb-server-10.5
0 upgraded, 0 newly installed, 1 to remove and 5 not upgraded.
After this operation, 68.1 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 183112 files and directories currently installed.)
Removing mariadb-server-10.5 (1:10.5.9+maria~focal) ...
Processing triggers for man-db (2.9.1-1) ...
$ sudo ps -eo pidns,pid,args|grep maria
4026532599 3509 mariadbd
$ sudo apt autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
galera-4 libaio1 libcgi-fast-perl libcgi-pm-perl libdbd-mariadb-perl libdbi-perl libfcgi-perl libfprint-2-tod1 libfwupdplugin1 libhtml-template-perl libllvm9 libmariadb3
libreadline5 libterm-readkey-perl mariadb-client-10.5 mariadb-client-core-10.5 mariadb-common mariadb-server-core-10.5 socat
0 upgraded, 0 newly installed, 19 to remove and 5 not upgraded.
$ dpkg -l|grep -E "maria|mysql"
ii libmysqlclient21:amd64 8.0.29-0ubuntu0.20.04.3 amd64 MySQL database client library
rc mariadb-client-10.5 1:10.5.9+maria~focal amd64 MariaDB database client binaries
rc mariadb-common 1:10.5.9+maria~focal all MariaDB common configuration files
rc mariadb-server-10.5 1:10.5.9+maria~focal amd64 MariaDB database server binaries
ii mysql-common 5.8+1.0.5ubuntu2 all MySQL database common files, e.g. /etc/mysql/my.cnf
$ sudo apt purge mariadb-server-10.5 # and `rc` friends
- Debian bullseye (10.6.7 first on archive)
Couldn't install Debian stretch (to target 10.2.43)
- Conclusion: no problem, the same as above with Ubuntu
Show all
$ sudo echo "deb [arch=amd64] https://archive.mariadb.org/repo/10.6.7/debian bullseye main" >>/etc/apt/sources.list.d/mariadb.list
$ sudo touch /etc/apt/sources.list.d/mariadb.list
$ echo "deb [arch=amd64] https://archive.mariadb.org/repo/10.6.7/debian bullseye main"| sudo tee -a /etc/apt/sources.list.d/mariadb.list
$ sudo apt update
$ docker run --name mariadb-cont --rm -e MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=yes -d mariadb:latest
$ ps aux|grep -E "mariadb|mysqld"
systemd+ 4051 0.6 0.5 1426440 86748 ? Ssl 10:07 0:00 mariadbd
$ sudo ps -eo pidns,pid,args|grep maria
4026532566 4051 mariadbd
# No problem to install the mariadb
$ sudo ps -eo pidns,pid,args|grep maria
4026532566 4051 mariadbd
4026531836 4862 /usr/sbin/mariadbd
I don't understand the bug report. So when you run `sudo apt install mariadb-server-10.2`
1) what is the expected output and
2) what is the actual output?