bug-cfengine
[Top][All Lists]
Advanced

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

Re: Bug in methods (cfengine 2.1.7p1)


From: Mark . Burgess
Subject: Re: Bug in methods (cfengine 2.1.7p1)
Date: Mon, 9 Aug 2004 06:22:23 +0200 (MEST)

This could help to explain a mystery that I have been trying to solve myself.
Thanks for the tip. I shall investigate further and get back to you soon.

Mark

On  5 Aug, Sven Mueller wrote:
> Sven Mueller [u] wrote on 05/08/2004 13:04:
> 
>  > Why does cfagent (when called for) InstallNagiosCheck remove a file 
> which isn't even intended for it? In fact, the cfagent child process for 
> InstallNagiosCheck purges just the file about which the later child 
> process for InstallLeososPackage complains it can't find.
>  >
>  > Any hints? Is this fixed in cfengine 2.1.8? The Chnagelog entry
>  >     Bugs in implementation of remote method protocol. Classes were
>  >           not transferred properly.
>  > gives a hint it might be.
>  >
>  > Would appreciate any help.
> 
> 
> OK, I tracked it down a bit. The part of methods.c which actually 
> deletes the file we need later on is line 1052 ff.:
> 
>        if (statbuf.st_mtime > (CFSTARTTIME - 2*3600)) /* Default 2 hr 
> expiry */
>           {
>           Debug("Purging expired method (3) %s\n",path);
>           unlink(path);
>           continue;
>           }
> 
> It seems to me that the ">" should actually be a "<". Otherwise you 
> delete any file which is has last been modified _since_ (not before) 
> CFSTARTTIME - 2hrs.
> I assume the same is true for the similar comparisons in lines:
> line  124: if (statbuf.st_mtime > CFSTARTTIME + (VEXPIREAFTER * 60))
> line 1043: if (statbuf.st_mtime > (CFSTARTTIME - (mp->expireafter * 60)))
> line 1052: if (statbuf.st_mtime > (CFSTARTTIME - 2*3600)) /* Default 2 
> hr expiry */
> 
> 
> cu,
> sven
> 
> 
> _______________________________________________
> Bug-cfengine mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bug-cfengine



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Work: +47 22453272            Email:  address@hidden
Fax : +47 22453205            WWW  :  http://www.iu.hio.no/~mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





reply via email to

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