From: Duncan <1i5t5.duncan@cox.net>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] Re: Switchup-mode and boottime selector? Was: eselect init
Date: Wed, 29 May 2013 00:36:58 +0000 (UTC) [thread overview]
Message-ID: <pan$5742a$e8956a90$4806804f$268acdd6@cox.net> (raw)
In-Reply-To: 20130528135619.44259b60@TOMWIJ-GENTOO
Tom Wijsman posted on Tue, 28 May 2013 13:56:19 +0200 as excerpted:
> You're making a lot of statements like this but don't back them up.
>
> Why would this work best for this situation? What's wrong with the rest?
While as long as it stays out of my way enough so I don't have to worry
about it, I don't particularly care (to the point I debated simply not
replying), your post did make me aware of the fact that I was claiming
negatives on the other methods without backing up the claims... because
from here they were evident, and others had made them well enough I
didn't need to.
However, I guess if I claim something I owe it to my readers to be
prepared to back it up, so...
As I've read the thread, there seem to be four issues with most of the
other methods discussed, three related, one separate.
1) Changing an initsystem with the system up and running in normal state
risks not being able to shut down properly. While some init-systems may
either not have that problem or be able to work around it in a trivial
way, getting something robust enough to work reliably across all of them,
in all sorts of weird site configurations, will be... challenging, to say
the least.
2) Doing it at shutdown has problems of its own, including the incomplete
switch crash scenario as well as having to do it late enough in the
process that the operational-switch issues of #1 aren't triggered.
The two problems above lead to the idea of not actually doing the change
on a running system, but rather, simply using a trigger mechanism to
trigger it at next boot. I didn't see it specifically stated what that
would be, but at least here I envisioned it as comparable to the .fsck
(whatever it's named) file dropped in root to trigger an fsck at the next
boot, only in this case it would trigger the init-system switch.
3) Except... any switch has to occur VERY early in the boot process,
before the existing init-system has already gotten us into the
operational-switch situation of #1 that we were trying to avoid.
Effectively, our switcher must be called as init either by the kernel
itself or by the initr*, where it can do its thing before calling the
normal init-system it might have just switched to.
3b) Except... at that point root isn't writable, and a robust solution to
get it writable in ordered to actually make the switch permanent, that
works on all the strange root-on-whatever systems out there, AND works
with at least systemd and openrc and bb-init (with extensibility to
others), AND inserts extremely minimal delay and code into the routine
"no changes, just boot the same way you did last time" case, AND doesn't
take control away from the individual init-system package maintainers,
AND doesn't impose a huge burden on individual init-system package
maintainers, AND fills ALL these requirements suitably robustly that it
works well to say at least two-nines reliability...
No wonder someone mentioned that it looked like a case for an initr*...
but on gentoo anyway, requiring that has at least political problems of
its own.
It's beginning to look rather like a Sisyphean task... Which it might
actually be.
But it occurred to me that we actually do have a demonstrated workable
and long used in actual practice exception to the normal boot case as
precedent, where such maintenance tasks traditionally occur, single user
mode. Then I began thinking how that fit the requirements and use case
as outlined, including the (semi-?)automated bit.
Which is how I came to post the idea of the sub-thread starter. Not to
rehash everything I wrote there, but it seems to me to have the best
chance at doing what is otherwise looking to be a Sisyphean task. With
the extremely minimal two-case-only code inserted between kernel/initr*
and the selected init-system at boot, it fills the quick and simple
normal-case boot requirement. All the rest of the code is out of the
way. The rest of the code then runs as a semi-automated single-user-mode
equivalent. And having even that minimal normal-boot-mode insert under
control of a USE flag allows people to get even that out of the way if
they're not interested.
Meanwhile, it's worth pointing out explicitly that by choosing this
insertion point, root must already be at least mounted and accessible in
read-only mode, whether by kernel command-line, initr*, or whatever, or
the direct init invocation we're replacing wouldn't work. Thus, the
whole issue of possibly initr* userspace or kernel commandline getting
exotic root-on-whatever even mountable in the first place, is already
taken care of, yet real-init hasn't yet executed, so we don't have to
worry about messing with an already functioning init-system, thus leaving
it no way to "climb down".
4) Finally, the fact that each init-system package gets to control its
own switcher-mode script keeps control of it with the init-system package
maintainers, allowing them to choose as complex or simple a script as
they need/wish, reasonably addressing the whole maintainer control
problem so evident in another current thread.
Beyond that, the idea is extremely flexible and extensible, as mentioned.
And one final point I didn't mention in the initial proposal, that I can
add here. Presumably, the init-switcher package would include a library
function that could be invoked by the individual switcher scripts, that
would re-mount root rw, to handle any write-needed changes such as
switching out inittab for bb-init as well as to make the init-system
choice permanent, plus another to remount ro again before either reboot
or handing off to the chosen init-system, as deemed appropriate. These
would be issues likely to need addressed by all/most init-switcher
scripts, so a common solution is reasonable. Of course if the individual
script didn't need that or was an extension to some other purpose, the
functions need not be called.
--
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
next prev parent reply other threads:[~2013-05-29 0:37 UTC|newest]
Thread overview: 139+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-25 9:54 [gentoo-dev] eselect init Luca Barbato
2013-05-25 10:25 ` Peter Stuge
2013-05-25 11:57 ` Tom Wijsman
2013-05-26 1:52 ` Walter Dnes
2013-05-26 8:50 ` Tom Wijsman
2013-05-26 2:02 ` Peter Stuge
2013-05-26 8:56 ` Tom Wijsman
2013-05-25 19:08 ` Matthew Thode
2013-05-26 14:13 ` Ian Stakenvicius
2013-05-26 23:54 ` Luca Barbato
2013-05-25 11:13 ` Pacho Ramos
2013-05-25 12:03 ` Tom Wijsman
2013-05-25 12:25 ` Pacho Ramos
2013-05-25 15:42 ` Luca Barbato
2013-05-25 11:29 ` Sergei Trofimovich
2013-05-25 12:12 ` Tom Wijsman
2013-05-25 13:15 ` Luca Barbato
2013-05-25 17:35 ` Sergei Trofimovich
2013-05-25 19:49 ` Chí-Thanh Christopher Nguyễn
2013-05-25 12:13 ` hasufell
2013-05-25 15:51 ` Luca Barbato
2013-05-25 13:38 ` Tom Wijsman
2013-05-25 19:09 ` J. Roeleveld
2013-05-25 19:55 ` Tom Wijsman
2013-05-25 20:07 ` Alex Xu
2013-05-25 20:59 ` Tom Wijsman
2013-05-26 12:59 ` J. Roeleveld
2013-05-26 13:58 ` Tom Wijsman
2013-05-26 14:54 ` Ian Stakenvicius
2013-05-26 13:15 ` Michał Górny
2013-05-26 14:07 ` Tom Wijsman
2013-05-26 14:44 ` Rich Freeman
2013-05-26 6:43 ` Michał Górny
2013-05-26 8:58 ` Robert David
2013-05-26 9:20 ` Michał Górny
2013-05-26 9:32 ` Robert David
2013-05-26 9:45 ` Tom Wijsman
2013-05-26 10:09 ` Michał Górny
2013-05-26 11:45 ` Tom Wijsman
2013-05-26 12:01 ` Michał Górny
2013-05-26 9:21 ` Tom Wijsman
2013-05-26 10:01 ` Robert David
2013-05-26 10:11 ` Rich Freeman
2013-05-26 10:18 ` Chí-Thanh Christopher Nguyễn
2013-05-26 11:28 ` hasufell
2013-05-26 12:10 ` Tom Wijsman
2013-05-26 9:55 ` Luca Barbato
2013-05-26 10:39 ` Tom Wijsman
2013-05-26 10:57 ` Michał Górny
2013-05-26 11:40 ` Luca Barbato
2013-05-26 12:08 ` Michał Górny
2013-05-26 12:24 ` Luca Barbato
2013-05-26 14:58 ` Ian Stakenvicius
2013-05-27 10:36 ` [gentoo-dev] Switchup-mode and boottime selector? Was: " Duncan
2013-05-27 20:26 ` Alex Xu
2013-05-27 22:40 ` Walter Dnes
2013-05-28 9:56 ` [gentoo-dev] " Duncan
2013-05-28 11:56 ` Tom Wijsman
2013-05-29 0:36 ` Duncan [this message]
2013-05-29 8:52 ` Tom Wijsman
2013-05-29 18:15 ` Walter Dnes
2013-05-29 19:56 ` Tom Wijsman
2013-05-29 20:55 ` William Hubbs
2013-05-30 0:06 ` Tom Wijsman
2013-05-30 0:22 ` William Hubbs
2013-05-30 1:36 ` Duncan
2013-05-30 6:35 ` Tom Wijsman
2013-05-30 20:41 ` William Hubbs
2013-05-30 6:46 ` Ciaran McCreesh
2013-05-30 13:54 ` Ian Stakenvicius
2013-05-31 6:21 ` Ciaran McCreesh
2013-05-30 6:30 ` Luca Barbato
2013-06-22 19:35 ` Markos Chandras
2013-05-30 2:52 ` Walter Dnes
2013-05-30 6:19 ` Tom Wijsman
2013-05-30 6:36 ` Dale
2013-05-30 6:31 ` Ciaran McCreesh
2013-05-28 3:55 ` [gentoo-dev] " Luca Barbato
2013-05-28 4:19 ` Michał Górny
2013-05-28 4:43 ` Luca Barbato
2013-05-28 12:15 ` Ian Stakenvicius
2013-05-28 12:15 ` Ian Stakenvicius
2013-05-26 11:58 ` Tom Wijsman
2013-05-26 14:52 ` Luca Barbato
2013-05-26 15:39 ` Tom Wijsman
2013-05-26 16:41 ` William Hubbs
2013-05-26 16:48 ` William Hubbs
2013-05-26 16:55 ` Michał Górny
2013-05-26 22:58 ` William Hubbs
2013-05-26 23:47 ` Luca Barbato
2013-05-27 23:45 ` [gentoo-dev] Separate boot/root already [WAS: eselect init] Walter Dnes
2013-05-28 15:07 ` Luca Barbato
2013-06-01 9:23 ` [gentoo-dev] Re: eselect init Steven J. Long
2013-06-01 11:43 ` Steven J. Long
2013-06-02 9:15 ` Luca Barbato
2013-06-02 18:20 ` [gentoo-dev] " Steven J. Long
2013-06-02 18:48 ` Fabio Erculiani
2013-06-08 13:37 ` [gentoo-dev] " Steven J. Long
2013-06-02 22:35 ` [gentoo-dev] " Luca Barbato
2013-06-03 0:37 ` Walter Dnes
2013-06-03 0:57 ` Rich Freeman
2013-06-03 7:03 ` Tom Wijsman
2013-06-03 9:42 ` Luca Barbato
2013-06-03 6:19 ` [gentoo-dev] " Duncan
2013-06-03 6:26 ` [gentoo-dev] " Pacho Ramos
2013-06-04 18:55 ` William Hubbs
2013-06-04 19:09 ` Rich Freeman
2013-06-08 13:28 ` [gentoo-dev] " Steven J. Long
2013-06-20 10:16 ` [gentoo-dev] " Fabio Erculiani
2013-06-20 17:10 ` [gentoo-dev] " Steven J. Long
2013-06-20 20:48 ` William Hubbs
2013-06-25 4:53 ` [gentoo-dev] " Steven J. Long
2013-06-20 20:56 ` [gentoo-dev] " William Hubbs
2013-06-21 2:39 ` Michał Górny
2013-06-21 4:16 ` William Hubbs
2013-06-21 10:23 ` Michał Górny
2013-06-21 15:16 ` William Hubbs
2013-06-21 15:23 ` Fabio Erculiani
2013-06-21 16:42 ` William Hubbs
2013-06-22 11:23 ` Jason A. Donenfeld
2013-06-22 11:57 ` hasufell
2013-06-21 19:34 ` Luca Barbato
2013-06-22 1:27 ` Ulrich Mueller
2013-06-22 1:48 ` Michael Weber
2013-06-21 15:29 ` Michał Górny
2013-06-21 16:13 ` Markos Chandras
2013-06-21 16:50 ` William Hubbs
2013-06-21 19:36 ` Luca Barbato
2013-06-21 10:30 ` Michael Weber
2013-06-21 11:19 ` Fabio Erculiani
2013-06-21 11:26 ` Pacho Ramos
2013-06-21 11:50 ` Luca Barbato
2013-06-21 14:36 ` William Hubbs
2013-06-21 15:48 ` Pacho Ramos
2013-06-22 6:59 ` [gentoo-dev] " Duncan
2013-06-22 10:07 ` Pacho Ramos
2013-06-22 11:13 ` Michael Weber
2013-06-22 11:26 ` Rich Freeman
2013-06-22 17:05 ` Luca Barbato
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$5742a$e8956a90$4806804f$268acdd6@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