On Fri, Dec 28, 2012 at 2:17 PM, Pandu Poluan <pa...@poluan.info> wrote:
>
> On Dec 29, 2012 2:18 AM, "Canek Peláez Valdés" <can...@gmail.com> wrote:
>>
>> Stop thinking in sshd. I can write the *whole* daemon in shell, not in
>> another script file, but inside /etc/init.d/mystupiddaemon (or
>> /etc/rc.whatever); shell is Turing-complete, I can write in it
>> anything I can write in C (or in assembler, or machine code). In that
>> sense, the init system (which uses shell for launching daemons) can be
>> used to determine *how* the daemon behaves (because it uses shell for
>> launching daemons).
>>
>> You can't do that with systemd; there is a clear and unavoidable
>> separation between the starting/stoping/monitoring of daemons, and the
>> daemons themselves. Such distinction doesn't really exists in SysV nor
>> OpenRC (since they use shell, a Turing-complete language, for
>> launching daemons), and therefore you can mixup everything. I agree,
>> it doesn't necessarily means that it *will* happen; but even the
>> possibility is frigthning for a system administrator in a production
>> server.
>
> You got it wrong.

I don't believe so.

> SysAdmins, especially Enterprise SysAdmins, will prefer total control of the
> startup process. If a daemon is extremely important for enterprise
> operation, any SysAdmin worth his/her salary will fire up vi (or emacs) and
> pepper the code with asserts and instrumentation.

Pandou, I have worked as SysAdmin. Several years. "Total control" has
degrees; if you program in assembly language, you have even more
control. And with systemd you can still fire up vi or Emacs (or, if
you prefer "total control", ed), and fix *your* daemon. If systemd has
a bug, you can still look at the code, and fix *that* code. What you
say doesn't make any sense: "any SysAdmin worth his/her salary will
fire up vi (or emacs) and pepper the code with asserts and
instrumentation" works in SysV, OpenRC, systemd, and anything else as
long as you have the source code. The only problem resides in
proprietary code.

> Having a Turing-complete language for starting a script is one of our (=
> Enterprise SysAdmins) weapon for fixing up glitches due to some changes
> introduced by the package maintainer.

Again, you make no sense: you can fix "glitches" as long as you have
the source code. You can roll your own packages (I maintain my overlay
to get rid of OpenRC on my systems). That some SysAdmins can *only*
code properly (if at all) in shell is a problem of *those* SysAdmins.
A worthy SysAdmin, if encountering a bug with systemd, can easily
check out the C code and fix it (it's relatively simple, not
kernel-level).

And having a separation between the starting/stoping of daemons and
the daemons themselves makes it easier to check where the bug lies,
and fixing accordingly, instead of patching blindly to workaround the
real problem.

> An example: A dev needs a newer version of a package. We upgrade it. It
> refuses to startup properly, but going back is out of the question because
> the dev *needs* the features only available in the new version. We check the
> (extremely) detailed logs. We find out what made the package balked. We do
> some changes, and all is well.

How that is not possible in systemd?

> Another example: After a security audit, we are required to upgrade a
> certain daemon to a new version, despite the current version running well.
> As we feared, the new version can't start. We use the detailed log to find
> out what happened. We made changes. It works again.

How that is not possible in systemd? Have you ever used it?

> In the two examples I give, having a C program doing all the starting will
> certainly mean that complex things have to be done, not to mention the
> headache of compiling them -- and possibly fail.

You are assuming the problem is going to be in systemd's side. First
of all, that will not always be the case. Second, if it is the case,
you go and fix it. You still have the code.

SysAdmin's laziness is not an excuse to do things wrong. It's also
"more complex" to add comments to the code, it's "more complex" to
take notes of the procedures rolling servers, it's "more complex" to
keep a database of the versions running in each machine, and what
hardware has and when it was installed. It's always "more complex" to
properly do the job.

> sh scripts are much easier to modify.

Read above.

>> Like the clear separation between content and presentation in webapps,
>> or between the model and the view in the MVC design patter, having a
>> clear separation between how you start/stop/monitor your daemon, and
>> what the daemon does, is a good thing.
>
> That is the Theory. In Practice, things don't work that way. Murphy's Law
> reigns supreme.

Then we should agree to disagree in this particular issue.

Regards.
-- 
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México

Reply via email to