[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problems with methods in v. 2.1.6
From: |
Tommy Abrahamsson |
Subject: |
Problems with methods in v. 2.1.6 |
Date: |
Fri, 21 May 2004 04:59:13 +0200 |
Hi
After upgrading to 2.1.6 all my methods seemed to stop working. It complains
about Number of return
arguments does not match template.
My first guess is, that it doesn't create the proper file in
/var/cfengine/rpc_in/ so it can't
determine the prototype. When I run cfagent, it's looking for
127.0.0.1_192.168.1.2
_SimpleMethod_MD5=xxx, but the physical file is called
localhost_localhost_SimpleMethod_MD5=xxx.
I would very much like the methods to start working again, as it's a really
cool feature of
cfengine.
Thanks in advance for your help.
Tommy
Anyways, my policy:
methods:
myclass::
SimpleMethod(null) action=cf.simple returnvars=null returnclasses=null
server=localhost
and the /var/cfengine/modules/cf.simple, looks like this (taken from the web):
# cf.simple
control:
MethodName = ( SimpleMethod )
MethodParameters = ( null )
actionsequence = ( timezone )
####################################################
alerts:
myclass::
"This simple method does nothing"
ReturnVariables(void)
ReturnClasses(void)
The output when I run cfagent:
...
...
...
cfengine:xxxxx:SimpleMethod: Examining child's incoming
(localhost_localhost_SimpleMethod_MD5=37a6259cc0c1dae299a7866489dff0bd)
cfengine:xxxxx:SimpleMethod: This request came from localhost - our reply
should be sent there!
cfengine:xxxxx:SimpleMethod: cfengine:: Could not open a parameter bundle
(/var/cfengine/rpc_in/127.0.0.1_192.168.1.2_SimpleMethod_MD5=37a6259cc0c1dae299a7866489dff0bd)
while
counting attachments
cfengine:xxxxx:SimpleMethod: Number of return arguments (0) does not match
template (1)
cfengine:xxxxx:SimpleMethod: Discarding method SimpleMethod
cfengine:xxxxx:SimpleMethod: cfengine:: No valid incoming request to execute
method (SimpleMethod)
cfengine:xxxxx: Finished local method /var/cfengine/bin/cfagent -f
/var/cfengine/modules/cf.simple
-v -Z MD5=37a6259cc0c1dae299a7866489dff0bd processing
---------------------------------------------------------------------
Fetching replies to finished methods
---------------------------------------------------------------------
The contents of /var/cfengine/rpc_in/
# ll /var/cfengine/rpc_in/
total 16
-rw-r--r-- 1 root root 188 May 21 02:41
localhost_localhost_SimpleMethod_MD5=37a6259cc0c1dae299a7866489dff0bd
-rw-r--r-- 1 root root 4 May 21 02:41
localhost_localhost_SimpleMethod_MD5=37a6259cc0c1dae299a7866489dff0bd_1
# more localhost_localhost_SimpleMethod_MD5\=37a6259cc0c1dae299a7866489dff0bd
NAME: SimpleMethod
TRUSTEDFILE: cf.simple
TIMESTAMP: 1085107287
REPLYTO: localhost
ATTACH-ARG:
/var/cfengine/rpc_in/localhost_localhost_SimpleMethod_MD5=37a6259cc0c1dae299a7866489dff0bd_1
# more localhost_localhost_SimpleMethod_MD5\=37a6259cc0c1dae299a7866489dff0bd_1
null
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Problems with methods in v. 2.1.6,
Tommy Abrahamsson <=