[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem calling methods with cfengine 2.1.10
From: |
Sven Mueller |
Subject: |
Re: Problem calling methods with cfengine 2.1.10 |
Date: |
Fri, 27 Aug 2004 18:04:54 +0200 |
User-agent: |
Thunderbird 0.7.3 (Windows/20040803) |
Sven Mueller [u] wrote on 27/08/2004 17:27:
>> I had this problem before, but it reappeared with cfengine 2.1.10
though
>> I have no idea why:
>>
>> We have a number of locally called methods, but for some reason, at
>> least one is _never_ executed. The execution is cancelled with this
message:
>>
>> Trying /var/cfengine/bin/cfagent -f
>> /var/cfengine/modules/InstallLeososPackage.conf -v -Z
>> MD5=9eae6870f90b2f935104dd03c7d0bac3
>> cfengine:mx: Another cfengine seems to have done
>> method-exec.InstallLeososPackage since I started
>>
>>
>> However, there is no such thing as "another cfengine". We have only one
>> instance called at a time and don't call it again until it has finished.
>>
>> The code which causes this is:
>> if (elapsedtime < 0)
>> {
>> snprintf(OUTPUT,CF_BUFSIZE*2,"Another cfengine seems to have done
>> %s.%s since I started\n",operator, operand);
>> CfLog(cfverbose,OUTPUT,"");
>> return false;
>> }
>>
>> though I don't see a problem there.
>>
>> Any idea why this might happen?
Oh well, even when I disable the check mentioned, the method is not
executed. The rpc_in files are then removed with the following message
(from methods.c):
Purging stray community file that does not belong here:
localhost_localhost_InstallLeososPackage_MD5=3fd3785ab3fdfc2b7e27ba0489ecb416_1
But why?
However, I just noticed another strangeness in the source. In methods.c,
lines 140ff, you have a for loop and in the for loop, you have a check
if (strcmp(server,"localhost") == 0)
{
belongs_here = true;
}
which IMHO should not be in the loop at all (it doesn't check anything
which would be related to the "ip" loop variable), but immediately
preceeding or following it.
cu,
sven