[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: init spawning multiple cf-execd processes at once



On Mon, 21 Jul 2014 14:39:16 +0200
Jimmy Thrasibule <jimmy.thrasibule@gmail.com> wrote:

> Hi,
> 
> I've added a new line to the /etc/inittab file to monitor the CFEngine
> daemon and restart it in case this one dies.
> 
>     cfe:2345:respawn:/var/cfengine/bin/cf-execd
> 
> The cf-execd is re-spawned as expected, except the fact that multiple
> processes are created at once.
> 
> I therefore have about 20+ cf-execd processes running where I only
> need 1.
> 
> Any idea what's causing this and how to solve it?
> 
> Regards,
> Jimmy

Hi Jimmy,

I have absolutely no idea.

But the systemd threads have all gotten me thinking: What if I were to
start my daemons with djb's daemontools?

I have no idea how much time you do or don't have, but if you're
interested/curious and have the time, you might try runnning cf-execd
from daemontools. One of the beauties of daemontools is you basically
make a shellscript to run the program in the foreground, wrap it with a
couple daemontools things, and bang, it's a daemon. Daemontools has
programs called svc and svstat to control and monitor your daemons.
Daemontools shellscripts are tiny and obvious, not the monstrosities
in the current (for Wheezy) init system.

Another thing that's cool is that with Daemontools' method of linking,
you can back up your entire Daemontools system, and nothing but the
Daemontools system, by backing up one tree. No more clobberation when
you wipe clean and install a later or different Linux version.

One thing I like about Daemontools is that, after 10 minutes of working
with it, you *know* it's written by a guy who loves Unix. All data
relationships are expressed in directory structures and small files. It
depends on nothing, and nothing depends on it. It makes sense.

Obviously, this is only practical for people who are facile with Linux
at the configuration and shellscript level. I would never recommend
this as the default. But for guys like us, it just might work.

I know my email doesn't address the root cause of your problem, but
given the way things are going, you've gotta wonder how long you'll be
able to put stuff in inittab, compatibility or not.

Right now I'm extremely busy for the next 2 weeks, but after that I
think I'm going to start turning off some of my daemons and instead
running them from Daemontools. Actually, I had been tempted to do that
long before the advent of systemd: It's not like Upstart or "sysvinit"
or whatever the current system is called were all that great either.

Thanks for the idea!

SteveT

Steve Litt                *  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance


Reply to: