[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Please help! -- 2.1.11 cfengine delete /tmp symbolic linkmisteriousl
From: |
Guolin Cheng |
Subject: |
RE: Please help! -- 2.1.11 cfengine delete /tmp symbolic linkmisteriously |
Date: |
Fri, 12 Nov 2004 12:25:25 -0800 |
Mark and Sven,
Sven is right, I do mean that: /var/tmp/ should not be touched at all. Only
files, subDirectories, symbolic links and sockets UNDER /var/tmp/ will be
handled.
Unfortunately, according to the debug output, /var/tmp/ and /tmp (I don't know
why unrelated /tmp is processes by cfengine ??) are also processed for tidy
operation, maybe also "/var/*" and "/*"? this is a little counter-intuitive
since cfengine here is "upwards" as well instead ONLY "downwards" to only its
file|subDir|links|sockets contents. Cfengine should process, by default
intuitively, only contents UNDER the specified directory.
Maybe I'm wrong, or misunderstand tidy operation. Please help.
--Guolin Cheng
address@hidden [u] wrote on 12/11/2004 06:07:
That seems to be only partly true. He did ask cfagent to clear directory
links, but only for /var/tmp, but /tmp got deleted, while /var/tmp
remained intact. At least if I read his mail correctly.
cu,
Sven
> You have explicitly asked for dirlinks=tidy, so this is
> correct. There was a bug here earlier.
>
> M
>
> On 11 Nov, ha haha wrote:
>
>>Hi,
>>
>> Yesterday I've updated my cfengine from 2.1.7p1 to
>>2.1.11. The new packages compiled and installed
>>successfully. But unfortunately, it mis-interpret my
>>configuration files which worked for 2.1.7p1 with no
>>faults. And deleted my /tmp symbolic link by mistake.
>>
>> The background information is:
>>
>> 1), I have two links /tmp -> ../0/.final/tmp,
>>/var/tmp -> ../0/.final/tmp, while /0/.final/tmp is a
>>directory.
>>
>> 2), /var, /, and /0 are three dfferent
>>partitions.
>>
>> 3), my "tidy" related sections for the
>>/var/tmp/ is:
>>
>>¡¡¡¡¡..
>>control:
>>
>> actionsequence = ( directories files links tidy
>>disable copy editfiles processes shellcommands
>>¡¡¡..)
>>
>>tidy:
>> any::
>>
>> /var/tmp/
>> pattern=*
>> filter=tmpSpaceTidy
>> recurse=inf
>> type=mtime
>> rmdirs=true
>> links=tidy
>> dirlinks=tidy
>> age=39
>> inform=true
>>
>>¡¡¡.
>>filters:
>>
>> { tmpSpaceTidy
>> Type: "reg|dir|link|socket"
>> Result: "Type"
>> }
>>¡¡¡¡¡..
>>
>> After I run "cfagent -v -q", then I got the
>>following line (15 bytes is the total bytes of
>>symbolic link destination "../0/.final/tmp":
>>
>>*********************************************************************
>> Main Tree Sched: tidy pass 1 @ Thu Nov 11 18:18:53
>>2004
>>*********************************************************************
>>¡¡¡..
>>---------------------------------------------------------------------
>>Tidying by directory
>>---------------------------------------------------------------------
>>
>>cfengine:alws10: Deleting file /var/tmp
>>cfengine:alws10: Size=15 bytes,
>>
>> ¡¡
>>
>>It is very strange, since not symbolic link "var/tmp"
>>is deleted, but /tmp llink which points to same
>>destination!
>>
>>Then I tried to output the debug desult with "cfagent
>>-v -d10 -q", and got the following output:
>>
>> ¡¡¡¡¡¡..
>>
>>---------------------------------------------------------------------
>>Tidying by directory
>>---------------------------------------------------------------------
>>
>>
>>No patterns active in base directory
>>/var/lib/cfengine2/outputs
>>
>>Tidying from base directory /var/tmp
>>ExpandVarstring(/var/tmp)
>>ExpandVarstring(/tmp)
>>GetLock(tidy,_var_tmp,time=1100226190),
>>ExpireAfter=120, IfElapsed=1
>>GetLastLock()
>>CheckOldLock(lock.cfagent_conf.alws10.tidy.tidy_1298)
>>Unable to find lock data
>>lock.cfagent_conf.alws10.tidy.tidy_1298
>>SetLock(lock.cfagent_conf.alws10.tidy.tidy_1298)
>>PutLock(lock.cfagent_conf.alws10.tidy.tidy_1298)
>>Found no lock
>>[lock.cfagent_conf.alws10.tidy.tidy_1298]:
>>DB_NOTFOUND: No matching key/data pair found
>>Registering root device as 2059
>>RecursiveTidySpecialArea(/var/tmp)
>>Changed directory to /var/tmp
>>Checking the inode and device to make sure we are
>>where we think we are...
>>IgnoredOrExcluded(/var/tmp)
>>IgnoreFile(/var/tmp,)
>>Tidy: opening dir /var/tmp
>>Filename /var/tmp/. is classified as ignorable
>>Filename /var/tmp/.. is classified as ignorable
>>IgnoreFile(/var/tmp,cfengine-2.1.11-1.i386.rpm)
>>WildMatch(*,cfengine-2.1.11-1.i386.rpm)
>>FileObjectFilter(/var/tmp/cfengine-2.1.11-1.i386.rpm)
>>Applying filter tmpSpaceTidy
>>Filter result on /var/tmp/cfengine-2.1.11-1.i386.rpm
>>was 1
>>IgnoredOrExcluded(/var/tmp/cfengine-2.1.11-1.i386.rpm)
>>Checking tidy topmost directory /var/tmp
>>Checking for dead links
>>KillOldLink(/var/tmp)
>>WildMatch(*,tmp)
>>FileObjectFilter(/var/tmp)
>>Applying filter tmpSpaceTidy
>>Filter result on /var/tmp was 1
>>IgnoredOrExcluded(/var/tmp)
>>Link to directory, dirlinks= says delete these
>>cfengine:alws10: Deleting file /var/tmp
>>cfengine:alws10: Size=15 bytes,
>>ReleaseCurrentLock(lock.cfagent_conf.alws10.tidy.tidy_1298)
>>PutLock(last.cfagent_conf.alws10.tidy.tidy_1298)
>>LockLog(Lock removed normally )
>>
>> ¡¡¡¡¡
>>
>>
>>I have no otherchoise, but have to temporarily fix the
>>problem by the following changes:
>>
>> rmdir=sub ## original is "true"
>> xdev=false ## orignally doesn't exist
>>
>>It is only a temporary fix for the above problem.
>>Please help.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>__________________________________
>>Do you Yahoo!?
>>Check out the new Yahoo! Front Page.
>>www.yahoo.com
>>
>
>
>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Work: +47 22453272 Email: address@hidden
> Fax : +47 22453205 WWW : http://www.iu.hio.no/~mark
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
>
> _______________________________________________
> Help-cfengine mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-cfengine
>
>
--
"Pinguine können ja bekanntlich nicht fliegen und stürzen deshalb auch
nicht ab."
RTL-Nachtjournal über Linux, 29.10.2004
_______________________________________________
Bug-cfengine mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/bug-cfengine
- RE: Please help! -- 2.1.11 cfengine delete /tmp symbolic linkmisteriously,
Guolin Cheng <=