We are running a LXD cluster with LXC containers based on Gentoo. We ran into an issue[0], because /dev/shm is not mounted. According to LXD developers this is an OpenRC issue[1]. Manual start works, but mknod is not allowed and some error messages turn up. binhost ~ # rc-service devfs start devfs | * Remounting devtmpfs on /dev ... [ ok ] devfs |mknod: /dev/tty1: Operation not permitted devfs |mknod: /dev/kmsg: Operation not permitted devfs | * Mounting /dev/shm ... [ ok ] [0] https://bugs.python.org/issue3770 [1] https://github.com/lxc/lxd/issues/5967
Created attachment 682621 [details, diff] devfs-lxc.patch Please apply this patch to the devfs script in your container and let me know if it solves the issues. Thanks, William
I can confirm that the patch is working fine, with no mknod issues being reported.
The following commit fixes this issue. http://github.com/OpenRC/openrc/commit/12ee72a9b34ef33411cf1bfd5ea059676ee6e482 This will be in OpenRC 0.43.
Sorry had no time to test the change by myself. Thank you for fixing! If the fix does not help, I'll reopen the bug.
I had the same problem. Updating OpenRC fixed it for me. Thanks!
I have recently upgraded my LXC-containerised Gentoo installation and ran into issues related to the changes introduced in this bugreport. Ths symtomps are the following: When I connect with SSH to the container, I get the message: "PTY allocation request failed on channel 0" To workaround it, I run ssh with "/bin/bash -if" options and manually run "mount -t devpts none /dev/pts". Additional info: 1) I am running app/emulation-1.0.11 (outside the container) and sys-apps/openrc-0.53 (inside the container) 2) The container's config files do not have lines to mount devpts during container startup. I tried to add them, but there was no result. 3) The /etc/fstab file inside the container has the line to mount devpts, but possibly has no effect since /etc/init.d/localmount has "-lxs" in the keyword list. Eventually, I commented that line in /etc/fstab with no effect. 4) I can solve the issue by masking lxc (appending "-lxc") in the depend() function of the /etc/init.d/devfs initscript. Thus, partially reverting changes introduced in this bugreport. 5) Commenting out "mountinfo -q $2 && continue" line in the seed_dev() function also solves my issue.