On Wed, Sep 5, 2012 at 4:51 PM, Roman Shaposhnik <r...@apache.org> wrote:

> Hi!
>
> Here's a thorny issue that I'm looking at right now which I'd
> appreciate a broader perspective on: it seems that currently
> there's a subtle (but a very dangerous) difference between
> running any of our init.d scripts by hand -- e.g.
>    # /etc/init.d/hadoop-hdfs-datanode start
> vs. running them via a service(8) command -- e.g.
>    # service hadoop-hdfs-datanode start
>
> It just so happens that service is guaranteed to clean
> the environment up, but running the scripts directly
> would run them in whatever environment root might
> have currently.
>
> IOW, if for any reason root would set a variable up
> that corresponds to a var from a particular /etc/default/<name>
> sourced by the init.d scripts -- that would affect the script
> execution.
>
> What do you all think -- is this a bug or a feature? Should
> we, somehow, make sure that a direct execution would
> scrub the environment the same way that a service(8) one
> does?
>
> Thanks,
> Roman.
>
> P.S. Now, it might seem to be a trivial matter of cleanliness but
> I've got bitten by it today and spent quite a bit of time debugging
> the "incorrect" behavior only to realize that it was my environment
> to blame.
>

Thanks for making the case for process supervision, Roman! It mystifies me
why people are still using init scripts. Must be tradition/inertia or
resistance to change or something.

Fwiw, I would vote for consistency in behavior between the two.

I will upload my daemontools-encore service scripts to Jira soon.

Cheers,
Jos
-- 
Jos Backus
jos at catnook.com

Reply via email to