Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1177823
Summary: | systemd status mnt-foo.mount claims to be active but nothing is mounted | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jonas Jonsson <jonas> |
Component: | systemd | Assignee: | systemd-maint |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 21 | CC: | johannbg, jsynacek, kzak, lemenkov, lnykryn, msekleta, s, systemd-maint, tcallawa, vpavlin, zbyszek |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | systemd-216-16.fc21 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-01-21 23:02:56 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Jonas Jonsson
2014-12-30 17:00:17 UTC
There are apparently two problems here: 1. nofail option is rejected. It is a standard option described in mount(8) and is supported by /bin/mount itself and the standard helpers like mount.nfs. mount.fuse and its helpers must support it too. 2. as can be seen from the status output, mount exited with status 0, signifying success. This mostly likely happened because mount.fuse helper exited with status 0, and /bin/mount only repeats what it was told. systemd simply accepts what it is told by /bin/mount and since it /bin/mount exited with status 0 systemd assumes that everything went fine. I don't know if those two issues outline above are caused by mount.fuse or by its rofs-filtered helper. Tentatively reassigning to fuse, since rofs-filtered is not packaged for Fedora. (In reply to Zbigniew Jędrzejewski-Szmek from comment #1) > There are apparently two problems here: > 1. nofail option is rejected. It is a standard option described in mount(8) > and is supported by /bin/mount itself and the standard helpers like > mount.nfs. mount.fuse and its helpers must support it too. Tested the same thing with bindfs, and it still complains about the nofail option. $ cat /etc/fstab ... /mnt/foo /mnt/foo.clean fuse.bindfs allow_other,ro,nofail 0 0 ... $ systemctl start mnt-foo.clean.mount Job for mnt-foo.clean.mount failed. See "systemctl status mnt-foo.clean.mount" and "journalctl -xe" for details. $ systemctl status mnt-foo.clean.mount ● mnt-foo.clean.mount - /mnt/foo.clean Loaded: loaded (/etc/fstab) Active: failed (Result: exit-code) since ons 2014-12-31 12:01:48 CET; 9s ago Where: /mnt/foo.clean What: /mnt/foo Docs: man:fstab(5) man:systemd-fstab-generator(8) Process: 18806 ExecMount=/bin/mount -n /mnt/foo /mnt/foo.clean -t fuse.bindfs -o allow_other,ro,nofail (code=exited, status=1/FAILURE) dec 31 12:01:48 bender mount[18806]: fuse: unknown option `nofail' dec 31 12:01:48 bender systemd[1]: mnt-foo.clean.mount mount process exited, code=exited status=1 dec 31 12:01:48 bender systemd[1]: Failed to mount /mnt/foo.clean. dec 31 12:01:48 bender systemd[1]: Unit mnt-foo.clean.mount entered failed state. > > 2. as can be seen from the status output, mount exited with status 0, > signifying success. This mostly likely happened because mount.fuse helper > exited with status 0, and /bin/mount only repeats what it was told. > > systemd simply accepts what it is told by /bin/mount and since it /bin/mount > exited with status 0 systemd assumes that everything went fine. I don't know > if those two issues outline above are caused by mount.fuse or by its > rofs-filtered helper. Tentatively reassigning to fuse, since rofs-filtered > is not packaged for Fedora. This was actually a bug in rofs-filtered, it returned 0 regardless of the result from fuse_main(). I would have thought that systemd actually checked that a filesystem was mounted, but I guess I was wrong. (In reply to Jonas Jonsson from comment #2) > (In reply to Zbigniew Jędrzejewski-Szmek from comment #1) > > There are apparently two problems here: > > 1. nofail option is rejected. It is a standard option described in mount(8) > > and is supported by /bin/mount itself and the standard helpers like > > mount.nfs. mount.fuse and its helpers must support it too. > Tested the same thing with bindfs, and it still complains about the nofail > option. It is possible that they are both wrong. A clarification from util-linux maintainers would be helpful. Karel: what's the story with 'nofail' passed as an option to mount helpers? Should they ignore it silently or are they allowed to complain? And related question: should it affect their behaviour on failure in any way? > This was actually a bug in rofs-filtered, it returned 0 regardless of the > result from fuse_main(). > > I would have thought that systemd actually checked that a filesystem was > mounted, but I guess I was wrong. It's better for everybody to fix the bug where it is, instead of working around in all other tools. (In reply to Zbigniew Jędrzejewski-Szmek from comment #3) > Karel: what's the story with 'nofail' passed as an option to mount helpers? I have doubts that any mount helper supports 'nofail' now. The option has been originally mount(8) specific, since libmount we use the option for mount helpers too, but it seems it's still unsupported by the helpers. The mount.nfs at least parses the option, but it's unused by code I guess. Note that the [u]mount(8) man page, section EXTERNAL HELPERS describes the interface between mount and mount.<type>. > Should they ignore it silently or are they allowed to complain? The ideal solution is to follow the 'nofail' purpose (if possible) or at least silently ignore the option. IMHO report the option as unknown is mistake. The same problem we have (sometimes) with -sfnv options on helpers command line. The really ideal solution would be use use libmount in helpers, but this is huge task (in my TODO for years:-). The library already provides simple API to parse command line options and -o options for helpers, we already use it in mount.nfs (from nfs-utils)). > > I would have thought that systemd actually checked that a filesystem was > > mounted, but I guess I was wrong. > It's better for everybody to fix the bug where it is, instead of working > around > in all other tools. Sure, don't hide bugs. (In reply to Karel Zak from comment #4) > I have doubts that any mount helper supports 'nofail' now. > The ideal solution is to follow the 'nofail' purpose (if possible) So neither current situation nor the "ideal" future status do what we want. (We don't want mount to silently fail, since we want to handle the failure ourselves in systemd.) We'll have to filter out 'nofail' from the options given to /bin/mount. Upstream commit http://cgit.freedesktop.org/systemd/systemd/commit/?id=17a1c597c5 changes systemd to filter out auto, noauto, fail, and nofail from the options line which is passed to mount. That would fix the problem here. I'll mark this as POST, but it might take a while for the commit to reach F21. systemd-216-16.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/systemd-216-16.fc21 Package systemd-216-16.fc21: * should fix your issue, * was pushed to the Fedora 21 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing systemd-216-16.fc21' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2015-0916/systemd-216-16.fc21 then log in and leave karma (feedback). systemd-216-16.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report. |