Gentoo Archives: gentoo-dev

From: William Hubbs <williamh@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] rfc: generic "container" keyword for init scripts
Date: Tue, 01 Dec 2015 21:29:10
Message-Id: 20151201212844.GA2154@whubbs1.gaikai.biz
In Reply to: Re: [gentoo-dev] rfc: generic "container" keyword for init scripts by Zac Medico
1 On Tue, Dec 01, 2015 at 11:21:49AM -0800, Zac Medico wrote:
2 > On 12/01/2015 10:19 AM, William Hubbs wrote:
3 > > On Tue, Dec 01, 2015 at 11:26:19AM -0600, William Hubbs wrote:
4 > >> On Tue, Dec 01, 2015 at 09:00:55AM -0800, Zac Medico wrote:
5 > >>> On 12/01/2015 08:50 AM, William Hubbs wrote:
6 > >>>> The "container" keyword, being generic, would have its meaning expanded
7 > >>>> to cover new container systems as they come along. This means if a
8 > >>>> service script has the keyword "-container" it will not work under any
9 > >>>> current or future container systems. On the other hand, adding
10 > >>>> "container" means it will work under all of them.
11 > >>>
12 > >>> If it's similar to how license groups work, then there is room for doing
13 > >>> things like "-@container docker" which means no containers except
14 > >>> docker, or "@container -docker" which means all containers except
15 > >>> docker. Keyword groups can be implemented using a simple expansion
16 > >>> mechanism, just like license groups.
17 > >>
18 > >> Keyword groups are an interesting idea; I'll think about this approach.
19 > >
20 > > One question that comes to mind is,, who defines which keywords go in
21 > > each group?
22 > >
23 > > The containers or virtualization systems themselves can be autodetected
24 > > so they are the same everywhere, but keyword groups are not able to be
25 > > detected.
26 >
27 > The groups should go in a configuration file somewhere. For example,
28 > they could be defined in rc.conf with a variable setting like this:
29 >
30 > rc_keyword_group_container="docker lxc openvz vserver"
31
32 If we keep the keywords as they are, I am starting to think we can just
33 add a container keyword that would be valid for all of the containers;
34 that way a script could be set up to work for no containers or for
35 specific ones like we are talking about.
36
37 OpenRC currently doesn't do any detection of virtual machines, so maybe
38 that could be another expansion of this -- add a keyword "vm" and
39 keywords for the virtual machines.
40
41 William

Attachments

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

Replies

Subject Author
Re: [gentoo-dev] rfc: generic "container" keyword for init scripts William Hubbs <williamh@g.o>