MariaDB will not install with CT + systemd

varnav

New Member
Dec 27, 2016
4
0
1
43
Typical Debian distro has systemd installed and enabled by default. But debian-8.0-standard_8.4-1_amd64.tar.gz template has SYSV in place.

So, i always install systemd on a fresh CT machine created with debian-8.0-standard_8.4-1_amd64.tar.gz template, because everyone expects it on Debian 8.

Code:
apt-get update && apt-get install systemd-sysv -y

I never had any problems with it earlier, but I ran into failed installation of MariaDB from repositories.

Here we can check two scenarios. Create fresh CT from 8.0-standard_8.4-1_amd64.tar.gz and try

Scenario 1, works fine:

Code:
apt-get update && apt-get install software-properties-common -y
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
add-apt-repository 'deb [arch=amd64,i386] http://mariadb.mirror.nucleus.be/repo/10.1/debian jessie main'

apt-get update && apt-get install mariadb-server -y

Scenario 2:

Code:
apt-get update && apt-get install systemd-sysv -y
reboot

and then, after reboot, try commands from scenario 1. It will fail with error:

Code:
Job for mariadb.service failed. See 'systemctl status mariadb.service' and 'journalctl -xn' for details.
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package mariadb-server-10.1 (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mariadb-server:
mariadb-server depends on mariadb-server-10.1 (= 10.1.20+maria-1~jessie); however:
  Package mariadb-server-10.1 is not configured yet.

dpkg: error processing package mariadb-server (--configure):
dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.19-18+deb8u4) ...
Processing triggers for systemd (215-17+deb8u5) ...
Errors were encountered while processing:
mariadb-server-10.1
mariadb-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
 
Rechecked with more recent Proxmox VE 4.4-2 and debian-8.0-standard_8.6-1_amd64.tar.gz

Situation is the same.
 
Hi Varnav

As I understand your point, you're askling why our LXC templates use systemd-sysv as default ? Or am I missing something ?

First thank you for reporting this as others can use your post if they want to install MariaDB on Jessie in a container.

IIRC Debian Jessie switchted to systemd as the *default* init system, but still supports systemd-sysv.

This is why any daemon available in the Debian archive will never require systemd to be available.
If Maria DB thinks is good for required Debian is left to them.

BTW the default systemd version available in Debian Jessie is also to old to run unpriviledged container.
 
As I understand your point, you're askling why our LXC templates use systemd-sysv as default ?

Are they? Looks like systemd-sysv is not installed by default:

Code:
#dpkg -l | grep systemd

ii  libsystemd0:amd64              215-17+deb8u5              amd64        systemd utility library

No, as you can see from Scenario 1, systemd is not required for MariaDB.
But installation fails on Proxmox LXC Debian if systemd-sysv is installed, and works fine with default systemd with 'regular' Debian.

So, we can say that there is problem with systemd in Proxmox containers? So it's not recommended to use it?

P.S.

I've tried systemd from jessie-backports, but problem is the same.
 
libsystemd0 is a utility library
to know which init system you're using try

root@CT1100:~# cat /proc/1/comm
init

whereis init
init: /sbin/init

dpkg -S /sbin/init
sysvinit-core: /sbin/init

on a running container
 
For fresh CT from the template, it is init, so systemd-sysv is not installed by default. Is it considered ok to install it?