Bug 1371796 - Unable to un-mount paths from my stackable fs using timeout option in autofs
Summary: Unable to un-mount paths from my stackable fs using timeout option in autofs
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: autofs
Version: 6.5
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Ian Kent
QA Contact: xiaoli feng
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-31 06:58 UTC by hkaur
Modified: 2017-12-06 10:42 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-06 10:42:15 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description hkaur 2016-08-31 06:58:18 UTC
I am trying to use autofs to automatically mount paths on my stackable fs when they are accesssed and unmount them after the configured 'timeout' limit set in auto.master config file. 
I normally use my <custom> application to mount/unmount paths. 

My auto.master configuration file and my rule file look like below-
[root@localhost ~]# cat /etc/auto.master
/-    /etc/auto.rule  --timeout=60

[root@localhost ~]# cat /etc/auto.rule
/1 -fstype=<custom>fs   :/1 

Let's assume that /1 is the path that I am trying to mount on my stackable fs.

But after 60 seconds of inactivity on the path, autofs is not able to automatically unmount it from my stackable fs. 

The last autofs logs that I see are -
[root@localhost sbin]# ./automount -v -f
Starting automounter version 5.0.5-123.el6, master map auto.master
using kernel protocol version 5.02
lookup_read_master: lookup(nisplus): couldn't locate nis+ table auto.master
lookup(file): failed to read included master map auto.master
mounted direct on /1 with timeout 60, freq 2 seconds
< Nothing displayed after this >

Is autofs really trying to un-mount since there are no logs related to that, as shown above? Please explain as to how I would be able to achieve un-mounting using the autofs through timeout option. Only when I restart the autofs service am I able to see the path getting un-mounted from my stackable fs.

Thanks

Comment 2 Ian Kent 2016-09-01 00:38:19 UTC
(In reply to hkaur from comment #0)
> I am trying to use autofs to automatically mount paths on my stackable fs
> when they are accesssed and unmount them after the configured 'timeout'
> limit set in auto.master config file. 
> I normally use my <custom> application to mount/unmount paths. 
> 
> My auto.master configuration file and my rule file look like below-
> [root@localhost ~]# cat /etc/auto.master
> /-    /etc/auto.rule  --timeout=60
> 
> [root@localhost ~]# cat /etc/auto.rule
> /1 -fstype=<custom>fs   :/1 
> 
> Let's assume that /1 is the path that I am trying to mount on my stackable
> fs.

Looks like that can't work.

In order to trigger mounts automount managed paths need to
be either the root of or contained in an autofs file system.

Otherwise the kernel won't be aware the path has been accessed
and won't be able to call back to the user space daemon to a
perform mount.

In auto.rule you are mounting a direct mount trigger on path /1
so it covers the original mount at /1. So if it is accessed it
will try and mount itself.

That's probably enough to hang the mount.

Ian

Comment 5 Jan Kurik 2017-12-06 10:42:15 UTC
Red Hat Enterprise Linux 6 is in the Production 3 Phase. During the Production 3 Phase, Critical impact Security Advisories (RHSAs) and selected Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available.

The official life cycle policy can be reviewed here:

http://redhat.com/rhel/lifecycle

This issue does not meet the inclusion criteria for the Production 3 Phase and will be marked as CLOSED/WONTFIX. If this remains a critical requirement, please contact Red Hat Customer Support to request a re-evaluation of the issue, citing a clear business justification. Note that a strong business justification will be required for re-evaluation. Red Hat Customer Support can be contacted via the Red Hat Customer Portal at the following URL:

https://access.redhat.com/


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