[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: packages "bug"
From: |
Mark Burgess |
Subject: |
Re: packages "bug" |
Date: |
Sun, 13 Nov 2005 09:00:39 +0100 |
Brendan you have
> > > bash
> > > pkgmgr=rpm
> > > define=bash_pkg_installed
> > > bash
> > > pkgmgr=rpm
> > > define=bash_package_installed
i.e. the "do part" is the same in both cases, so both defines would
always be true, except that cfengine thinks (rightly I believe) that
it is unnecessary to do the same thing twice, so only one gets defined.
There are no other classes that I can see...
M
On Sat, 2005-11-12 at 19:02 -0600, Brendan Strejcek wrote:
> Mark Burgess wrote:
>
> > 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?
>
> The checks are not identical because they define different classes. Two
> separate tasks could do very different things based on that information.
>
> 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
>
>
> > 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, 2005/11/12