Summary: | sys-apps/openrc-0.13.1 - cgroup mounting issues | ||
---|---|---|---|
Product: | Gentoo Hosted Projects | Reporter: | Eric Gisse <jowr.pi> |
Component: | OpenRC | Assignee: | OpenRC Team <openrc> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | perfinion |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 529332, 520144 | ||
Attachments: | sysfs.patch |
Description
Eric Gisse
2014-11-22 18:19:11 UTC
I want to ask a couple of questions about your comments. (In reply to Eric Gisse from comment #0) > During the boot process, sysfs gets ran in sysvinit. But it then gets called > again by localmount/procfs later and you see something like this: I'm not sure what you mean here, because localmount does not have a dependency on sysfs. > mkdir: cannot create directory '/sys/fs/cgroup/cpuset': File exists > mount: cpuset is already mounted or /sys/fs/cgroup/cpuset busy > cpuset is already mounted on /sys/fs/cgroup/cpuset > mkdir: cannot create directory '/sys/fs/cgroup/cpu': File exists > mount: cpu is already mounted or /sys/fs/cgroup/cpu busy > cpu is already mounted on /sys/fs/cgroup/cpu > mkdir: cannot create directory '/sys/fs/cgroup/cpuacct': File exists > mount: cpuacct is already mounted or /sys/fs/cgroup/cpuacct busy > cpuacct is already mounted on /sys/fs/cgroup/cpuacct > mkdir: cannot create directory '/sys/fs/cgroup/net_prio': File exists > mount: net_prio is already mounted or /sys/fs/cgroup/net_prio busy > net_prio is already mounted on /sys/fs/cgroup/net_prio > * ERROR: sysfs failed to start The only way you would get this type of message is if everything was already set up from the first run, so I'm thinking that we can just modify sysfs to return 0. If I do that, sysfs would behave the same way localmount and netmount behave. Created attachment 390080 [details, diff]
sysfs.patch
All,
this is the patch I would apply to fix this.
I don't want to hide the messages from the mounts, because we don't do
that in localmount unless we use mountinfo, and having the messages
visible may show us if there is another issue.
Thanks,
William
(In reply to William Hubbs from comment #1) > I want to ask a couple of questions about your comments. > > (In reply to Eric Gisse from comment #0) > > During the boot process, sysfs gets ran in sysvinit. But it then gets called > > again by localmount/procfs later and you see something like this: > > I'm not sure what you mean here, because localmount does not have a > dependency on sysfs. Misremembering. I fought with this on an unrelated matter for awhile. One of the later scripts, say lvm, does depend on sysfs. Which runs a second time, resulting in the output below. I'm not clear why it does that, thus the bug report. > > > mkdir: cannot create directory '/sys/fs/cgroup/cpuset': File exists > > mount: cpuset is already mounted or /sys/fs/cgroup/cpuset busy > > cpuset is already mounted on /sys/fs/cgroup/cpuset > > mkdir: cannot create directory '/sys/fs/cgroup/cpu': File exists > > mount: cpu is already mounted or /sys/fs/cgroup/cpu busy > > cpu is already mounted on /sys/fs/cgroup/cpu > > mkdir: cannot create directory '/sys/fs/cgroup/cpuacct': File exists > > mount: cpuacct is already mounted or /sys/fs/cgroup/cpuacct busy > > cpuacct is already mounted on /sys/fs/cgroup/cpuacct > > mkdir: cannot create directory '/sys/fs/cgroup/net_prio': File exists > > mount: net_prio is already mounted or /sys/fs/cgroup/net_prio busy > > net_prio is already mounted on /sys/fs/cgroup/net_prio > > * ERROR: sysfs failed to start > > The only way you would get this type of message is if everything was already > set up from the first run, so I'm thinking that we can just modify sysfs to > return 0. That's precisely what's happening. > > If I do that, sysfs would behave the same way localmount and netmount behave. That's why I mentioned it as a solution. Now, I'm not saying *suppress* the messages. Just do checks to make sure nothing is mounted before trying to mount, because that causes errors and messy output. That sysfs patch, by the way, is largely what I've been doing when this has been an issue in troubleshooting other - unrelated - things. (In reply to Eric Gisse from comment #3) > (In reply to William Hubbs from comment #1) > > I want to ask a couple of questions about your comments. > > > > (In reply to Eric Gisse from comment #0) > > > During the boot process, sysfs gets ran in sysvinit. But it then gets called > > > again by localmount/procfs later and you see something like this: > > > > I'm not sure what you mean here, because localmount does not have a > > dependency on sysfs. > > Misremembering. I fought with this on an unrelated matter for awhile. > > One of the later scripts, say lvm, does depend on sysfs. Which runs a second > time, resulting in the output below. > > I'm not clear why it does that, thus the bug report. The first time sysfs runs, it is run because it is in the sysinit runlevel. The second time it runs is because a later script has "need sysfs" in the depend function, and need means that it will try to run whatever is listed on the need line if it is not already started. > Now, I'm not saying *suppress* the messages. Just do checks to make sure > nothing is mounted before trying to mount, because that causes errors and > messy output. Ok, I see what the deal is. mountinfo -q is what we use to check to see if something is mounted, e.g.: mount_sys() { mountinfo -q /sys && return 0 # code below here, in this function, doesn't execute if /sys is mounted } > That sysfs patch, by the way, is largely what I've been doing when this has > been an issue in troubleshooting other - unrelated - things. That patch needs to be used then, and I'll also improve the mount_cgroups function via using mountinfo -q checks. This is fixed in commit 30cc3cd and will be in OpenRC-0.14. This is also in OpenRC-0.13.6. |