Re: [systemd-devel] automount unit that never fails?

2016-11-04 Thread Lennart Poettering
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  
> 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


Re: [systemd-devel] automount unit that never fails?

2016-11-04 Thread Michael Chapman

On Tue, 20 Sep 2016, Bjørn Forsman wrote:

Hi systemd developers,

My name is Bjørn Forsman and this is my first post to this list. I
have a question/issue with the behaviour of (auto)mount units.

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!


Hi Bjørn,

For what it's worth, I'm not able to reproduce this on Fedora 24, systemd 
229.


I set up test automount and mount units, gave the mount unit bogus 
options, and started the automount unit. When accessing the mount point I 
got ENODEV errors until systemd reached the burst limit on the mount unit, 
at which point access to the mount point simply blocked completely. At no 
time did the automount unit ever fail or stop though.


Now I did this with just a tmpfs filesystem, but I can't imagine the 
behaviour would be different with sshfs.


So perhaps some regression between systemd 229 and 231?

- Michael___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] automount unit that never fails?

2016-11-04 Thread Bjørn Forsman
Hi Lennart,

On 3 November 2016 at 20:19, Lennart Poettering  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.

Thoughs?

(I'm running NixOS 16.09 with systemd 231, trying to setup robust,
lazy sshfs mount.)

Best regards,
Bjørn Forsman
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] automount unit that never fails?

2016-11-03 Thread Lennart Poettering
On Sat, 29.10.16 14:20, Bjørn Forsman (bjorn.fors...@gmail.com) wrote:

> On 1 October 2016 at 17:14, Bjørn Forsman  wrote:
> > On 20 September 2016 at 09:08, Bjørn Forsman  
> > wrote:
> >> I have a question/issue with the behaviour of (auto)mount units.
> >> [...]
> >
> > Bump.
> 
> Bump again. Anyone?

Your mail does not say in any way what precisely your issue is?

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] automount unit that never fails?

2016-10-29 Thread Bjørn Forsman
On 1 October 2016 at 17:14, Bjørn Forsman  wrote:
> On 20 September 2016 at 09:08, Bjørn Forsman  wrote:
>> I have a question/issue with the behaviour of (auto)mount units.
>> [...]
>
> Bump.

Bump again. Anyone?

If systemd + automount isn't the solution to automatically (and
robustly) mount remote filesystems (in my case sshfs), what is?

Best regards,
Bjørn Forsman
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] automount unit that never fails?

2016-09-20 Thread Bjørn Forsman
Hi systemd developers,

My name is Bjørn Forsman and this is my first post to this list. I
have a question/issue with the behaviour of (auto)mount units.

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.

Thoughs?

(I'm running NixOS 16.09 with systemd 231, trying to setup robust,
lazy sshfs mount.)

Best regards,
Bjørn Forsman
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel