Gentoo Archives: gentoo-dev

From: Roy Marples <uberlord@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] RC_STRICT_NET_CHECKING or the net dependency
Date: Sun, 22 Oct 2006 11:57:27
Message-Id: 200610221252.57779.uberlord@gentoo.org
In Reply to: Re: [gentoo-dev] RC_STRICT_NET_CHECKING or the net dependency by Mike Frysinger
1 On Sunday 22 October 2006 03:08, Mike Frysinger wrote:
2 > On Saturday 21 October 2006 10:05, Roy Marples wrote:
3 > > baselayout-1.13 now handles multiple provides. That means that you have
4 > > can 3 or more services that provide "logger" and baselayout will pick the
5 > > right one based on what's running, then what's run the runlevel and
6 > > finally alphabetical order. As such, our net scripts all provide "net".
7 > > Handy that.
8 > >
9 > > RC_STRICT_NET_CHECKING is used in the init script depdency process, and
10 > > quite frankly I'd like to punt it and replace it with ...........
11 > > rc-update! Yes, just put the init scripts that "net" should provide in
12 > > your runlevel. boot contains net.lo by default and we also coldplug any
13 > > net devices by default too.
14 >
15 > you should outline how people would be able to get the existing behavior
16 > ... simply saying the new baselayout handles multiple provides doesnt
17 > exactly translate into RC_STRICT_NET_CHECKING no longer being needed
18 > -mike
19
20 OK, from my persepective we had RC_STRICT_NET_CHECKING because we couldn't
21 previously handle multiple provides. Here's how the new way translates.
22
23 none - net is always up
24 Well, this is now done by never having any net scripts in any runlevels. Kinda
25 kludgy really as you need a loopback for quite a few things.
26
27 lo - net is up if lo is up
28 Just have net.lo in the boot runlevel - it should always be there anyway.
29
30 yes - net is up if all net scripts in the runlevels are started.
31 Same behaviour as before. Well, actually this is the new default.
32
33 no - net is up if any interface except for lo is up
34 This is the tricky one as we have effectively lost it, so try and follow my
35 logic here. This is only really useful for people with >1 interface, namely
36 wired, wireless or ppp and we don't actually know which interface we will be
37 using - we don't even know if they will be on the same or different networks.
38
39 In this instance, the actual net services will bind to 0.0.0.0, which is all
40 interfaces available. So daemons themselves aren't the issue because if they
41 need to bind to a specific IP or interface, then the interface that provides
42 that should be in the same runlevel.
43
44 So our only concern would be a service that uses the network, like nfsmount.
45 But in this scenario, nfsmount is broken anyway as eth0 could be up on
46 1.2.3.4 and nfsmount works, then eth1 comes up on 5.6.7.8 and eth0 then
47 stops. The net dependency is satisfied so nfsmount stays up even though it's
48 obviously wrong. With "no", nfsmount would stop when eth1 stops, with the new
49 way it just stays up. Of course, you can bind nfsmount to a specific
50 interface by using the RC_NEED="net.eth1" in conf.d/nfsmount. I infact have
51 been using RC_NEED="openvpn" for my nfsmount as it only works across openvpn.
52
53 Hopefully this addresses everyones concerns.
54
55 Thanks
56
57 --
58 Roy Marples <uberlord@g.o>
59 Gentoo/Linux Developer (baselayout, networking)
60 --
61 gentoo-dev@g.o mailing list

Replies