help-cfengine
[Top][All Lists]
Advanced

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

Lists and classes and bears, oh my!


From: Matthew Palmer
Subject: Lists and classes and bears, oh my!
Date: Fri, 2 Sep 2005 17:41:14 +1000
User-agent: Mutt/1.5.6+20040907i

I'm trying to create a list of classes, which can be both iterated through,
and set as classes (so I can do decision-making work on them later).  I'm
getting very, very strange errors out of class list, though, when I do this. 
My minimal example:

control:
        actionsequence = ( shellcommands )

        xyzzy = ( foo )
        foo_list = ( test1:test2:test3 )     

        AddClasses = ( ${${xyzzy}_list} )  
        
(in reality, xyzzy is actually host, and foo is the name of the local host,
but the minimal example shows the problem fine).

The problem is that, when looking at the output of the Defined classes, the
last class on the list (test3 in this case) has extra gubbins appended to
it.  For example, my defined classes looks like this (somewhat trimmed for
brevity):

Defined Classes = ( [...] test1 test2 test3t_ )

Where in blazes did that t_ come from?  I don't know, but I don't like it. 
It does seem to vary depending on what's in the file, so I suspect that
there is actually a parsing bug somewhere.

Oh, and just to make sure it wasn't just some strange printing problem, if
you define some shell commands:

shellcommands:
        test1::
                "/bin/echo test1"
                
        test2::
                "/bin/echo test2"

        test3::                 
                "/bin/echo test3"

Then test1 and test2 get printed, but not test3.  If you change test3:: to
be test3t_::, it *does* print test3.  So that test3t_ is a really, truly
class name.

Environment: cfengine 2.1.15, running on Ubuntu hoary, built from the
current Debian sid source package.

Looking through the changelog for the (presumably) to-be-released 2.1.16, it
mentions "Function arg expansion bug and improvement fix".  Could this be
the same problem?  If not, can anyone else reproduce this problem
(particularly on other OS/distros)?  Would this be better posted to the
sf.net bug tracker?  Any suggestions for workarounds?  Otherwise, is there
anywhere I can download a pre-release other than SVN, or is there a planned
release date for 2.1.16?

- Matt

Attachment: signature.asc
Description: Digital signature


reply via email to

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