help-cfengine
[Top][All Lists]
Advanced

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

actionsequence and multiple passes


From: Viraj Alankar
Subject: actionsequence and multiple passes
Date: Sun, 16 Oct 2005 11:07:38 -0400

Hello,

I read this in the reference manual:

"In many cases, cfagent will be able to complete all its work in a
single pass of the actionsequence. However, in complex configurations,
it is hard to resolve all of the ordering dependencies automatically
in a single pass. Cfagent keeps track both of all actions that have
been performed and of those that might still need to be performed
(given that some actions depend on the later outcomes of others). If
there is a possibility that an action ordering dilemma might occur, it
runs a second pass of the actionsequence to more quickly resolve the
dependency (avoiding the wait for next scheduled run). No actions are
performed twice however, since the agent checks off actions that have
already been performed to avoid unnecessary duplication."

But I'm having trouble getting multiple passes to work. Let's say my
cfagent.conf looks like:

control:
  actionsequence = ( shellcommands tidy )

import:
  any::
    cleanup.cf

And in cleanup.cf:

tidy:
  /tmp pattern=blah age=0 define=dothis

shellcommands:
  dothis::
    "/bin/echo whatever"

My shellcommands do not get executed. If I change the actionsequence to:

  actionsequence = ( tidy shellcommands )

It works fine. However, when having lots of configuration files, it
may not be as clear as above that shellcommands must come after tidy.
In fact I may have another configuration that requires tidy to come
after shellcommands in a similar situation. So I thought cfengine
would realize that in the first case shellcommands would need to go
through a second pass. Is this a wrong assumption? If so, what
actually causes a second pass to occur? I'm confused on this.

I tried also using AddInstallable = ( testblah) but it did not help.

Another example is say in my shellcommands I define something that is
itself another shellcommand that was defined previously. How do I get
that to work?

Thanks,

Viraj.




reply via email to

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