Re: Autofs + shared mount namespaces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/09/17 21:17, Badics, Alex wrote:
> Hi,
> 
> We've been trying out autofs with both systemd-automount and the
> autofs userspace daemon, and it seems like it incorrectly marks a
> mountpoint as "expired" even though it's still in use in a different
> mount namespace. Am I doing something wrong? Are mount namespaces
> supported by the autofs driver?

There are challenges with namespaces that I'm unable to resolve.

The specific behavior your seeing is one of those problems.

I'm unable to find a way to check propogated mounts.

I tried recently and could only come up with a method that was
order n squared cost with the number of mounts which was, as you
would expect, rejected upstream.

And what kernel version are you using?

> 
> Reproduction:
> /etc/autofs/auto.master:
> /mnt/test   /etc/autofs/auto.test.nfs --timeout 10
> 
> /etc/autofs/auto.test.nfs:
> test  -rw,soft,intr server.domain:/exports/nfs
> 
> On one tab, I start autofs:
> # automount -f -v
> 
> On another, I unshare a namespace, and cd into the test directory:
> # cd /mnt
> # unshare -m --propagation shared
> # cd test/test
> 
> And just wait. The mount correctly happens, but after 10 seconds, the
> autofs daemon gets an expired message and tries to umount hte nfs
> mount, and fails, because it's busy. It retries until I cd out of the
> nfs directory, then it of course succeeds:
> 
> Starting automounter version 5.1.3, master map auto.master
> using kernel protocol version 5.02
> mounted indirect on /mnt/test with timeout 10, freq 3 seconds
> attempting to mount entry /mnt/test/test
> mounted /mnt/test/test
> 1 remaining in /mnt/test
> 1 remaining in /mnt/test
> 1 remaining in /mnt/test
> expiring path /mnt/test/test
>>> umount.nfs4: /mnt/test/test: device is busy
>>> umount.nfs4: /mnt/test/test: device is busy
>>> umount.nfs4: /mnt/test/test: device is busy
> Unable to update the mtab file, /proc/mounts and /etc/mtab will differ
> expired /mnt/test/test
> 1 remaining in /mnt/test
> 1 remaining in /mnt/test
> 1 remaining in /mnt/test
> 1 remaining in /mnt/test
> expiring path /mnt/test/test
> expired /mnt/test/test

What is it your trying to do?
How would you like this to behave?

Keep in mind that a mount namespace is little more than a view of
the set of current mounts so there is limited mount independence
possible.

Ian
--
To unsubscribe from this list: send the line "unsubscribe autofs" in



[Index of Archives]     [Linux Filesystem Development]     [Linux Ext4]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux