Hi!

I'm running CFEngine2 (2.2.10-4build2, Ubuntu Precise).

I have this server which boots from PXE. There's foo to bootstrap it,
then a cron-job runs a shell scripted for-loop:

| for i in 1 2 3 4 5
| do
|     /usr/sbin/cfagent -qKvf cfagent.conf >>/var/log/pxeboot.log 2>&1
|     sleep 5
| done

This is done to speed up configuration of the server.

The first iteration of this loop, also the first time cfagent runs on
the system, CFEngine runs a Perl script which in turn runs apt-get.

The apt-get process is now taking more than five minutes to complete and
gets sent a TERM signal which kills it instantly leaving packages in
broken state.

Five minutes is also when cfexecd fires off its own cfagent process, and
i found this second cfagent is sending TERM signals to the subprocesses
of the first (looped) cfagent instance.

This is documented behaviour, prevents 'runaway' processes, though i
could not find the seemingly preconfigured ~300 second runtime limit in
the reference.

It should be configurable through the ExpireAfter and timeout settings
but they seem to be ignored?

The relevant cfengine bits read:

| control:
|     any::
|         actionsequence = ( shellcommands )
| 
| shellcommands::
|     class1.class2::
|         "/etc/foo/installpkg.pl $(AllClasses)"

I tried changing the actionsequence to include ExpireAfter:

| control:
|     any::
|         actionsequence = ( shellcommands.ExpireAfter30 )

I also tried adding 'timeout=3600 expireafter=3600' to the shellcommand:

| shellcommands::
|     class1.class2::
|         "/etc/foo/installpkg.pl $(AllClasses)"
|             timeout=3600 expireafter=3600

and i tried setting ExpireAfter in control:

| control:
|     any::
|         ExpireAfter = ( 30 )

And combinations of the above. None seem to work. At this moment i
switch off cfexecd during the looped cfagent runs but i'd rather not.

Any light on why i cant seem to put an end to the brutal killings? :/

With regards,
-Sander.
-- 
| 0 bottles of beer on the wall, 0 bottles of beer, you take 1 down,
| pass it around, 4294967295 bottles of beer on the wall.
| 4096R/20CC6CD2 - 6D40 1A20 B9AA 87D4 84C7  FBD6 F3A9 9442 20CC 6CD2
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to