Bug 767857 - configfs not being mounted ahead of targetcli
Summary: configfs not being mounted ahead of targetcli
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 16
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
Depends On: 767432
TreeView+ depends on / blocked
Reported: 2011-12-15 01:38 UTC by Andy Grover
Modified: 2011-12-17 20:52 UTC (History)
12 users (show)

Fixed In Version: kernel-3.1.5-6.fc16
Doc Type: Bug Fix
Doc Text:
Clone Of: 767432
Last Closed: 2011-12-17 20:52:09 UTC
Type: ---

Attachments (Terms of Use)

Description Andy Grover 2011-12-15 01:38:20 UTC
+++ This bug was initially created as a clone of Bug #767432 +++

Created attachment 546497 [details]
targetcli service file

My service (targetcli, service file attached) needs configfs loaded before it is started, but it doesn't appear to be. I can do "systemctl start sys-kernel-config.mount" once the system is up (and then targetcli is happy) but during boot when targetcli is run, configfs isn't mounted.

Another thing -- sys-kernel-config.mount appears *almost* identical to sys-kernel-debug.mount, which IS being properly mounted. sys-kernel-config is a Before for targetcli.service and sysinit.target, but isn't being started.

Please advise.

--- Additional comment from mschmidt@redhat.com on 2011-12-13 17:46:15 PST ---

The difference is that debugfs is built-in in the Fedora kernel but configfs is a module. The mountpoint does not exist until the module is loaded.

See if deleting the line "ConditionPathExists=/sys/kernel/config" from sys-kernel-config.mount helps.

--- Additional comment from agrover@redhat.com on 2011-12-13 20:17:26 PST ---

That didn't have an effect, but adding /usr/lib/modules-load.d/targetcli.conf containing "configfs" did.

So I can do that, but shouldn't systemd-units really add something to modules-load.d, since it owns the unit that needs the module loaded?

(but then configfs.ko will be loaded even if sys-kernel-config.mount isn't active. Do mount units need a LoadModule or ExecMountPre option??)

--- Additional comment from mschmidt@redhat.com on 2011-12-14 04:45:44 PST ---

I don't like userspace having to be aware of what's configured as a module and what's built-in.

One option would be to have the kernel provide the empty /sys/kernel/config mountpoint even without the module loaded (whenever CONFIG_CONFIGFS_FS=m or y).
With the mountpoint available the mount would succeed (the module providing the filesystem implementation would be loaded automatically).

Or just set CONFIG_CONFIGFS_FS=y and move on.

Kay, what do you think?

--- Additional comment from mschmidt@redhat.com on 2011-12-14 05:06:16 PST ---

<kay> i don't think that having it as a module makes much sense
<kay> when there are non-exotic users for it
<kay> configfs was supposed to be the counterpart of sysfs
<kay> like a sysfs with commit support
<kay> so we can declare it as 'core', i guess
<kay> all that sounds like fiddling we should avoid and just compile it in
<kay> i think that was what we decided last time we changed some stuff
<kay> if it's exotic, let the package drop a force-load instruction
<kay> if it's common, let's compile it in and forget

Reassigning to kernel to consider setting CONFIG_CONFIGFS_FS=y

--- Additional comment from davej@redhat.com on 2011-12-14 17:19:14 PST ---

done. will be in next build. (3.2.0-0.rc5.git2.3)

Comment 1 Andy Grover 2011-12-15 01:39:14 UTC
Please update f16 kernel too.

Comment 2 Dave Jones 2011-12-15 03:43:02 UTC
also done.
will be in 3.1.5-5 and higher

Comment 3 Fedora Update System 2011-12-15 18:27:29 UTC
kernel-3.1.5-6.fc16 has been submitted as an update for Fedora 16.

Comment 4 Fedora Update System 2011-12-16 19:57:55 UTC
Package kernel-3.1.5-6.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing kernel-3.1.5-6.fc16'
as soon as you are able to, then reboot.
Please go to the following url:
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2011-12-17 20:52:09 UTC
kernel-3.1.5-6.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.