help-cfengine
[Top][All Lists]
Advanced

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

Re: cf_procs rename: No such file or directory


From: Tod Oace
Subject: Re: cf_procs rename: No such file or directory
Date: Mon, 1 Nov 2004 10:42:27 -0800

On Oct 30, 2004, at 00:41, Mark.Burgess@iu.hio.no wrote:

I am afraid that I don't understand what you are suggesting in this message.

Well that's because it probably didn't make much sense.  :)
I thought through it a little more and then looked at the code and now I think I have a better idea of what's going on.

I still think the error is caused by two instances of cfagent running at the same time. But now I think the error is happening from the two processes trying to dump out their cf_proc data at almost the same time.

cfagent #1 writes cf_proc.cfedited in function SaveItemList()
cfagent #2 also writes cf_proc.cfedited
cfagent #1 renames cf_proc.cfedited to cf_proc
cfagent #2 tries to rename cf_proc.cfedited to cf_proc and fails with the "rename: No such file or directory" error.

I haven't looked into the code enough to see how the cf_proc file is used exactly.
I'm guessing cfagent #2 ends up using cfagent #1's cf_proc data.
Probably there should be some kind of lock on cf_proc so that it isn't updated too frequently, or at least not concurrently.

Actually I have not seen the error message for a while, but I have never understood where it comes from..

I was getting a few of them a day, but all but two of the errors during the month of October were from those three systems with the silly duplicate cron entries. I think the remaining two errors were caused by me or someone manually firing off a cfagent run at the same time an automatic run happened.

Did you happen to do more manual cfagent runs in the past than you do now? That might explain why you're not seeing the errors anymore. -Tod


M

On 29 Oct, Tod Oace wrote:
On Oct 28, 2004, at 12:20, Mark.Burgess@iu.hio.no wrote:

I see this from one machine  and have absolutely no understanding
of it whatsoever!!! :(

I just discovered backup cfengine files in /etc/cron.d/ on three Linux
machines that were giving the cf_procs error. I found that after
noticing double cfexecd cron log entries and double cfengine runlog
entries.  :)

I still have a Solaris and Linux machine that produced the error this
month which do not have duplicate cron entries. I'm wondering though...

Having duplicate cfexecd processes shows that cfagent isn't locking
cf_procs, right?
So that means a manual cfagent would also step on a scheduled cfagent's
cf_procs.
I know that I occasionally did do manual runs on at least one of the
remaining mystery machines this month.
Is the answer then to lock cf_procs?
Could this be the case on your one machine?

-Tod

M

On 28 Oct, Tod Oace wrote:
I occasionally see the following error:

Error while renaming /var/cfengine/state/cf_procs
rename: No such file or directory

Anyone else seeing these? I only get them from a small subset of
machines, some Linux and some Solaris. Cfengine 2.1.10 but I've also
seen it from earlier versions.




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





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


--
Tod Oace, Intel Corporation <tod@intel.com>





reply via email to

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