help-cfengine
[Top][All Lists]
Advanced

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

methods and copy


From: Wheeler, John
Subject: methods and copy
Date: Fri, 5 Dec 2003 15:32:15 -0600

I'm using cfengine 2.1.0p1 on linux.

I've started to use methods only to be stopped dead by what appears to
be a bug. If I import a file into cfagent.conf that calls a module, any
of the other imports that have copies fail claiming that domain is not
set. 

The verbose output backs up the complaint during copy:

Looking for an input file /var/cfengine/inputs/cfagent.conf
Looking for an input file boot2.conf
Looking for an input file networkfile.conf
Looking for an input file network2.conf
Looking for an input file blah.conf
Finished with cfagent.conf
Accepted domain name:

Notice accepted domain is empty.
This is the overloaded copy error:

Checking copy from cfengine:/cfengine/scripts to /var/cfengine/scripts
Connect to cfengine = XX.XXX.XXX.20 on port cfengine
Loaded /var/cfengine/ppkeys/root-XX.XXX.XXX.20.pub
cfengine:dell113: Strong authentication of server=cfengine connection
confirmed
cfengine:dell113: Server returned error:  Host authentication failed.
Did you forget the domain name?
cfengine:dell113: Can't stat /cfengine/scripts in copy
Saving the setuid log in /var/cfengine/cfagent.dell113.eb.com.log
Job start time set to Fri Dec  5 14:42:50 2003

If I remove the two imported files above that call methods:


Looking for an input file /var/cfengine/inputs/cfagent.conf
Looking for an input file boot2.conf
Looking for an input file blah.conf
Finished with cfagent.conf
Accepted domain name: eb.com

the imported files containing copies succeed. I've tried several
permutation, but anytime I "import" a file that calls a function, any
non-function copy is broken.

Additionally, it appears that methods themselves are broken wrt
returning classes. Oddly enough if I add the:

ReturnClasses(anyoldclass) 

to the alerts section, copy again complains that the domain is not set.

Anyone had similar experiences? Also, follow the docs closely, the order
of values in the method declaration matter. For example:

control:
        IfElapsed = ( 0 )
        actionsequence = ( methods )

methods:
        abacab::
                networkfile(abacab)
                        action=networkfilemethod.conf
                        returnvars=null
                        returnclasses=removerhroute
                        server=localhost

works, but if the server line is above either return* statements, the
method complains that the signatures don't match.

Generally they work pretty well, but I've been unable to utilize return
values, and probably can't use them in production because of the other
issue.




reply via email to

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