separation for boot and running time services

From: Eric Vidal <eric_at_obarun.org>
Date: Wed, 25 May 2016 08:34:16 +0400

Hi,

I'm searching a way to separate the necessary for boot process to have a full operational system and services which can be added by user for the running time process.
Services for running time process depends of each user and can be very differents for each one. Actually, the boot process goes with a bundle for s6-rc which "start" all the necessary, then an another bundle "start" services for running time like dbus, nfs, openntpd, etc.

All the services is placed on the same place, in my case /etc/s6/rc-serv-build then a compilation is made by s6-rc-compile to provide a compiled database.
So, when i want to change a "running time service", i need to change some stuff on the rc-serv-build then make a compiled database etc, etc. I think doing this is a bad way because i touch the service database needed for the boot time, a error can be made easily and corrupt the boot time process.
Actually, is not possible to have two (or more) directory which contains some services and compile them together with s6-rc-compile to provide a final database. I mean, having a directories called e.g. /etc/s6/rc-boot which contains sub-directories needed for boot time service as usual and a directory called /etc/s6/rc-user which contains sub-directory needed for running time service, then s6-rc-compile mix these two (or more) directories on one. (not sure i'm clear here).

If i make a symlink for a bundle (e.g. /etc/s6/rc-user pointing to /etc/s6-serv/rc-user) s6-rc-compile find it, but doesn't find the service declared on bundle, i need to make symlink too for the services declared on it. So,it is not a solution.

The file contents for a bundle doesn't accept e.g. /etc/s6/name_of_the_service, but with this features the contents of the bundle can be on another place.
A another solution can be to have to possibility to "start" different database compiled with s6-rc-init with the same command like s6-rc-init -c /run/.rc-boot,/run/.rc-user /run/s6-run/service

In fact, the directory can be growing quickly in complexity and the visibility of things can be difficult. The fact of separating boot and running time permit to have a little more security about the boot process and it will never touch by an user.

What do you thing about it? Pershaps, i do not think on the right way!?

About bundle dependencies : actually if i have e.g a bundle "All" with name on it calling another two bundle (all-Boot, all-User), the declaration sequence is not respected. So the second bundle is started whatever if the first bundle is up and ready or not. Having a file named dependencies for a bundle seems to me a good idea. I can declare for every services in the all-User bundle a dependencies on all-Boot bundle, but i think is a source of error. Making a dependencies directly on bundle simplify the creation processus e.g. all-User depends on all-Boot, so all-User doesn't "start" the work before all-Boot is ready and obviously all the service declared on all-User bundle have a dependencies of all-Boot bundle directly.

note: s6-svc zsh completion is available on my github, not perfect, with a litlle bug, i can start the options/arguments sequence with -T eg. s6-svc -T50 -a /service, i need to start with e.g s6-svc -uT50 /service or whatever.
-- 
Eric Vidal <eric_at_obarun.org>
Received on Wed May 25 2016 - 04:34:16 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC