Bug 698456 - [RFE] Add -nobind option to avoid using bind mounts for specified maps
Summary: [RFE] Add -nobind option to avoid using bind mounts for specified maps
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: autofs
Version: 17
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Ian Kent
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-20 21:52 UTC by Neal Kim
Modified: 2013-04-29 02:55 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-04-29 02:55:02 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
[PATCH 1/3] autofs-5.0.5 - parse nobind option (2.32 KB, patch)
2011-04-20 21:53 UTC, Neal Kim
no flags Details | Diff
[PATCH 2/3] autofs-5.0.5 - set ap->flags accordingly if a map has nobind set (4.01 KB, patch)
2011-04-20 21:54 UTC, Neal Kim
no flags Details | Diff
[PATCH 3/3] autofs-5.0.5 - if a map has nobind set, don't try to bind mount (818 bytes, patch)
2011-04-20 21:54 UTC, Neal Kim
no flags Details | Diff
Patch - depricate nosymlink pseudo option (1.28 KB, patch)
2013-02-27 06:12 UTC, Ian Kent
no flags Details | Diff
Patch - add symlink pseudo option (7.17 KB, patch)
2013-02-27 06:14 UTC, Ian Kent
no flags Details | Diff

Description Neal Kim 2011-04-20 21:52:24 UTC
Description of problem:

RFE filed on behalf of Lars R. Damerow @ Pixar

The -nobind option simply tells automount to avoid using bind mounts for maps where it's specified, falling back to symlinks instead. We use this for the case where we can't wait for a bind mount to time out when we need to change the target for an automount key.

Version-Release number of selected component (if applicable):

autofs-5.0.5-x

Comment 1 Neal Kim 2011-04-20 21:53:22 UTC
Created attachment 493645 [details]
[PATCH 1/3] autofs-5.0.5 - parse nobind option

Comment 2 Neal Kim 2011-04-20 21:54:01 UTC
Created attachment 493646 [details]
[PATCH 2/3] autofs-5.0.5 - set ap->flags accordingly if a map has nobind set

Comment 3 Neal Kim 2011-04-20 21:54:41 UTC
Created attachment 493647 [details]
[PATCH 3/3] autofs-5.0.5 - if a map has nobind set, don't try to bind mount

Comment 4 Ian Kent 2011-04-21 00:38:08 UTC
This is something that I've been meaning to add for a very
long time so we don't have to recommend using the undocumented
nosymlink option.

I'm not sure that we need to exclude direct mounts though and
maybe the option should be handled in the nfs mount module.

Anyway, bottom line is, this is a sensible and needed change
and I'll I'll have a look at it as soon as I can.

Comment 5 Lars Damerow 2013-02-12 23:44:27 UTC
Hi Ian and Neal,

I'm looking at the latest RHEL 6.4 beta autofs bits as well as the git repository, and I can see that two of the attached patches made it in, but the one in comment 3 didn't (and the change doesn't work without it).

Also, commit d0895cec explicitly breaks the behavior I'm hoping to achieve; I intended "nobind" to still treat the mount as local, but just not to bind mount. After commit d0895cec, specifying nobind will always treat the mount as an NFS mount. However, the comments just preceding this recommend that you specify the "port=" option if you want that behavior. In light of that recommendation, can d0895cec be rolled back and the patch in comment 3 get applied?

I'll be doing that in my local version. I'm hoping you'll accept that change into upstream so that I can stop maintaining a local build. Also, it'd be awesome if the change could make it into RHEL 6.4, but I realize it's probably too late for that.

Thanks!
-lars

Comment 6 Ian Kent 2013-02-13 11:41:05 UTC
(In reply to comment #5)
> Hi Ian and Neal,
> 
> I'm looking at the latest RHEL 6.4 beta autofs bits as well as the git
> repository, and I can see that two of the attached patches made it in, but
> the one in comment 3 didn't (and the change doesn't work without it).

Yeah, I see I rolled the first two patches into one but seem to
have missed the third patch altogether.

Sorry about that.
I'll be needing to update Fedora soon so I'll take care of it
then, assuming we can work out how to handle this, see below.

> 
> Also, commit d0895cec explicitly breaks the behavior I'm hoping to achieve;
> I intended "nobind" to still treat the mount as local, but just not to bind
> mount. After commit d0895cec, specifying nobind will always treat the mount
> as an NFS mount. However, the comments just preceding this recommend that
> you specify the "port=" option if you want that behavior. In light of that
> recommendation, can d0895cec be rolled back and the patch in comment 3 get
> applied?

Now, this is going to be interesting.

IIRC that change was requested by someone else who doesn't want
quite the same behaviour. I'll need to track down source of that
commit and see if there really is a clash in requirements or if
there's another sensible solution that can satisfy everyone.

> 
> I'll be doing that in my local version. I'm hoping you'll accept that change
> into upstream so that I can stop maintaining a local build. Also, it'd be
> awesome if the change could make it into RHEL 6.4, but I realize it's
> probably too late for that.

Oh yeah, way too late, sorry I dropped the ball on this one.

Ian

Comment 7 Ian Kent 2013-02-18 07:16:56 UTC
(In reply to comment #6)
> 
> Now, this is going to be interesting.
> 
> IIRC that change was requested by someone else who doesn't want
> quite the same behaviour. I'll need to track down source of that
> commit and see if there really is a clash in requirements or if
> there's another sensible solution that can satisfy everyone.

Umm ... seems I was mistaken about this.

Leaving out that patch was a mistake on my part and it was picked
up by QE but too late to include in 6.4, so we have a 6.5 bug for
it.

Ian

Comment 8 Ian Kent 2013-02-25 10:04:27 UTC
(In reply to comment #5)
> Hi Ian and Neal,
> 
> I'm looking at the latest RHEL 6.4 beta autofs bits as well as the git
> repository, and I can see that two of the attached patches made it in, but
> the one in comment 3 didn't (and the change doesn't work without it).
> 
> Also, commit d0895cec explicitly breaks the behavior I'm hoping to achieve;
> I intended "nobind" to still treat the mount as local, but just not to bind
> mount. After commit d0895cec, specifying nobind will always treat the mount
> as an NFS mount. However, the comments just preceding this recommend that
> you specify the "port=" option if you want that behavior. In light of that
> recommendation, can d0895cec be rolled back and the patch in comment 3 get
> applied?

I see now where I went off the rails.

I already wanted to replace nosymlink with a nobind option because
that is what the nosymlink option does, prevents bind mounts.

So I got into that and by the time I got to the third patch I had
lost sight of the original request and there wasn't a description
in the patch to remind me what the original request was, oops!

> 
> I'll be doing that in my local version. I'm hoping you'll accept that change
> into upstream so that I can stop maintaining a local build. Also, it'd be
> awesome if the change could make it into RHEL 6.4, but I realize it's
> probably too late for that.

So, looking back now, I would like to keep the nobind option as it is
so how about another option, symlink, to instruct the bind module to
use a symlink instead of a bind mount?

Hopefully that won't cause too much inconvenience?

Ian

Comment 9 Ian Kent 2013-02-27 06:12:12 UTC
Created attachment 703278 [details]
Patch - depricate nosymlink pseudo option

Comment 10 Ian Kent 2013-02-27 06:14:09 UTC
Created attachment 703279 [details]
Patch - add symlink pseudo option

This is what I'm recommending.
It has the added advantage of not attempting to symlink
when it isn't possible to do so.

Comment 11 Fedora Update System 2013-03-12 05:33:56 UTC
autofs-5.0.6-24.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/autofs-5.0.6-24.fc17

Comment 12 Fedora Update System 2013-03-12 23:22:50 UTC
Package autofs-5.0.6-24.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing autofs-5.0.6-24.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-3751/autofs-5.0.6-24.fc17
then log in and leave karma (feedback).

Comment 13 Fedora Update System 2013-04-29 02:55:05 UTC
autofs-5.0.6-24.fc17 has been pushed to the Fedora 17 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.