help-cfengine
[Top][All Lists]
Advanced

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

Re: Please help: "actionsequence classes" example for synchronization?


From: Ed Brown
Subject: Re: Please help: "actionsequence classes" example for synchronization?
Date: Fri, 26 Aug 2005 08:11:38 -0600

Actionsequence qualifiers aren't quite like other classes.  For one
thing, you don't define and undefine them, or use them other than to
qualify that action that they are declared with in the actionsequnce. 
If you want to sequence an action, shellcommands for example, you'll
need to use qualifiers on both instances, like:

control:
  actionsequence = ( shellcommands.abc shellcommands.xyz )
shellcommands:
  any::
     "not sure, but I think likely to execute with 'abc'"
  abc::
     "will execute before xyz"
  xyz::
     "will execute after abc"

-Ed



On Thu, 2005-08-25 at 21:37, ha haha wrote:
> Hi,
> 
>  Anyone could shed a light on "actionsequence class"
> for synchronization -- make certain actions occur in
> certain order? I tried several hours but still have no
> luck.
> 
>  The following is an excerpt from cfengine Tutorial:
> 
> ---------------------------------------------------
> 
> Here is an example: 
> 
>      
>        links.onlysome
>        shellcommands.othersymbols.onlysome
>      
> 
> In the first case onlysome is defined to be true while
> this instance of links is executed. That means that
> only actions labelled with the class onlysome will be
> executed as a result of that statement. In the latter
> case, both onlysome and othersymbols are defined to be
> true for the duration of shellcommands. 
> 
> This syntax would normally be used to omit certain
> time-consuming actions, such as tidying all home
> directories. Or perhaps to synchronize certain actions
> which have to happen in a certain order. 
> -----------------------------------------------------
> 
> My test results seem conflicting with the above
> statement...  Both actions labeled with and without
> the "actionsequence class" are executed. ONLY actions
> With NEGATE (!) "actionsequence class" are not excuted
> at the same time -- they are being run later.
> But that may not be the "actionsequence class" are
> designed to go.. Please help.
> 
> 
> My cfengine is 2.1.15 running on Fedora Core Linux.
> 
> The cfengine configuration cfagent.conf is:
> 
> control:
> 
>    actionsequence = (
>                         ...
>                         shellcommands.ASClass
>                         shellcommands
>                     )   
> 
> shellcommands:
> 
>    linux::
>         "/bin/echo no ASClass class, either define or
> undefine, is in use."
> 
>    linux.ASClass::
>         "/bin/echo actionSequence calsses is defined."
> 
>    linux.!ASClass::
>         "/bin/echo ASClass is not defined at this
> run."
> 
> ...
> 
> The verbose result is attached as well.
> 
> ...
> 
> *********************************************************************
>  Main Tree Sched: shellcommands.ASClass pass 1 @ Thu
> Aug 25 19:53:41 2005
> *********************************************************************
> 
> 
>                   New temporary class additions
>                   --------( Pass 1 )-------
>                              ASClass
> cfengine:testBox: Executing script /bin/echo no
> ASClass class, either define or undefine, is in
> use....(timeout=0,uid=-1,gid=-1)
> (Setting umask to 77)
> cfengine:testBox:/bin/echo no AS: no ASClass class,
> either define or undefine, is in use.
> cfengine:testBox: Finished script /bin/echo no ASClass
> class, either define or undefine, is in use.
> cfengine:testBox: Executing script /bin/echo
> actionSequence calsses is
> defined....(timeout=0,uid=-1,gid=-1)
> (Setting umask to 77)
> cfengine:testBox:/bin/echo actio: actionSequence
> calsses is defined.
> cfengine:testBox: Finished script /bin/echo
> actionSequence calsses is defined.
> *********************************************************************
>  Main Tree Sched: shellcommands pass 1 @ Thu Aug 25
> 20:28:11 2005
> *********************************************************************
> 
> cfengine:testBox: Executing script /bin/echo ASClass
> is not defined at this
> run....(timeout=0,uid=-1,gid=-1)
> (Setting umask to 77)
> cfengine:testBox:/bin/echo ASCla: ASClass is not
> defined at this run.
> cfengine:testBox: Finished script /bin/echo ASClass is
> not defined at this run.
> 
> 
> 
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com
> 
> 
> _______________________________________________
> Help-cfengine mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-cfengine





reply via email to

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