Lxd 3.0.1 with kernel 4.18


(Jacob Zimmermann) #1

Hi all,

Running Ubuntu 18.04, I upgraded the kernel to 4.18rc2 from http://kernel.ubuntu.com/~kernel-ppa/mainline/. However since the upgrade it became impossible to launch LXD containers.
The error message shown by lxc info --show-log is:

Name: kali

Remote: unix://
Architecture: x86_64
Created: 2018/05/04 05:30 UTC
Status: Stopped
Type: persistent
Profiles: default

Log:

lxc kali 20180630004334.373 ERROR    lxc_utils - utils.c:open_devnull:1753 - Permission denied - Can't open /dev/null
lxc kali 20180630004334.373 ERROR    lxc_sync - sync.c:__sync_wait:57 - An error occurred in another process (expected sequence number 5)
lxc kali 20180630004334.398 ERROR    lxc_container - lxccontainer.c:wait_on_daemonized_start:834 - Received container state "ABORTING" instead of "RUNNING"
lxc kali 20180630004334.398 ERROR    lxc_start - start.c:__lxc_start:1887 - Failed to spawn container "kali"
lxc 20180630004334.411 WARN     lxc_commands - commands.c:lxc_cmd_rsp_recv:130 - Connection reset by peer - Failed to receive response for command "get_state"

The LXD installation is 3.0.1 from the Ubuntu repos. Everything worked normally with older mainline kernel, including and up to 4.17.x.

Thanks in advance for any solution or workaround, if there are any. Unfortunately both the default Ubuntu 4.15 kernel and the 4.17 mainline kernels have other issues on my machine so upgrading to 4.18 is pretty much a necessity.

Jacob


(John Teague) #2

Can you post grep results on lxd? That might help with this.


(Stéphane Graber) #3

That’s a known issue with the 4.18 kernel which affects LXC, LXD, systemd and pretty much every piece of software that uses user namespaces.

I’d recommend downgrading to another kernel for now.


(John Teague) #4

Thanks Stephane. Not to beat this thread up with an aside, but can you point me towards any kernel net discussions about how the 4.18 namespace issue is progressing. Much appreciated.


(Stéphane Graber) #5

https://lists.linuxfoundation.org/pipermail/containers/2018-June/thread.html#39174 has the relevant thread


(John Teague) #6

Thanks very much. Resubscribed to the containers list.


(Christian Brauner) #7

The patch required to make LXC work again is available in git master and has been backported to the 3.0.0 stable branch.


(Jacob Zimmermann) #8

Thanks for the quick fix! Which git repo can I pick it up from? On https://github.com/lxc/lxd the latest patch available is 6160132 from 3 days ago, which doesn’t seem to be related to this.


(John Teague) #9

I think it’s this one. https://github.com/lxc/lxd/pull/4704


(Jacob Zimmermann) #10

I’ve rebuilt LXD 3.0.1 with this patch applied but it still doesn’t work.


(Christian Brauner) #11

The required fix is in liblxc not in LXD. There’s also the possibility that the 4.18 kernel and the patch causing this will be reverted. This is something we are currently discussing.


(Jacob Zimmermann) #12

Can you please point me to the patch? The commits in the lxc repo for the past few days seem to be all about test cleanups.


(Stéphane Graber) #13

(Jacob Zimmermann) #14

It works! Thank you so much for your help. This saves the day for me :slight_smile:


(David Robert Favor) #15

Whew… This thread just saved me a heap of time debugging…