1 |
On Fri, Aug 07, 2015 at 03:30:41PM -0400, Ian Stakenvicius wrote: |
2 |
> -----BEGIN PGP SIGNED MESSAGE----- |
3 |
> Hash: SHA256 |
4 |
> |
5 |
> On 07/08/15 03:18 PM, William Hubbs wrote: |
6 |
> > On Fri, Aug 07, 2015 at 01:39:25PM -0400, Ian Stakenvicius wrote: |
7 |
> >> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 |
8 |
> >> |
9 |
> >> On 07/08/15 12:59 PM, William Hubbs wrote: |
10 |
> >>> On Fri, Aug 07, 2015 at 12:10:56PM -0400, Ian Stakenvicius |
11 |
> >>> wrote: |
12 |
> >>>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 |
13 |
> >>>> |
14 |
> >>>> On 07/08/15 11:30 AM, William Hubbs wrote: |
15 |
> >>>>> On Thu, Aug 06, 2015 at 08:07:44PM -0400, Ian Stakenvicius |
16 |
> >>>>> wrote: |
17 |
> >>>>>> |
18 |
> >>>>>> Can we get "nofail" immediately in the mount -a variants |
19 |
> >>>>>> of localmount/netmount and expand that in netmount to |
20 |
> >>>>>> make the nfsclient dep be a "use" or a "need" depending |
21 |
> >>>>>> on if it's set or not?? That would imo kill the existing |
22 |
> >>>>>> bug that started all of this too. |
23 |
> >>>>> |
24 |
> >>>>> Sure, I can get the nofail support in pretty quick, and I |
25 |
> >>>>> think that is a feature we should have. |
26 |
> >>>>> |
27 |
> >>>>> Right now, netmount is using the use dependency to make |
28 |
> >>>>> sure network file system utilities are started before us. |
29 |
> >>>>> Because of the all-or-nothing nature of netmount, we can't |
30 |
> >>>>> switch those dependencies to need. It would cause netmount |
31 |
> >>>>> to fail if one of those utilities fails to start. The use |
32 |
> >>>>> dependency is the best one we can use at this time, and a |
33 |
> >>>>> migration path was specifically laid out in the news item. |
34 |
> >>>>> |
35 |
> >>>> |
36 |
> >>>> My thinking here is that, unless network mounts in fstab are |
37 |
> >>>> listed as 'nofail', that netmount failing due to the |
38 |
> >>>> dependent services not being able to start would be a valid |
39 |
> >>>> case. Sysadmins that don't want netmount to fail no matter |
40 |
> >>>> what would be able to use 'nofail' to ensure that happens. |
41 |
> >>>> |
42 |
> >>>> This is of course predicated on (1) it being a good idea, |
43 |
> >>>> and (2) fstabinfo or whatever the check currently is that |
44 |
> >>>> would add nfsclient to depend() could easily swap 'use' for |
45 |
> >>>> 'need' based on the (lack of) existence of the nofail |
46 |
> >>>> attribute in fstab. |
47 |
> >>> |
48 |
> >>> The issue with using the need dependency is that netmount is |
49 |
> >>> not granular enough. It mounts all types of network file |
50 |
> >>> systems, so if we fail because nfs is a need dependency and |
51 |
> >>> doesn't start, no other types of network file systems that use |
52 |
> >>> daemons will be mounted. That's what I meant by |
53 |
> >>> all-or-nothing. |
54 |
> >>> |
55 |
> >>> William |
56 |
> >>> |
57 |
> >> |
58 |
> >> Yes I follow that. My thoughts are #1, netmount (and localmount |
59 |
> >> for that matter) are all-or-nothing things; so if the service |
60 |
> >> fails then I don't think anything can necessarily be assumed as |
61 |
> >> to which mounts succeeded and which don't. |
62 |
> > |
63 |
> > Yes, they are, but mount and umount -a are not. They can report |
64 |
> > partial failures (check the exit codes). |
65 |
> > |
66 |
> > If I switch to using need dependencies for the file system clients, |
67 |
> > and one fails to start, mount -a would never run, which means NO |
68 |
> > net-based file systems that use clients would be mounted. |
69 |
> |
70 |
> Yeah I follow that, I just don't see that as something we need to |
71 |
> avoid given it can be avoided on systems by keeping netmount from |
72 |
> failing via 'nofail' on nfs mounts in fstab (or there being no 'auto' |
73 |
> nfs mounts in fstab to begin with) |
74 |
> |
75 |
> If the plan is that localmount and netmount will return error and fail |
76 |
> when one-or-more fstab entries with 'auto' and without 'nofail' can't |
77 |
> be mounted, then I see it as being convenient that netmount would |
78 |
> mount the other filesystems, but not imperative. |
79 |
|
80 |
That's exactly what mount -a -t ... does; it tries to mount everything |
81 |
of the specified types that does not have noauto in the options. If |
82 |
nofail is in the options for a file system, it doesn't report failure |
83 |
for that file system if it doesn't mount. |
84 |
|
85 |
I would rather err on the side of convenience in this case. |
86 |
|
87 |
> |
88 |
> (in case i wasn't clear earlier, i am talking about the 'need' vs |
89 |
> 'use' being dynamically chosen by the script; yes it's almost as evil |
90 |
> as the dynamic choices in depend() that might be necessary to do a |
91 |
> 'localmount' wrapper around mount.* services, but instead of it being |
92 |
> done for -everything- it's at least only done for one or a few corner |
93 |
> cases -- that being nfs mounts but there are likely others that need |
94 |
> daemons started at runtime) |
95 |
> |
96 |
> |
97 |
> > My thinking is to allow things to mount that can, but still report |
98 |
> > it as a failure if everything doesn't mount. |
99 |
> |
100 |
> Except for the fact that this isn't possible with a 'need' on |
101 |
> nfsclient, I think it's a great plan. :) |
102 |
|
103 |
Absolutely, and that is why I have issues with using "need" for |
104 |
file system clients like nfsclient. |
105 |
|
106 |
I see it as changing netmount's behaviour in a bad way. |
107 |
|
108 |
William |