[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
packages "bug"
From: |
Brendan Strejcek |
Subject: |
packages "bug" |
Date: |
Fri, 11 Nov 2005 16:40:30 -0600 |
User-agent: |
Mutt/1.5.6+20040818i |
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
- packages "bug",
Brendan Strejcek <=
Re: packages "bug", Mark Burgess, 2005/11/12