Issue #2220 has been reported by volcane volcane.

----------------------------------------
Bug #2220: Empty Directories and Purging not behaving well
http://projects.reductivelabs.com/issues/2220

Author: volcane volcane
Status: Unreviewed
Priority: Normal
Assigned to: 
Category: 
Target version: 
Complexity: Unknown
Affected version: 0.24.7
Keywords: 


Using the kind of technique as documented here: 
http://reductivelabs.com/trac/puppet/wiki/FrequentlyAskedQuestions#i-want-to-manage-a-directory-and-purge-its-contents

I am seeing some regression with 0.25.0:

Manifest:

<pre>
        File{   
                owner           => "root",
                group           => "root",
                mode            => "0644",
        }


        file{"/tmp/special.d/snippets/00_snippet":
                content         => "Hello World\n"
        }

        file{"/tmp/special.d":
                ensure  => directory,
        }

        file{"/tmp/special.d/snippets":
                ensure          => directory,
                source          => "puppet://puppet/modules/puppet/empty",
                recurse         => true,
                purge           => true,
                force           => true,
                ignore          => ".svn",
        }

</pre>

The first run works well, does what you'd expect:

<pre>
info: Caching catalog for dev1.mydev.net
notice: //Node[dev1.mydev.net]/File[/tmp/special.d]/ensure: created
notice: //Node[dev1.mydev.net]/File[/tmp/special.d/snippets]/ensure: created
notice: 
//Node[dev1.mydev.net]/File[/tmp/special.d/snippets/00_snippet]/checksum: 
defined 'checksum' as '{md5}e59ff97941044f85df5297e1c302d260'
notice: 
//Node[dev1.mydev.net]/File[/tmp/special.d/snippets/00_snippet]/content: 
defined 'content' as '{md5}e59ff97941044f85df5297e1c302d260'
notice: //Node[dev1.mydev.net]/File[/tmp/special.d/snippets/00_snippet]/owner: 
defined 'owner' as 'root'
notice: //Node[dev1.mydev.net]/File[/tmp/special.d/snippets/00_snippet]/group: 
defined 'group' as 'root'
notice: //Node[dev1.mydev.net]/File[/tmp/special.d/snippets/00_snippet]/mode: 
defined 'mode' as '644'
notice: Finished catalog run in 0.25 seconds
</pre>

Subsequent runs does this though:

<pre>
info: Caching catalog for dev1.mydev.net
notice: //Node[dev1.mydev.net]/File[/tmp/special.d]/mode: mode changed '644' to 
'755'
notice: //Node[dev1.mydev.net]/File[/tmp/special.d/snippets]/checksum: checksum 
changed '{mtime}Mon May 04 14:34:59 +0100 2009' to '{mtime}Mon May 04 14:39:18 
+0100 2009'
notice: //Node[dev1.mydev.net]/File[/tmp/special.d/snippets]/mode: mode changed 
'644' to '755'
notice: /File[/tmp/special.d/snippets/00_snippet]/ensure: removed
warning: Got an event from invalid vertex 
File[/tmp/special.d/snippets/00_snippet]
notice: 
//Node[dev1.mydev.net]/File[/tmp/special.d/snippets/00_snippet]/checksum: 
defined 'checksum' as '{md5}e59ff97941044f85df5297e1c302d260'
notice: 
//Node[dev1.mydev.net]/File[/tmp/special.d/snippets/00_snippet]/content: 
defined 'content' as '{md5}e59ff97941044f85df5297e1c302d260'
notice: //Node[dev1.mydev.net]/File[/tmp/special.d/snippets/00_snippet]/owner: 
defined 'owner' as 'root'
notice: //Node[dev1.mydev.net]/File[/tmp/special.d/snippets/00_snippet]/group: 
defined 'group' as 'root'
notice: //Node[dev1.mydev.net]/File[/tmp/special.d/snippets/00_snippet]/mode: 
defined 'mode' as '644'
notice: Finished catalog run in 0.25 seconds
</pre>

There are a few problems here:

# Shouldn't it be leaving the directory modes alone? 0.24.x did the right thing 
and changed the modes for directories as you'd expect and didn't in future runs 
try to fiddle with them
# It then removes the File[/tmp/special.d/snippets/00_snippet] resource and 
creates it again

This isn't right and is a big regression from 0.24.x for anyone who use 
snippets to construct files etc.
 


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://reductivelabs.com/redmine/my/account

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to