public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Duncan <1i5t5.duncan@cox.net>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] Re: rfc: openrc use flag
Date: Thu, 21 Apr 2011 04:52:01 +0000 (UTC)	[thread overview]
Message-ID: <pan.2011.04.21.04.52.01@cox.net> (raw)
In-Reply-To: 20110420203327.36ae5c7d@pomiocik.lan

Michał Górny posted on Wed, 20 Apr 2011 20:33:27 +0200 as excerpted:

> On Wed, 20 Apr 2011 13:22:53 -0500 William Hubbs <williamh@gentoo.org>
> wrote:
> 
>> On Wed, Apr 20, 2011 at 10:02:41PM +0400, Peter Volkov wrote:
>> > В Срд, 20/04/2011 в 12:24 -0500, William Hubbs пишет:
>> > > The author of the bug feels that the way to fix this is for us to
>> > > put a check in openrc that makes it refuse to run services if it
>> > > was not used in the boot process.
>> > 
>> > This is good idea to have in any case since I remember my system went
>> > crazy after I've tried to start some service inside chroot.
>> 
>> My concern about it though is prefix installs.
> 
> [The attached patch] is based on the assumption that in order to run
> cleanly, OpenRC needs to do some cleanup in ${RC_SVCDIR} (e.g. to mark
> all services stopped). It assumes that the basic effect of a running
> OpenRC is a determined runlevel stored in ${RC_SVCDIR}/softlevel file.
> 
> I tested that approach with clean OpenRC and systemd installs, and it
> doesn't create any issues. I'd appreciate if someone with Prefix system
> could test it as well.

> http://bugs.gentoo.org/show_bug.cgi?id=364159.

The patch seems reasonable, but I can't but think that there's likely 
corner-cases that may be unknown ATM that could complicate things.  If we 
establish a slightly broader base now, it can be reasonably expanded in 
the future.

What about handling this much the same as subsystem-type auto-detection 
was ultimately handled, but controlling how much of openrc should run:

1) Auto: (like rc_sys being commented out).  This would do the auto-detect 
thing using something like the suggested softlevel file detection patch.

2) On:  Openrc is locked ON, and will try to handle everything.  This 
could be the default (much like rc_sys="").

3) Off: Openrc is locked OFF, and will immediately terminate as soon as it 
loads the config far enough to see that it is OFF, if anything attempts to 
run it.

4) Later? Nodep:  (Target stable-next?)  If the setting is "nodep", openrc 
should assume all deps are met and simply run the script it is asked to 
run, only.

5) Optionally, service.allowed: (Target bluesky?)  Another setting could 
list specific services that openrc should be allowed to run.  If 
service.allowed isn't empty/unset, anything not listed would not be run.  
Nodep mode would be altered slightly by this, in that any listed service 
could be depended normally, while anything not listed would be assumed to 
be dependency-met.  Normal (auto/on) mode would work in the reverse for 
anything not listed.  Since openrc isn't allowed to touch those services 
but is operating in normal dependency mode, to openrc they'd not exist and 
therefore block the start of any depending services as well.

6) Optionally, service.provided: To go along with #5, for openrc in normal 
mode, it could borrow the "package.provided" concept from portage, making 
it "service.provided".  For normal mode, services listed in this third 
setting, but ONLY these services, would be assumed to be met much as if 
openrc was operating in nodeps mode.  Services not in this list would be 
treated as above.  (This would allow openrc to nodep on services in 
service.provided, while failing OTHER deps not found in service.allowed, 
if service.allowed isn't empty/unset.

7) Optionally, service.blacklisted.  This would be the negative version of 
#5.  Presumably, if both service.allowed AND service.blacklisted are set 
and non-empty, one would take precedence and the other would be ignored 
(with documentation as to which was which).

Obviously #5-7 are wish-list, not really appropriate for our current 
target-stable.  However, *if* they were thought sufficiently useful to 
code up, these features could appear with a later version.

At least #1-3 should be quite easy to code and appropriate for stable, 
since the config concept and implementation has already been tested to 
some degree with the current but quite new subsystem-type implementation.

#4 falls in the middle.  I threw it in based on jer's suggestion, which 
I'd like to see even if #5-7 aren't implemented, but it's a big enough 
feature-add that it really should have additional testing. As such I don't 
see it for current-stable-target, but perhaps stable-next?

-- 
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




  reply	other threads:[~2011-04-21  4:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-20 17:24 [gentoo-dev] rfc: openrc use flag William Hubbs
2011-04-20 18:02 ` Peter Volkov
2011-04-20 18:20   ` Pacho Ramos
2011-04-21 19:30     ` William Hubbs
2011-04-21 20:03       ` Pacho Ramos
2011-04-21 20:52         ` William Hubbs
2011-04-22  9:50           ` Pacho Ramos
2011-04-22  8:26       ` Peter Volkov
2011-04-22  8:58         ` Michał Górny
2011-04-20 18:22   ` William Hubbs
2011-04-20 18:33     ` Michał Górny
2011-04-21  4:52       ` Duncan [this message]
2011-04-20 18:44     ` Fabian Groffen
2011-04-21  2:31   ` Jeroen Roovers
2011-04-21  4:34     ` William Hubbs
2011-04-21 19:05       ` William Hubbs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pan.2011.04.21.04.52.01@cox.net \
    --to=1i5t5.duncan@cox.net \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox