Re: [Puppet-dev] Puppet::Util.replace_file vs Puppet::Util::FileLocking

2013-06-25 Thread Trevor Vaughan
In this case, the Puppet::Util::SELInux code has everything necessary to wrap the call and works correctly with nil values. But yes, knowing what filesystem you were on and being able to handle it accordingly would be nice. Trevor On Tue, Jun 25, 2013 at 4:48 PM, Josh Cooper wrote: > > > > On

Re: [Puppet-dev] Puppet::Util.replace_file vs Puppet::Util::FileLocking

2013-06-25 Thread Josh Cooper
On Tue, Jun 25, 2013 at 12:56 PM, Trevor Vaughan wrote: > +1 for comments :-D. > > Thanks Andy. > > I filed two related bugs in that they don't preserve SELinux contexts. > Debugging that is extra exciting. > > Trevor > > > On Tue, Jun 25, 2013 at 12:48 PM, Andy Parker wrote: > >> They are for di

Re: [Puppet-dev] Puppet::Util.replace_file vs Puppet::Util::FileLocking

2013-06-25 Thread Trevor Vaughan
+1 for comments :-D. Thanks Andy. I filed two related bugs in that they don't preserve SELinux contexts. Debugging that is extra exciting. Trevor On Tue, Jun 25, 2013 at 12:48 PM, Andy Parker wrote: > They are for different purposes. If you want to securely and atomically > replace the conte

Re: [Puppet-dev] Puppet::Util.replace_file vs Puppet::Util::FileLocking

2013-06-25 Thread Andy Parker
They are for different purposes. If you want to securely and atomically replace the contents of a file then you use #replace_file. If you want to use a locking mechanism that another process can interact with, then you want Puppet::Util::FileLock. On Tue, Jun 25, 2013 at 6:36 AM, Trevor Vaughan w

[Puppet-dev] Puppet::Util.replace_file vs Puppet::Util::FileLocking

2013-06-25 Thread Trevor Vaughan
So, what's better to use and why, Puppet::Util.replace_file or Puppet::Util::FileLocking? Thanks, Trevor -- Trevor Vaughan Vice President, Onyx Point, Inc (410) 541-6699 tvaug...@onyxpoint.com -- This account not approved for unencrypted proprietary information -- -- You received this messag