help-cfengine
[Top][All Lists]
Advanced

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

Re: actionsequence and multiple passes


From: Mark Burgess
Subject: Re: actionsequence and multiple passes
Date: Sun, 16 Oct 2005 21:21:00 +0200

That should do the trick. Or you can get it from svn. The tarball should
be updated now

M

On Sun, 2005-10-16 at 15:00 -0400, Viraj Alankar wrote:
> On 10/16/05, Mark Burgess <Mark.Burgess@iu.hio.no> wrote:
> > Hi. I just tested the latest patch release and this works fine, as long
> > as you are careful to use AddInstallable:
> >
> >
> > control:
> >
> >   AddInstallable = ( alertX )
> >
> >  shellcommands:
> >
> > alertX::   "/bin/echo XXXXXXXXXXXX"
> >
> >    any::   "/bin/echo HELO" define=alertX
> >
> > Try the latest patch release from www.cfengine.org, developer pages.
> 
> Thanks Mark. I am using 2.1.16. Should I download the tar snapshot?
> 
> Viraj.
> 
> > On Sun, 2005-10-16 at 11:07 -0400, Viraj Alankar wrote:
> > > 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.
> > >
> > >
> > > _______________________________________________
> > > Help-cfengine mailing list
> > > Help-cfengine@gnu.org
> > > http://lists.gnu.org/mailman/listinfo/help-cfengine
> >
> >





reply via email to

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