Bug 767857

Summary: configfs not being mounted ahead of targetcli
Product: [Fedora] Fedora Reporter: Andy Grover <agrover>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: gansalmon, itamar, johannbg, jonathan, kernel-maint, lpoetter, madhu.chinakonda, metherid, mschmidt, notting, plautrba, systemd-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: kernel-3.1.5-6.fc16 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 767432 Environment:
Last Closed: 2011-12-17 20:52:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 767432    
Bug Blocks:    

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 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 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 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 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 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.
https://admin.fedoraproject.org/updates/kernel-3.1.5-6.fc16

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:
https://admin.fedoraproject.org/updates/FEDORA-2011-17180/kernel-3.1.5-6.fc16
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.