help-cfengine
[Top][All Lists]
Advanced

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

Re: packages "bug"


From: Mark Burgess
Subject: Re: packages "bug"
Date: Sat, 12 Nov 2005 08:45:26 +0100

There are some problems with locking, but this is not one of them. Your
example doesn't make sense to me, because you are asking to the same
package twice - so it seems reasonable to me that cfengine would think
it was unnecessary to do the same thing again. The two checks are
identical?

M 

On Fri, 2005-11-11 at 16:40 -0600, Brendan Strejcek wrote:
> cfengine locking can get in the way of package definitions. For example,
> consider the following:
> 
> ########################################################################
> 
> ==> main.cf <==
> 
>     #!/usr/sbin/cfagent -qvf
>     
>     control:
>         actionsequence = ( packages )
>     
>     import:
>         /tmp/one.cf
>         /tmp/two.cf
> 
> ==> /tmp/one.cf <==
> 
>     packages:
>         bash
>             pkgmgr=rpm
>             define=bash_pkg_installed
>     
>     alerts:
>         bash_pkg_installed::
>             "one.cf: bash_pkg_installed class defined"
> 
> ==> /tmp/two.cf <==
> 
>     packages:
>         bash
>             pkgmgr=rpm
>             define=bash_package_installed
>     
>     alerts:
>         bash_package_installed::
>             "two.cf: bash_package_installed class defined"
> 
> ########################################################################
> 
> When I run that, this is what happens:
> 
>     Installable classes = ( bash_pkg_installed bash_package_installed )
>     ...
>     RPMCheckPackage(): Requested bash eq ANY
>     cfengine:: Nothing scheduled for packages.packages (0/1 minutes elapsed)
>     ...
>     ---------------------------------------------------------------------
>     Alerts
>     ---------------------------------------------------------------------
>     cfengine:: one.cf: bash_pkg_installed class defined
> 
> We can see that the second class is not getting defined due to a lock.
> Why is this bad? It means that any admin that defines a class like
> this needs to understand the entire site config, or actions predicated
> on their class may never occur. I suspect other sections may exhibit
> similar behavior, but I have not tested it yet.
> 
> Fundamentally, I think this is a problem of scope and namespaces. I
> think that is one of the weakest elements of cfengine, so I hope it
> is addressed in version 3. Namespaces are intimately connected with
> reusability.
> 
> Best,
> Brendan
> 
> --
> Senior System Administrator
> The University of Chicago
> Department of Computer Science
> 
> http://www.cs.uchicago.edu/people/brendan
> 
> http://people.cs.uchicago.edu/~brendan
> 
> 
> _______________________________________________
> 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]