Gentoo Archives: gentoo-dev

From: William Hubbs <williamh@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: rfc: improve file system mounting and unmounting in OpenRC
Date: Fri, 07 Aug 2015 19:18:19
Message-Id: 20150807191808.GA14368@linux1.gaikai.biz
In Reply to: Re: [gentoo-dev] Re: rfc: improve file system mounting and unmounting in OpenRC by Ian Stakenvicius
1 On Fri, Aug 07, 2015 at 01:39:25PM -0400, Ian Stakenvicius wrote:
2 > -----BEGIN PGP SIGNED MESSAGE-----
3 > Hash: SHA256
4 >
5 > On 07/08/15 12:59 PM, William Hubbs wrote:
6 > > On Fri, Aug 07, 2015 at 12:10:56PM -0400, Ian Stakenvicius wrote:
7 > >> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
8 > >>
9 > >> On 07/08/15 11:30 AM, William Hubbs wrote:
10 > >>> On Thu, Aug 06, 2015 at 08:07:44PM -0400, Ian Stakenvicius
11 > >>> wrote:
12 > >>>>
13 > >>>> Can we get "nofail" immediately in the mount -a variants of
14 > >>>> localmount/netmount and expand that in netmount to make the
15 > >>>> nfsclient dep be a "use" or a "need" depending on if it's set
16 > >>>> or not?? That would imo kill the existing bug that started
17 > >>>> all of this too.
18 > >>>
19 > >>> Sure, I can get the nofail support in pretty quick, and I
20 > >>> think that is a feature we should have.
21 > >>>
22 > >>> Right now, netmount is using the use dependency to make sure
23 > >>> network file system utilities are started before us. Because
24 > >>> of the all-or-nothing nature of netmount, we can't switch
25 > >>> those dependencies to need. It would cause netmount to fail if
26 > >>> one of those utilities fails to start. The use dependency is
27 > >>> the best one we can use at this time, and a migration path was
28 > >>> specifically laid out in the news item.
29 > >>>
30 > >>
31 > >> My thinking here is that, unless network mounts in fstab are
32 > >> listed as 'nofail', that netmount failing due to the dependent
33 > >> services not being able to start would be a valid case.
34 > >> Sysadmins that don't want netmount to fail no matter what would
35 > >> be able to use 'nofail' to ensure that happens.
36 > >>
37 > >> This is of course predicated on (1) it being a good idea, and
38 > >> (2) fstabinfo or whatever the check currently is that would add
39 > >> nfsclient to depend() could easily swap 'use' for 'need' based on
40 > >> the (lack of) existence of the nofail attribute in fstab.
41 > >
42 > > The issue with using the need dependency is that netmount is not
43 > > granular enough. It mounts all types of network file systems, so if
44 > > we fail because nfs is a need dependency and doesn't start, no
45 > > other types of network file systems that use daemons will be
46 > > mounted. That's what I meant by all-or-nothing.
47 > >
48 > > William
49 > >
50 >
51 > Yes I follow that. My thoughts are #1, netmount (and localmount for
52 > that matter) are all-or-nothing things; so if the service fails then I
53 > don't think anything can necessarily be assumed as to which mounts
54 > succeeded and which don't.
55
56 Yes, they are, but mount and umount -a are not. They can report partial
57 failures (check the exit codes).
58
59 If I switch to using need dependencies for the file system clients, and
60 one fails to start, mount -a would never run, which means NO net-based
61 file systems that use clients would be mounted.
62
63 My thinking is to allow things to mount that can, but still report it as
64 a failure if everything doesn't mount.
65
66 Thoughts?
67
68 William

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies