Bug#800521: systemd: sys-kernel-config.mount not functional

Ferenc Wagner wferi at niif.hu
Wed Sep 30 15:36:40 BST 2015


Michael Biebl <biebl at debian.org> writes:

> Am 30.09.2015 um 16:04 schrieb Ferenc Wagner:
>
>> Michael Biebl <biebl at debian.org> writes:
>> 
>>> Why are your using a .service file to load the dlm module?
>> 
>> Sorry for being confusing by eliding too much.  The dlm service starts
>> the DLM control daemon, and also loads the dlm kernel module beforehand.
>> It's dlm_controld which needs a mounted configfs (and the dlm module):
>> 
>> $ systemctl cat dlm
>> # /lib/systemd/system/dlm.service
>> [Unit]
>> Description=dlm control daemon
>> Requires=corosync.service sys-kernel-config.mount
>> After=corosync.service sys-kernel-config.mount
>> 
>> [Service]
>> OOMScoreAdjust=-1000
>> Type=notify
>> NotifyAccess=main
>> EnvironmentFile=/etc/default/dlm
>> ExecStartPre=/sbin/modprobe dlm 
>> ExecStart=/usr/sbin/dlm_controld --foreground $DLM_CONTROLD_OPTS
>> #ExecStopPost=/sbin/modprobe -r dlm
>> 
>> # If dlm_controld doesn't stop, there are active lockspaces.
>> # Killing it will just get the node fenced.
>> SendSIGKILL=no
>> 
>> [Install]
>> WantedBy=multi-user.target
>> 
>>> Why does the dlm.service require the sys-kernel-config fs?
>> 
>> Because dlm_controld uses files under /sys/kernel/config/dlm.
>> 
>>> Can't you just ship a snippet in /usr/lib/modules-load.d/ and then also
>>> include configfs in there?
>> 
>> No, loading the dlm kernel module is only part of the task.
>
> Sure, but why don't you load the dlm + configfs module not via a
> module-load.d snippet, knowing that the Debian kernel doesn't have it
> builtin?

Do you mean I should remove the ExecStartPre directive and load dlm
(which would pull in the configfs kernel module, too) from a
module-load.d snippet?  That would work, but that would also mean
deviating from the logic used by the upstream service file.  And systemd
is supposed to make distributions converge, not diverge, AFAIK.

>>> Fwiw, I don't think there is anything to fix on the systemd side.
>> 
>> Do you mean that sys-kernel-config.mount somehow manages to work for you
>> under jessie?  Then my initial analysis must be incorrect somewhere.
>
> See the upstream bug report you referenced:
> Either the module should be compiled in, or software requiring it should
> make sure to load the module itself, ideally by shipping a
> modules-load.d snippet.

Exactly.  Now, sys-kernel-config.mount is shipped by systemd, so I'd
expect systemd to make sure it actually works.  In the upstream
bugreport they got configfs compiled in the kernel, for example.  Or am
I mistaken about the purpose of the sys-kernel-config.mount unit?  Is
that unit supposed to make configfs mounted only under certain
circumstances?  The DLM upstream does not seem to think so, and the
cited RedHat bug report doesn't handle the issue like that, either.
-- 
Regards,
Feri.




More information about the Pkg-systemd-maintainers mailing list