1 |
-----BEGIN PGP SIGNED MESSAGE----- |
2 |
Hash: SHA256 |
3 |
|
4 |
On 05/08/15 10:01 AM, William Hubbs wrote: |
5 |
> On Wed, Aug 05, 2015 at 04:50:40AM +0000, Duncan wrote: |
6 |
>> Ian Stakenvicius posted on Tue, 04 Aug 2015 17:17:51 -0400 as |
7 |
>> excerpted: |
8 |
>> |
9 |
>>> So what you are suggesting here now is that you want to (A) |
10 |
>>> potentially break mounting with the need to externally manage |
11 |
>>> mounts via services in openrc instead of just using /etc/fstab, |
12 |
>>> and (B) also break services if something doesn't start, which |
13 |
>>> is one of the reasons why you wanted to go through with this |
14 |
>>> per-mount service in the first place. My point is that no, we |
15 |
>>> should keep localmount as succeeding even if one of the |
16 |
>>> dependent services fails to mount, *just like it does right |
17 |
>>> now*, *for the same reasons* as it succeeds on failure right |
18 |
>>> now. |
19 |
>> |
20 |
>> +1 |
21 |
>> |
22 |
>> IMO, localmount must continue to succeed /by/ /default/, even if |
23 |
>> some mounts fail, because it's basically legacy, and must |
24 |
>> maintain legacy behavior. Turning it into a wrapper "internally" |
25 |
>> is fine, but the overall localmount must still succeed, as too |
26 |
>> much depends on that behavior as it is. |
27 |
> |
28 |
> Here's what I'm trying to deal with. Consider what happens if |
29 |
> service a still has "need localmount" and service b has "need |
30 |
> mount.foo". |
31 |
> |
32 |
> Mounting a file system twice causes failures the second time it is |
33 |
> mounted, so I either have to add special handling in the new |
34 |
> mount script for file systems that are already mounted or come up |
35 |
> with a way to make sure localmount runs after all instances of the |
36 |
> new mount script. |
37 |
|
38 |
Yes. I sincerely hope this was always part of the plan??? |
39 |
|
40 |
If localmount is kept as a 'mount -a' then it won't remount anything |
41 |
that's already been mounted, so nothing to worry about there. If it's |
42 |
a wrapper to the individual local mount.*'s then it just has to |
43 |
depend() on them all via a need/want (so that they will be brought in |
44 |
even if they aren't in the runlevel) and/or the mount.*'s need a |
45 |
'before localmount' so that they're definitely started/attempted |
46 |
first. Am I missing something that makes this harder than it seems? |
47 |
|
48 |
|
49 |
> |
50 |
> The issue with making sure all mount scripts run before localmount |
51 |
> would complicate things more for users because they would have to |
52 |
> add the mount.foo symlinks to the appropriate runlevels (boot for |
53 |
> local file systems and default for network ones). |
54 |
|
55 |
Likely true as things stand now, which is why I expect major changes |
56 |
would be needed in openrc internals to make it so this is not |
57 |
necessary. At minimum, "want" dependencies would need to be used so |
58 |
that if mount.foo's don't exist they won't cause depend() failures. |
59 |
|
60 |
(You thought this system was going to let you get away with -not- |
61 |
using 'want' for mounting, didn't you? :) |
62 |
|
63 |
Of course this still doesn't handle how depend() sections will be |
64 |
dynamically generated from /etc/fstab in the first place, nor how the |
65 |
cache will be affected by this; so there's still lots of work to do to |
66 |
sort that out. |
67 |
|
68 |
> |
69 |
> If I did add special handling to the mount script for an |
70 |
> already-mounted file system, what should that be -- to ignore it or |
71 |
> remount it? I'm tending toward remount. |
72 |
|
73 |
Well you're already deciding to return success if the mount.foo |
74 |
doesn't actually point to a real mount, so I don't see why this can't |
75 |
be extended to return success if the filesystem is already mounted |
76 |
too. But either way, so long as it works. |
77 |
|
78 |
|
79 |
-----BEGIN PGP SIGNATURE----- |
80 |
Version: GnuPG v2 |
81 |
|
82 |
iF4EAREIAAYFAlXCGyUACgkQAJxUfCtlWe1VngD+P8nVY6FUbYmzcQvRIP7GUi+h |
83 |
Q6V2C+q1yq3Hr1AcqhQBAKGvn790n+XmMiYAbprRFqT4cmWRobEFnhlnPnnQQyuI |
84 |
=jhE8 |
85 |
-----END PGP SIGNATURE----- |