On Saturday, January 19, 2013 7:04:47 AM UTC-6, Jakov Sosic wrote:
>
> On 01/18/2013 06:27 PM, jcbollinger wrote: 
>
> > I was able to verify that the same behavior is exhibited by Puppet 
> > 0.24.8.  That behavior goes against basic Puppet principles, however: 
> > unmanaged resources and resource properties should not be modified by 
> > Puppet.   It looks like that's the consensus opinion of those commenting 
> > on issue 5240, too.  Basically, then, this is a longstanding, 
> > cross-platform bug.  I have added a comment about this to issue 5240, as 
> > it probably makes sense to expand that issue to cover this matter, too. 
>
> But if you push the directory with recurse => true, what permissions 
> would files get in that case? Permissions of the file on the master, or 
> default permission for that scope? 
>
>

I think you're confusing two unrelated dimensions.  Whether the resource is 
recursive or not, if no mode (uid/gid) is declared for it then Puppet 
should not modify the mode (uid/gid) of *existing files* as part of 
managing that resource.  This is standard Puppet behavior, and users should 
be able to rely on it.  There are functional reasons to want it, too.

There is a completely separate question of what Puppet should do when it 
*creates 
a new file*: if the resource declaration does not specify a mode (uid/gid) 
then Puppet either must choose one by some other means.  Its current 
behavior is to use the properties of the source file, which I actually 
think is fine, though issue 5240 raises questions about that behavior.

Recursive File resources have long been a problematic area for Puppet.  
That's not a flaw in Puppet (unless you consider recursive Files themselves 
to be a misfeature); rather, it's inherent in the problem.  The whole point 
of recursive File resources is to manage a bunch of files without declaring 
all the properties of each one individually.  But then, you're not 
declaring the properties of each one individually.  If you want fine 
control then you need something that carries all the needed data.  The best 
alternative in most cases is either to manage Files separately or to 
package them up and manage them via the Package.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/dz6Q5qGVG9EJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to