https://tracker.ceph.com/https://tracker.ceph.com/favicon.ico2017-03-27T03:39:03ZCeph CephFS - Bug #19388: mount.ceph does not accept -s optionhttps://tracker.ceph.com/issues/19388?journal_id=880152017-03-27T03:39:03ZKefu Chaitchaikov@gmail.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Fix Under Review</i></li><li><strong>Assignee</strong> set to <i>Michel Roelofs</i></li></ul><p><a class="external" href="https://github.com/ceph/ceph/pull/14158">https://github.com/ceph/ceph/pull/14158</a></p> CephFS - Bug #19388: mount.ceph does not accept -s optionhttps://tracker.ceph.com/issues/19388?journal_id=880262017-03-27T10:32:26ZJohn Sprayjcspray@gmail.com
<ul></ul><p>According to the release notes, autofs 5.1.1 includes a fix to avoid passing -s to filesystems other than NFS (<a class="external" href="https://lwn.net/Articles/641188/">https://lwn.net/Articles/641188/</a>)</p>
<p>Is the idea here just to work around a bug for people running versions of autofs that were passing -s wrongly?</p> CephFS - Bug #19388: mount.ceph does not accept -s optionhttps://tracker.ceph.com/issues/19388?journal_id=880452017-03-27T17:24:07ZMichel Roelofs
<ul></ul><p>I wasn't aware of this fix in autofs, thanks for pointing me to it.</p>
<p>However, several mount programs accept the -s option as well. So it may be more convenient and consistent to add support for it in mount.ceph than to wait for the fixed autofs package to be deployed to all distributions. My workaround so far is to create another filesystem type in LDAP (e.g. cephautofs), so that autofs invokes /sbin/mount.cephautofs that in turn strips out the -s option.</p> CephFS - Bug #19388: mount.ceph does not accept -s optionhttps://tracker.ceph.com/issues/19388?journal_id=880462017-03-27T17:26:59ZJohn Sprayjcspray@gmail.com
<ul></ul><p>OK, if you're motivated to do this (and update the pull request to implement -s rather than dropping it) then I don't have a problem with it.</p> CephFS - Bug #19388: mount.ceph does not accept -s optionhttps://tracker.ceph.com/issues/19388?journal_id=883492017-04-03T20:15:36ZMichel Roelofs
<ul></ul><p>Looking at it, it seems I'll have to update the Linux kernel as well to support the sloppy option. Doing so in a sane way would either require a significant rewrite, or I'd add it to ceph_parse_options in ceph_common.c and with that make 'sloppy' also available to rbd.</p>
<p>Does anybody have a preference, or an alternative idea?</p> CephFS - Bug #19388: mount.ceph does not accept -s optionhttps://tracker.ceph.com/issues/19388?journal_id=884692017-04-04T21:05:27ZJohn Sprayjcspray@gmail.com
<ul></ul><p>The kernel client has a mount helper in src/mount/mount.ceph.c -- although that only comes into play if the ceph packages are installed on the node as well as the kernel being there. Still, if someone happened to be using the buggy autofs and a kernel cephfs moutn then they could just be told that they need the userspace mount utility.</p> CephFS - Bug #19388: mount.ceph does not accept -s optionhttps://tracker.ceph.com/issues/19388?journal_id=887042017-04-09T13:16:54ZMichel Roelofs
<ul></ul><p>mount.ceph passes options which it does not recognize directly to the kernel mount function, therefore a full implementation of 'sloppy' functionality cannot be done in user space alone. I now modified mount.ceph.c to pass 'sloppy' to the kernel when the '-s' commandline options is specified, and I added the 'sloppy' implementation to the net/ceph/ceph_common.c kernel code. The kernel behavior is like with nfs.</p>
<p>If you agree with this approach I will create two new pull requests: for the kernel and for Ceph.</p> CephFS - Bug #19388: mount.ceph does not accept -s optionhttps://tracker.ceph.com/issues/19388?journal_id=887082017-04-09T17:30:32ZJohn Sprayjcspray@gmail.com
<ul></ul><p>Fair point about options getting passed through.</p>
<p>The thing I'm not sure about here is who is going to backport a fix for the kernel cephfs driver, but wouldn't backport a fix for autofs? Anyone running a very recent kernel is presumably also going to be running a sufficiently recent version of autofs that they don't have the issue anyway, so why bother adding a workaround?</p>
<p>Reading this thread (<a class="external" href="http://www.spinics.net/lists/autofs/msg01009.html">http://www.spinics.net/lists/autofs/msg01009.html</a>) it seems like something that the maintainers noticed pretty quickly and addressed, so I'm unclear on what systems in the wild are really still having this problem.</p>
<p>My hunch is that backporting the autofs fix to debian jessie is probably going to be a simpler journey than trying to get a linux kernel patch backported, when the patch is just working around a userspace bug anyway.</p> CephFS - Bug #19388: mount.ceph does not accept -s optionhttps://tracker.ceph.com/issues/19388?journal_id=888462017-04-11T19:22:40ZMichel Roelofs
<ul></ul><p>Looking at the complete picture, I think it's easiest (and acceptable for me) to wait for Jessie's successor, Stretch, to be released. In Stretch RC3, autofs works properly out of the box calling /sbin/mount.ceph.</p>
<p>The bug may be closed.</p>
<p>Thanks for your feedback.</p> CephFS - Bug #19388: mount.ceph does not accept -s optionhttps://tracker.ceph.com/issues/19388?journal_id=889302017-04-12T11:54:58ZJohn Sprayjcspray@gmail.com
<ul><li><strong>Status</strong> changed from <i>Fix Under Review</i> to <i>Closed</i></li></ul>