On Fri, 04.11.16 09:38, Bjørn Forsman (bjorn.fors...@gmail.com) wrote: > Hi Lennart, > > On 3 November 2016 at 20:19, Lennart Poettering <lenn...@poettering.net> > wrote: > > Your mail does not say in any way what precisely your issue is? > > Did you read the first post? I hope not, because I don't really know > how to describe it more precisely than that :-) > > Below is a copy of the first post. > > When a mount unit fails (repeatedly), it takes the corresponding > automount unit down with it. To me this breaks a very nice property > I'd like to have: > > A mountpoint should EITHER return the mounted filesystem OR return an error. > > As it is now, when the automount unit has failed, programs accessing > the mountpoint will not receive any errors and instead silently access > the local filesystem. That's bad! > > I don't consider using mountpoint(1) or "test > mountpoint/IF_YOU_SEE_THIS_ITS_NOT_MOUNTED" proper solutions, because > they are out-of-band. > > I was thinking of adding Restart=always to the automount unit, but > that still leaves a small timeframe where autofs is not active. So > that's not ideal either. Also, using Restart= implies a proper .mount > unit instead of /etc/fstab, but GVFS continuously activates autofs > mounts unless the option "x-gvfs-hide" is in /etc/fstab. So I'm kind > of stuck with /etc/fstab until that GVFS issue is solved. > > So the question is, what is the reason for the mount unit to take down > the automount? I figure the automount should simply never fail.
Consider turning off the start limits of the mount unit if you don't want systemd to give up eventually. Use StartLimitInterval= and StartLimitBurst= in the mount unit file for that. Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel