help-cfengine
[Top][All Lists]
Advanced

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

Multiple executions of actionsequence content


From: paguerlais
Subject: Multiple executions of actionsequence content
Date: Mon, 29 Jul 2002 16:04:25 +0200

Hi all,

trying to debug some cfengine script, I discovered that the content of
actionsequence from cfagent.conf can be executed twice, whereas
actionsequence from update.conf is executed only once.
I can't figure out why this has been done so. And it has bad consequences
on my script, because some actions are executed twice.

It's not an elementary script, but rather something like :
<cut>
control:
      AddInstallable    = ( ok1 ok2 )
      actionsequence = ( module:my_module ok1 )       # Sets ok1 if it's
execution is ok

      ok1::
            actionsequence = ( module:my_module ok2 ) # Sets ok2 if
execution ok

      ok1.ok2::
            actionsequence = ( shellcommands )

shellcomands:
      "some shell commands"
</cut>

The idea behind this script is to execute the minimum amount of code in
case of failure : do not execute my_module the second time if the first
failed, execute the shell commands only if my_module succeed twice, ... Of
course I could have set ok1.ok2 in the shellcommands section, but it
changes nothing.
Looking at the traces of a verbose execution, I can see that all three
actions (my_module #1, my_module #2, shellcommands) are executed twice.
This can be very dangerous, depending on the purpose of the modules,
commands, ...
I discovered this in my current cfengine version (2.0.1, executed by root),
and checked the sources of both 2.0.1 and 2.0.3, they are similar.

Can somebody explain me what's going on and why ?
Thanks
Patrice






----------------

Les donnees et renseignements contenus dans ce message sont personnels, 
confidentiels et secrets. Ce message est adresse a l'individu ou l'entite dont 
les coordonnees figurent ci-dessus. Si vous n'etes pas le bon destinataire, 
nous vous demandons de ne pas lire, copier, utiliser ou divulguer cette 
communication. Nous vous prions de notifier cette erreur a l'expediteur et 
d'effacer immediatement cette communication de votre systeme.

The information contained in this message is privileged, confidential, and 
protected from disclosure. This message is intended for the individual or 
entity adressed herein. If you are not the intended recipient, please do not 
read, copy, use or disclose this communication to others ;also please notify 
the sender by replying to this message, and then delete it from your system.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]