I'm having a very VERY annoying problem with "tidy".  This may be a
feature, but it feels like a bug.

I've managed to replicate the problem with a VERY simple configuration. 
Mark, perhaps you can shed some light on this.

----cfagent.conf------------

import:
  cf.tidy1
  cf.tidy2

----------------------------

----cf.tidy1----------------

control:
    actionsequence = ( tidy.tidy1 )

tidy:

tidy1::
    /tmp/test_files  pattern=tidy1.* age=0

----------------------------

----cf.tidy2----------------

control:
    actionsequence = ( tidy.tidy2 )

tidy:

tidy2::
    /tmp/test_files  pattern=tidy2.* age=0

----------------------------

I touch some files in /tmp/test_files as follows:

[EMAIL PROTECTED] /tmp/test_files]$ touch tidy1.csh tidy1.sh tidy2.csh tidy2.sh

And then run cfagent, and the log shows that only the first tidy action
actually does anything:

<snip>
*********************************************************************
 Main Tree Sched: tidy.tidy1 pass 1 @ Wed Apr 25 13:22:15 2007
*********************************************************************


                  New temporary class additions
                  --------( Pass 1 )-------
                             tidy1
---------------------------------------------------------------------
Tidying Spool Directories
---------------------------------------------------------------------

---------------------------------------------------------------------
Tidying by directory
---------------------------------------------------------------------

cfengine:byleth: Deleting file /tmp/test_files/tidy1.csh
cfengine:byleth: Size=0 bytes,
cfengine:byleth: Deleting file /tmp/test_files/tidy1.sh
cfengine:byleth: Size=0 bytes,
---------------------------------------------------------------------
Tidying home directories
---------------------------------------------------------------------

No home patterns to search

*********************************************************************
 Main Tree Sched: tidy.tidy2 pass 1 @ Wed Apr 25 13:22:15 2007
*********************************************************************


                  New temporary class additions
                  --------( Pass 1 )-------
                             tidy2
---------------------------------------------------------------------
Tidying Spool Directories
---------------------------------------------------------------------

---------------------------------------------------------------------
Tidying by directory
---------------------------------------------------------------------

---------------------------------------------------------------------
Tidying home directories
---------------------------------------------------------------------

No home patterns to search
---------------------------------------------------------------------
Alerts
---------------------------------------------------------------------
</snip>


I *really* hope this is a bug (and thus will be fixed) because more and
more often we run into this issue and have to convert tons of tidy:
actions into shellcommands actions that call "rm".  Not really "using
cfengine to its full potential"!!

BTW, this is on cfengine 2.1.21.  My sincerest apologies if this was fixed
in a later version and I didn't notice in the changelogs.

--

Paul Krizak                         5900 E. Ben White Blvd. MS 625
Advanced Micro Devices              Austin, TX  78741
Linux/Unix Systems Engineering      Phone: (512) 602-8775
Silicon Design Division             Cell:  (512) 791-0686



_______________________________________________
Bug-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/bug-cfengine

Reply via email to