Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 761918 - OpenRC + LXC: sysinit servce devfs does not start, leads to missing /dev/shm
Summary: OpenRC + LXC: sysinit servce devfs does not start, leads to missing /dev/shm
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-27 12:25 UTC by Ogelpre
Modified: 2024-04-05 15:20 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
devfs-lxc.patch (devfs-lxc.patch,1.62 KB, patch)
2021-01-13 06:53 UTC, William Hubbs
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ogelpre 2020-12-27 12:25:35 UTC
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
Comment 1 William Hubbs gentoo-dev 2021-01-13 06:53:34 UTC
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
Comment 2 Aisha Tammy 2021-01-27 16:23:40 UTC
I can confirm that the patch is working fine, with no mknod issues being reported.
Comment 3 William Hubbs gentoo-dev 2021-01-28 18:45:30 UTC
The following commit fixes this issue.

http://github.com/OpenRC/openrc/commit/12ee72a9b34ef33411cf1bfd5ea059676ee6e482

This will be in OpenRC 0.43.
Comment 4 Ogelpre 2021-01-28 20:14:43 UTC
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.
Comment 5 Richard H. 2021-10-04 18:06:54 UTC
I had the same problem. Updating OpenRC fixed it for me. Thanks!
Comment 6 kiwi93872 2024-04-05 15:20:38 UTC
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.