[Puppet-dev] [PATCH/facter 1/1] Fixed #3939 - Rescue action for swap -l on AIX

2010-06-10 Thread James Turnbull
Signed-off-by: James Turnbull ja...@lovedthanlost.net --- lib/facter/memory.rb | 14 +- 1 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/facter/memory.rb b/lib/facter/memory.rb index f0f0d45..94769d0 100644 --- a/lib/facter/memory.rb +++ b/lib/facter/memory.rb @@

Re: [Puppet-dev] [PATCH/facter 1/1] Fixed #3939 - Rescue action for swap -l on AIX

2010-06-10 Thread Paul Nasrat
On 10 June 2010 07:16, James Turnbull ja...@lovedthanlost.net wrote: Signed-off-by: James Turnbull ja...@lovedthanlost.net -1 Hmm, there are a whole bunch of facts/commands that require root or behave differently. I'd rather see this implemented as a confine. ---  lib/facter/memory.rb |  

Re: [Puppet-dev] [PATCH/facter 1/1] Fixed #3939 - Rescue action for swap -l on AIX

2010-06-10 Thread Héctor Rivas Gándara
I think it simply could detect that the command (swap -l ) failed and raise an exception with the output (or first line of the output). Now it fails with a nil access error, I had to see the code to determine that the problem was that I was running facter as a normal user and 'swap -l' was

Re: [Puppet-dev] [PATCH/facter 1/1] Fixed #3939 - Rescue action for swap -l on AIX

2010-06-10 Thread Paul Nasrat
2010/6/10 Héctor Rivas Gándara key...@gmail.com: I think it simply could detect that the command (swap -l ) failed and raise an exception with the output (or first line of the output). Potentially yes, we should change how util.exec works and enable logging to user/exception passing to lib