FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 08-25-2012, 04:14 AM
Diego Elio Pettenò
 
Default rfc: OpenRC network provides revisited

On 24/08/2012 20:57, William Hubbs wrote:
> in your /etc/conf.d/sshd file.

Looks good.. most people who have especially complex configurations
would already be doing this.

--
Diego Elio Pettenò — Flameeyes
flameeyes@flameeyes.eu — http://blog.flameeyes.eu/
 
Old 08-25-2012, 05:14 AM
Duncan
 
Default rfc: OpenRC network provides revisited

Ian Stakenvicius posted on Fri, 24 Aug 2012 21:17:29 -0400 as excerpted:

> One thing, though, that i'm not certain of is How the different
> runlevels interact -- ie if "net" is started (considered up) at "boot",
> it should be (and i assume is, but could be wrong) "up" during "default"
> or whatever other runlevel there is, right? I know it was with
> baselayout-1 (which i'm actually still running on my NFS-root cluster).

Yes, it still works that way.

--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
 
Old 08-25-2012, 06:19 AM
 
Default rfc: OpenRC network provides revisited

William Hubbs <williamh@gentoo.org> writes:

> If you are running services that "need net" and you have turned off all
> of the "net" providers by adding something like rc_provide="!net" to
> their conf.d files, the services that need net will fail hard even
> though they shouldn't.

If we set rc_provide="net" in rc.conf, the services that need net can be
tricked as we intended to.
 
Old 08-25-2012, 03:53 PM
William Hubbs
 
Default rfc: OpenRC network provides revisited

On Sat, Aug 25, 2012 at 03:19:24PM +0900, heroxbd@gentoo.org wrote:
> If we set rc_provide="net" in rc.conf, the services that need net can be
> tricked as we intended to.

Setting rc_provide, rc_need, rc_use, etc in rc.conf is definitely not
recommended. Remember that this affects all services on your system.

when you set rc_provide="net" in rc.conf, you are saying that every service on
your system provides net.

William
 
Old 08-25-2012, 06:49 PM
Ian Stakenvicius
 
Default rfc: OpenRC network provides revisited

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 25/08/12 11:53 AM, William Hubbs wrote:
> On Sat, Aug 25, 2012 at 03:19:24PM +0900, heroxbd@gentoo.org
> wrote:
>> If we set rc_provide="net" in rc.conf, the services that need net
>> can be tricked as we intended to.

This makes more sense to me as it's in the direction that seems more
logical -- make "net" be provided instantly, rather than forcibly
changing the dependency on each (or all) "net"-using service(s).


>
> Setting rc_provide, rc_need, rc_use, etc in rc.conf is definitely
> not recommended. Remember that this affects all services on your
> system.
>
> when you set rc_provide="net" in rc.conf, you are saying that every
> service on your system provides net.
>
> William

rc_modules_provide="net" ? rc_localmount_provide="net" ? There are a
number of required services that could be used to assign "net" to..

(And i would think that this specification should occur in rc.conf
rather than a file in /etc/conf.d , simply because it's something (in
the case of NFS root, etc) that's akin to rc_depend_strict or rc_sys
in terms of its impact on the whole openrc configuration)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)

iF4EAREIAAYFAlA5HkMACgkQ2ugaI38ACPDR5QEAkthP24HOhT Zf+Nwhg8888mjS
XGZFFAuYj6iG8j7CU2kBALwvt2dxmHLMNO96rMAx7w6uKw9Gga d4tKssNQu+ePq/
=HrBr
-----END PGP SIGNATURE-----
 
Old 08-25-2012, 08:16 PM
William Hubbs
 
Default rfc: OpenRC network provides revisited

On Sat, Aug 25, 2012 at 02:49:39PM -0400, Ian Stakenvicius wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> On 25/08/12 11:53 AM, William Hubbs wrote:
> > On Sat, Aug 25, 2012 at 03:19:24PM +0900, heroxbd@gentoo.org
> > wrote:
> >> If we set rc_provide="net" in rc.conf, the services that need net
> >> can be tricked as we intended to.
>
> This makes more sense to me as it's in the direction that seems more
> logical -- make "net" be provided instantly, rather than forcibly
> changing the dependency on each (or all) "net"-using service(s).

But your words bring us back to the issue I am considering anyway. I
think we should change services that have "need net" in their depends to
something like "use net; after net". "use net" tries to start a "net"
service if one is in the runlevel and none are already started. Using
"after net" makes sure that the service goes down before any net
services.

That way, if someone removes all net-providing services from their
runlevels, services like sshd would still start. Also, if there are
net-providing services in the runlevels, it would attempt to start them
before sshd.

The bottom line here is: I don't think all of the services we have set
up to "need net" in their default configuration should be set up that
way. It would make OpenRC work out of the box for many more
configurations.

> rc_modules_provide="net" ? rc_localmount_provide="net" ? There are a
> number of required services that could be used to assign "net" to..

rc_[service]_provide="net" imo is the best way to do this if you are
putting the variable in rc.conf. That format just says that the one
particular service provides net. On the other hand, if you use
rc_provide="net" in rc.conf, you are saying that *all* services on your
system and any new services you install later provide net.

> (And i would think that this specification should occur in rc.conf
> rather than a file in /etc/conf.d , simply because it's something (in
> the case of NFS root, etc) that's akin to rc_depend_strict or rc_sys
> in terms of its impact on the whole openrc configuration)

This is really more an idiology thing I guess, but I think if you are
tweeking a specific service it should be done in the /etc/conf.d/service
file. To follow the example above, to make a particular service provide
net, it is better imo to put rc_provide="net" in /etc/conf.d/service.

If you want to change this in rc.conf, use the rc_[service]_[depend]
variable instead of rc_[depend]. RC_[depend] in rc.conf will apply that
dependency to *all* services on your system, including any new ones that
get installed later, so be absolutely sure you know what you are doing
if you use this.

William
 
Old 08-27-2012, 12:42 PM
Ian Stakenvicius
 
Default rfc: OpenRC network provides revisited

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 25/08/12 04:16 PM, William Hubbs wrote:
>
> The bottom line here is: I don't think all of the services we have
> set up to "need net" in their default configuration should be set
> up that way. It would make OpenRC work out of the box for many
> more configurations. [ Snip! ] This is really more an idiology
> thing I guess, but I think if you are tweeking a specific service
> it should be done in the /etc/conf.d/service file. To follow the
> example above, to make a particular service provide net, it is
> better imo to put rc_provide="net" in /etc/conf.d/service.
>
> If you want to change this in rc.conf, use the
> rc_[service]_[depend] variable instead of rc_[depend]. RC_[depend]
> in rc.conf will apply that dependency to *all* services on your
> system, including any new ones that get installed later, so be
> absolutely sure you know what you are doing if you use this.

I concurr with your analysis, just not your conclusions. I very
much like (and depend on, in certain cases) the way depends on the
'net' service are set now, and would prefer they stay that way.
Relatedly, since the only cases I'm aware of where it is desired for
this to change are cases such as NFS-roots or vm's/containers where
the 'net' service is up before openrc begins, to me this is a
system-wide effect and not something that should be tweaked
per-service. To change the default and then require per-service
tweaks to get old behaviour back is imo not a particularly good idea.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)

iF4EAREIAAYFAlA7axoACgkQ2ugaI38ACPDAfAD/YpiHpAp2tMDhqBm5V19KTmwU
BgavBXMATRcJeWETmV4A/1egNPg7i1pRpzWTLa7//Ano108rRQ9Ff9xZN01EBh1E
=N0n2
-----END PGP SIGNATURE-----
 

Thread Tools




All times are GMT. The time now is 10:41 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org