Bug 875531

Summary: DOC: JoinControllers of the main system's systemd doesn't take effect, because the initrd already mounted all cgroup fs for us
Product: [Fedora] Fedora Reporter: Krishna Raman <kraman>
Component: systemdAssignee: systemd-maint
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: admiller, harald, jeder, johannbg, kay, lnykryn, metherid, mfisher, mschmidt, msekleta, notting, plautrba, rbergero, systemd-maint, vpavlin
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-25 21:43:41 EST Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Krishna Raman 2012-11-11 18:30:27 EST
Description of problem:
Systemd JoinControllers argument does not work

Version-Release number of selected component (if applicable):
195-6.fc18

How reproducible:
Always

Steps to Reproduce:
1. Edit /etc/systemd/systemd.conf and add:
JoinControllers=memory,cpu,cpuacct
2. Reboot
3.
  
Actual results:
mount command lists:
/sys/fc/cgroup/cpu,cpuacct
/sys/fc/cgroup/memory

Expected results:
/sys/fc/cgroup/memory,cpu,cpuacct

Additional info:
Comment 1 Lennart Poettering 2013-01-11 18:07:15 EST
My guess is the following is happening here:

Dracut (our initrd) is nowadays running systemd. This systemd will later on serialize its state and transition into the main system's systemd, which will deserialize the state and continue. Now, the initrd systemd will mount all cgroup file systems. After the transition they won't be remounted (not sure the kernel would even allow us to). That means the only /etc/systemd/systemd.conf taking effect with its cgroup mount setting is the one from the initrd. And you change the one from the main one.

Not really sure what we could do about this.

Asking for a rebuild of the initrd each time this config is changed sounds a bit too much...

Kay, Harald, ideas?
Comment 2 Kay Sievers 2013-01-12 11:18:22 EST
It is actually a kind of "early boot config", which we need in the initramfs already, and I don't have a convincing idea how to work around that later.

I think we should just document, that the initrd needs to be rebuilt in that case. Maybe even a comment in the default config file.
Comment 3 Lennart Poettering 2013-01-14 13:31:31 EST
OK, i turned this into a documentation issue to fix then.
Comment 5 Krishna Raman 2013-01-16 15:51:40 EST
Will RHEL also require the initrd rebuild once these changes make it into RHEL?
Comment 6 Kay Sievers 2013-01-16 16:20:51 EST
Sure, there is no difference between Fedora and RHEL so far.
Comment 7 Fedora Update System 2013-01-28 14:12:46 EST
systemd-197-1.fc18.2 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/systemd-197-1.fc18.2
Comment 8 Fedora Update System 2013-01-29 19:34:05 EST
Package systemd-197-1.fc18.2:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing systemd-197-1.fc18.2'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-1590/systemd-197-1.fc18.2
then log in and leave karma (feedback).
Comment 12 Michal Schmidt 2013-02-20 08:48:45 EST
Note that /etc/systemd/system.conf gets included in the initramfs only if generating a hostonly initramfs.

Couldn't we umount and re-mount the controllers if a mismatch in the JoinControllers configuration is detected after switching to the real root?
Comment 13 Fedora Update System 2013-02-22 20:01:53 EST
Package initscripts-9.42.2-1.fc18, systemd-197-1.fc18.2:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing initscripts-9.42.2-1.fc18 systemd-197-1.fc18.2'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-1590/initscripts-9.42.2-1.fc18,systemd-197-1.fc18.2
then log in and leave karma (feedback).
Comment 14 Fedora Update System 2013-02-25 21:43:44 EST
initscripts-9.42.2-1.fc18, systemd-197-1.fc18.2 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.