LXC: Missing file archlinux.common.conf

Since the last update of LXC (I updated to LXC 3.0.0 (🖇️ 🔐) on Arch Linux there is no file archlinux.common.conf anymore. This bricked all of my containers.

Lots of errors

First was a simple lxc-ls -f. But that just printed out for every container something like this:

[root@homeserver veloc1ty]# lxc-ls -f
lxc-ls: parse.c: lxc_file_for_each_line_mmap: 102 Failed to parse config: lxc.include = /usr/share/lxc/config/archlinux.common.conf
Failed to load config for dns1.veloc1ty.lan

I was not able to log into the container via ssh anymore. The error message:

[josef@mac ansible]:-$ ssh dns1.veloc1ty.lan
channel 0: open failed: connect failed: Connection refused
stdio forwarding failed
ssh_exchange_identification: Connection closed by remote host

When I attached to the console via lxc-attach I was not able to start some services like mariadb.service or nginx.service. The error message was:

[root@telegrambots veloc1ty]# systemctl status mariadb
● mariadb.service - MariaDB 10.1.32 database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2018-04-19 17:45:23 UTC; 1s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 1298 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=226/NAMESPACE)

Apr 19 17:45:23 thehostname systemd[1]: Starting MariaDB 10.1.32 database server...
Apr 19 17:45:23 thehostname systemd[1298]: mariadb.service: Failed to set up mount namespacing: No such file or directory
Apr 19 17:45:23 thehostname systemd[1298]: mariadb.service: Failed at step NAMESPACE spawning /bin/sh: No such file or directory
Apr 19 17:45:23 thehostname systemd[1]: mariadb.service: Control process exited, code=exited status=226
Apr 19 17:45:23 thehostname systemd[1]: mariadb.service: Failed with result 'exit-code'.
Apr 19 17:45:23 thehostname systemd[1]: Failed to start MariaDB 10.1.32 database server.

Solution

In your LXC container config is this line:

lxc.include = /usr/share/lxc/config/archlinux.common.conf

Change it to this line:

lxc.include = /usr/share/lxc/config/common.conf

Stop and start the container and everything should be fine again.


Du hast einen Kommentar, einen Wunsch oder eine Verbeserung? Schreib mir doch eine E-Mail! Die Infos dazu stehen hier.

🖇️ = Link zu anderer Webseite
🔐 = Webseite nutzt HTTPS (verschlüsselter Transportweg)
Zurück