[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:51:01 +0100 |
In case it was you description that was in error (I see that the locking
condition in packages is inadequate) I have patched 2.1.17. Available on
svn
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
> Help-cfengine@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-cfengine
Re: packages "bug",
Mark Burgess <=