Re: [Puppet-dev] Proposal: JSON serialization schema testing

2011-03-07 Thread Luke Kanies
On Mar 7, 2011, at 1:32 PM, Paul Berry wrote: > Puppet currently produces and consumes data in several formats which: > - are not explicitly documented > - are sometimes modified by mistake (e.g. when a developer adds a private > instance variable to a class, and that instance variable gets autom

Re: [Puppet-dev] ensure /etc/puppet directory: bug or feature?

2011-03-07 Thread Luke Kanies
On Mar 7, 2011, at 3:44 AM, Gary Law wrote: > Hi > > I'm getting burned by efforts to make /etc/puppet a symlink in the > Solaris package of puppet. Trouble is more recent versions of puppet > are ensuring this is a directory (not sure in which version this > behaviour crept in). I don't want it

[Puppet-dev] [PATCH/facter 1/1] Fix for #6495 - Updated interface detection

2011-03-07 Thread James Turnbull
1. Fixed IP return to not filter lo/localhost and return it as a proper interface 2. Fixed HP-UX netstat return to remove extraneous first line of naming. 3. Updated tests to reflect changes Signed-off-by: James Turnbull --- Local-branch: tickets/master/6495 lib/facter/util/ip.rb

[Puppet-dev] [PATCH/puppet 16/19] * Fix exception on parse failure of pkgutil output * Fix exception when querying latest version for unknown package

2011-03-07 Thread Juerg Walz
From: Dominic Cleal Signed-off-by: Juerg Walz --- Local-branch: tickets/master/4258-dev lib/puppet/provider/package/pkgutil.rb | 19 ++- 1 files changed, 6 insertions(+), 13 deletions(-) diff --git a/lib/puppet/provider/package/pkgutil.rb b/lib/puppet/provider/package/pkgut

[Puppet-dev] [PATCH/puppet 14/19] Removing blastwave references and unused PAGER

2011-03-07 Thread Juerg Walz
From: Dominic Cleal Signed-off-by: Juerg Walz --- Local-branch: tickets/master/4258-dev lib/puppet/provider/package/pkgutil.rb | 18 -- 1 files changed, 8 insertions(+), 10 deletions(-) diff --git a/lib/puppet/provider/package/pkgutil.rb b/lib/puppet/provider/package/pkguti

[Puppet-dev] [PATCH/puppet 11/19] Fixing wget verbose regex

2011-03-07 Thread Juerg Walz
From: Dominic Cleal Signed-off-by: Juerg Walz --- Local-branch: tickets/master/4258-dev lib/puppet/provider/package/pkgutil.rb |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/puppet/provider/package/pkgutil.rb b/lib/puppet/provider/package/pkgutil.rb index 19a62d

[Puppet-dev]

2011-03-07 Thread Juerg Walz
This is an update (i.e. version 2) of my proposed changes for ticket #4258. Here's the diff: --- a/lib/puppet/provider/package/pkgutil.rb +++ b/lib/puppet/provider/package/pkgutil.rb @@ -56,7 +56,7 @@ Puppet::Type.type(:package).provide :pkgutil, :parent => :sun, :source => :sun d if hash

[Puppet-dev] [PATCH/puppet 01/19] Fixed #4258 - Added pkgutil package provider

2011-03-07 Thread Juerg Walz
From: James Turnbull Signed-off-by: Juerg Walz --- Local-branch: tickets/master/4258-dev lib/puppet/provider/package/pkgutil.rb | 117 1 files changed, 117 insertions(+), 0 deletions(-) create mode 100644 lib/puppet/provider/package/pkgutil.rb diff --git a/l

[Puppet-dev] [PATCH/puppet 15/19] Fixing indentation

2011-03-07 Thread Juerg Walz
From: Dominic Cleal Signed-off-by: Juerg Walz --- Local-branch: tickets/master/4258-dev lib/puppet/provider/package/pkgutil.rb |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/puppet/provider/package/pkgutil.rb b/lib/puppet/provider/package/pkgutil.rb index b9

[Puppet-dev] [PATCH/puppet 18/19] (#4258) pkgutil provider: misc enhancements

2011-03-07 Thread Juerg Walz
Several enhancements and bug-fixes for the pkgutil package provider: - handle "Not in catalog" - fix "SAME" version detection - allow short package name (w/o CSW) to match (-> no need to specify a different package name for different operating systems, ex. "ruby") - use the "-u" command line s

[Puppet-dev] [PATCH/puppet 10/19] These regular expressions will not match anything. pkgutil doesn't output anything that can be matched.

2011-03-07 Thread Juerg Walz
From: rgevaert Signed-off-by: Juerg Walz --- Local-branch: tickets/master/4258-dev lib/puppet/provider/package/pkgutil.rb |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/lib/puppet/provider/package/pkgutil.rb b/lib/puppet/provider/package/pkgutil.rb index 1d699f3..19

[Puppet-dev] [PATCH/puppet 09/19] Add comments that explain what we are ignoring in the package and remove legacy output

2011-03-07 Thread Juerg Walz
From: rgevaert Signed-off-by: Juerg Walz --- Local-branch: tickets/master/4258-dev lib/puppet/provider/package/pkgutil.rb |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/puppet/provider/package/pkgutil.rb b/lib/puppet/provider/package/pkgutil.rb index a5f852d

[Puppet-dev] [PATCH] maint: eliminate manual flushing of Facter.

2011-03-07 Thread Daniel Pittman
From: Daniel Pittman We now clear the Facter cache in the spec_helper support code around every test; this ensures that we consistently and correctly implement this without having to repeat it in every single spec file. Eliminating the manual flush helps stop people copying that around and incor

[Puppet-dev] [PATCH/puppet 05/19] pkgutil provider: The path to the admin file is /var/opt/csw/pkgutil/admin

2011-03-07 Thread Juerg Walz
From: Maciej Blizinski Signed-off-by: Juerg Walz --- Local-branch: tickets/master/4258-dev lib/puppet/provider/package/pkgutil.rb |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/puppet/provider/package/pkgutil.rb b/lib/puppet/provider/package/pkgutil.rb index

[Puppet-dev] [PATCH/puppet 06/19] pkgutil provider: Using the --single option which speeds up execution.

2011-03-07 Thread Juerg Walz
From: Maciej Blizinski Signed-off-by: Juerg Walz --- Local-branch: tickets/master/4258-dev lib/puppet/provider/package/pkgutil.rb |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/lib/puppet/provider/package/pkgutil.rb b/lib/puppet/provider/package/pkgutil.rb index 4f

[Puppet-dev] [PATCH/puppet 13/19] Changing indentation to 2-spaces as per 2.6+ style

2011-03-07 Thread Juerg Walz
From: Dominic Cleal Signed-off-by: Juerg Walz --- Local-branch: tickets/master/4258-dev lib/puppet/provider/package/pkgutil.rb | 212 1 files changed, 106 insertions(+), 106 deletions(-) diff --git a/lib/puppet/provider/package/pkgutil.rb b/lib/puppet/provid

[Puppet-dev] [PATCH/puppet 19/19] (#4258) pkgutil provider: better handling of short package names

2011-03-07 Thread Juerg Walz
Signed-off-by: Juerg Walz --- Local-branch: tickets/master/4258-dev lib/puppet/provider/package/pkgutil.rb |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/lib/puppet/provider/package/pkgutil.rb b/lib/puppet/provider/package/pkgutil.rb index 0e2056b..4a87932 100755

[Puppet-dev] [PATCH/puppet 08/19] Ignoring lines from use_gpg and catalog fetching

2011-03-07 Thread Juerg Walz
From: Dominic Cleal Signed-off-by: Juerg Walz --- Local-branch: tickets/master/4258-dev lib/puppet/provider/package/pkgutil.rb |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/lib/puppet/provider/package/pkgutil.rb b/lib/puppet/provider/package/pkgutil.rb index 05d

[Puppet-dev] [PATCH/puppet 17/19] Add spec tests for pkgutil package provider

2011-03-07 Thread Juerg Walz
From: Dominic Cleal Signed-off-by: Juerg Walz --- Local-branch: tickets/master/4258-dev spec/unit/provider/package/pkgutil_spec.rb | 132 1 files changed, 132 insertions(+), 0 deletions(-) create mode 100755 spec/unit/provider/package/pkgutil_spec.rb diff --git

[Puppet-dev] [PATCH/puppet 12/19] Single package queries made more robust when dealing with pkgutil noise

2011-03-07 Thread Juerg Walz
From: Dominic Cleal Signed-off-by: Juerg Walz --- Local-branch: tickets/master/4258-dev lib/puppet/provider/package/pkgutil.rb | 10 -- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/puppet/provider/package/pkgutil.rb b/lib/puppet/provider/package/pkgutil.rb inde

[Puppet-dev] [PATCH/puppet 03/19] Using --single in the pkgutil provider.

2011-03-07 Thread Juerg Walz
From: Maciej Blizinski Signed-off-by: Juerg Walz --- Local-branch: tickets/master/4258-dev lib/puppet/provider/package/pkgutil.rb |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/lib/puppet/provider/package/pkgutil.rb b/lib/puppet/provider/package/pkgutil.rb index

[Puppet-dev] [PATCH/puppet 07/19] Adding patch from Rudy Gevaert to fix not installed detection

2011-03-07 Thread Juerg Walz
From: Dominic Cleal Signed-off-by: Juerg Walz --- Local-branch: tickets/master/4258-dev lib/puppet/provider/package/pkgutil.rb |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/puppet/provider/package/pkgutil.rb b/lib/puppet/provider/package/pkgutil.rb index b8

[Puppet-dev] [PATCH/puppet 02/19] Adding pkgutil support.

2011-03-07 Thread Juerg Walz
From: Maciej Blizinski Signed-off-by: Juerg Walz --- Local-branch: tickets/master/4258-dev lib/puppet/provider/package/pkgutil.rb | 111 1 files changed, 111 insertions(+), 0 deletions(-) create mode 100755 lib/puppet/provider/package/pkgutil.rb diff --git a

[Puppet-dev] [PATCH/puppet 04/19] pkgutil provider: Correcting a typo in a message.

2011-03-07 Thread Juerg Walz
From: Maciej Blizinski Signed-off-by: Juerg Walz --- Local-branch: tickets/master/4258-dev lib/puppet/provider/package/pkgutil.rb |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/puppet/provider/package/pkgutil.rb b/lib/puppet/provider/package/pkgutil.rb index 39c

[Puppet-dev] [PATCH] maint: spec/integration/configurer has races in time checking.

2011-03-07 Thread Daniel Pittman
From: Daniel Pittman This code depended on the time written by the configurer, and Time.now about half a dozen lines later, being the same integer value. This would work almost all the time, because our code is pretty fast, but can race. We now capture the time on both sides of the call, and ve

Re: [Puppet-dev] [PATCH/puppet 1/1] Maint: Added the ability to replace the behavior of Puppet::Util.execute with an arbitrary code block for ease in spec testing.

2011-03-07 Thread Markus Roberts
P -- I'm not particularly proud of this code, but I don't see an alternative that > I like better. Eliminating Puppet::Util::ExecutionStub in favor of a global > variable seems very clumsy (not to mention that it would leave no place to > put comments warning that it is intended for spec testing

Re: [Puppet-dev] [PATCH/puppet 1/1] Maint: Added the ability to replace the behavior of Puppet::Util.execute with an arbitrary code block for ease in spec testing.

2011-03-07 Thread Paul Berry
I'm not particularly proud of this code, but I don't see an alternative that I like better. Eliminating Puppet::Util::ExecutionStub in favor of a global variable seems very clumsy (not to mention that it would leave no place to put comments warning that it is intended for spec testing only). As f

Re: [Puppet-dev] [PATCH/puppet 1/1] Maint: Added the ability to replace the behavior of Puppet::Util.execute with an arbitrary code block for ease in spec testing.

2011-03-07 Thread Markus Roberts
Am I missing something, or is this: --- /dev/null > +++ b/lib/puppet/util/execution_stub.rb > @@ -0,0 +1,26 @@ > +module Puppet::Util > + class ExecutionStub > +class << self > + # Set a stub block that Puppet::Util.execute() should invoke instead > + # of actually executing command

[Puppet-dev] [PATCH/puppet 1/1] Maint: Begin adding integration tests for the mount provider

2011-03-07 Thread Paul Berry
These tests form a starting point for integration testing the mount provider, using the new Puppet::Util::ExecutionStub mechanism to simulate the state of the machine in response to the execution of "mount" and "umount" commands. The tests currently work around some known bugs (6628, 6632, and 663

[Puppet-dev] [PATCH/puppet 1/1] Maint: Added the ability to replace the behavior of Puppet::Util.execute with an arbitrary code block for ease in spec testing.

2011-03-07 Thread Paul Berry
Reviewed-by: Max Martin Signed-off-by: Paul Berry --- lib/puppet/util.rb|5 lib/puppet/util/execution_stub.rb | 26 spec/spec_helper.rb |1 + spec/unit/util/execution_stub_spec.rb | 35 +++

Re: [Puppet-dev] Not quite understanding 'sync'

2011-03-07 Thread Luke Kanies
On Mar 7, 2011, at 1:05 PM, Trevor Vaughan wrote: > So, I have this working, but I'm not quite sure why I needed to do it this > way. > > I took a look at the exec:returns property and the associated 'sync' define. > > I was getting an error about returning an invalid event and I wasn't > sure

Re: [Puppet-dev] Not quite understanding 'sync'

2011-03-07 Thread Daniel Pittman
On Mon, Mar 7, 2011 at 14:24, Trevor Vaughan wrote: > Erg? I thought we were on a push to try and avoid reading the contents > of unknown size files into memory where possible? Well, it isn't a great idea; you are not obliged to do anything in prefetch: if your file is of unbounded or unreasonab

Re: [Puppet-dev] Not quite understanding 'sync'

2011-03-07 Thread Trevor Vaughan
Erg? I thought we were on a push to try and avoid reading the contents of unknown size files into memory where possible? Also, does this work with 0.24? Still waiting for those last few bumps to be ironed out of 2.6. Thanks, Trevor On Mon, Mar 7, 2011 at 5:21 PM, Daniel Pittman wrote: > On Mo

Re: [Puppet-dev] Not quite understanding 'sync'

2011-03-07 Thread Daniel Pittman
On Mon, Mar 7, 2011 at 14:14, Trevor Vaughan wrote: > I *think* I get what you're saying, but how would you translate this > to something that needs to see if an entry in a file is synchronized? So, let me be clear: *if* you can avoid replacing sync, that would be good. If you can't, and it is

Re: [Puppet-dev] Not quite understanding 'sync'

2011-03-07 Thread Trevor Vaughan
Daniel, I *think* I get what you're saying, but how would you translate this to something that needs to see if an entry in a file is synchronized? Yes, I know that I could possibly use parsed file, but it didn't work out of the box the way I needed and it was faster to start from scratch than try

Re: [Puppet-dev] Proposal: JSON serialization schema testing

2011-03-07 Thread Daniel Pittman
I think this is a wonderful plan, and fully support it. For the approach of taking this also to YAML, I have had some decent experience with Rx (http://rx.codesimply.com/index.html) in producing schema validation that is coherent between YAML and JSON. I am not suggesting an alternative to json_s

Re: [Puppet-dev] ensure /etc/puppet directory: bug or feature?

2011-03-07 Thread Gary Law
On 7 March 2011 18:06, Eric Sorenson wrote: > Old issue: > > https://projects.puppetlabs.com/issues/650 Thanks for finding this Eric. Seems like I'm not the only person unhappy with this behaviour then! Strange that my previous packaging efforts haven't got burned by it as it seems like a long st

Re: [Puppet-dev] Not quite understanding 'sync'

2011-03-07 Thread Daniel Pittman
On Mon, Mar 7, 2011 at 13:05, Trevor Vaughan wrote: > So, I have this working, but I'm not quite sure why I needed to do it this > way. > I took a look at the exec:returns property and the associated 'sync' define. This is, for reference, a bad model to build new types off; like file, it predat

Re: [Puppet-dev] Not quite understanding 'sync'

2011-03-07 Thread Trevor Vaughan
Fancy. I tried searching for several things but came up empty. This is probably something that should go on the dev wiki (if anyone is of a mind to do so). Thanks! Trevor On Mon, Mar 7, 2011 at 4:51 PM, Stefan Schulte wrote: > On Mon, Mar 07, 2011 at 04:05:18PM -0500, Trevor Vaughan wrote: >>

Re: [Puppet-dev] Not quite understanding 'sync'

2011-03-07 Thread Stefan Schulte
On Mon, Mar 07, 2011 at 04:05:18PM -0500, Trevor Vaughan wrote: > So, I have this working, but I'm not quite sure why I needed to do it this > way. > > I took a look at the exec:returns property and the associated 'sync' define. > > I was getting an error about returning an invalid event and I w

[Puppet-dev] Proposal: JSON serialization schema testing

2011-03-07 Thread Paul Berry
Puppet currently produces and consumes data in several formats which: - are not explicitly documented - are sometimes modified by mistake (e.g. when a developer adds a private instance variable to a class, and that instance variable gets automatically serialized to YAML) - are sometimes modified wi

[Puppet-dev] Not quite understanding 'sync'

2011-03-07 Thread Trevor Vaughan
So, I have this working, but I'm not quite sure why I needed to do it this way. I took a look at the exec:returns property and the associated 'sync' define. I was getting an error about returning an invalid event and I wasn't sure what type of event I was supposed to return in sync. I noticed th

Re: [Puppet-dev] Environment settings.

2011-03-07 Thread Nigel Kersten
On Mon, Mar 7, 2011 at 9:54 AM, Markus Roberts wrote: > N -- > > What changed in 2.6.x with regard to functional settings in [environment] >> blocks? >> >> Have we documented the list of functional settings anywhere? >> >> What settings are currently not functional in an [environment] block and >>

Re: [Puppet-dev] RBAC for Dashboard and Puppet

2011-03-07 Thread Randall Hansen
On Mar 7, 2011, at 9:31 AM, Markus Roberts wrote: > I think we're in danger of falling into the "yes but your proposal for fixing > the leaky faucet doesn't solve world hunger" rat hole, as we're so wont to do > these days. :) This is a good general concern; I don't think it applies here. We

Re: [Puppet-dev] ensure /etc/puppet directory: bug or feature?

2011-03-07 Thread Eric Sorenson
Old issue: https://projects.puppetlabs.com/issues/650 On Mar 7, 2011, at 3:44 AM, Gary Law wrote: > Hi > > I'm getting burned by efforts to make /etc/puppet a symlink in the > Solaris package of puppet. Trouble is more recent versions of puppet > are ensuring this is a directory (not sure in wh

Re: [Puppet-dev] Environment settings.

2011-03-07 Thread Markus Roberts
N -- What changed in 2.6.x with regard to functional settings in [environment] > blocks? > > Have we documented the list of functional settings anywhere? > > What settings are currently not functional in an [environment] block and > would be desirable to make functional? > I'm not sure I under st

[Puppet-dev] Environment settings.

2011-03-07 Thread Nigel Kersten
What changed in 2.6.x with regard to functional settings in [environment] blocks? Have we documented the list of functional settings anywhere? What settings are currently not functional in an [environment] block and would be desirable to make functional? -- You received this message because you

Re: [Puppet-dev] Re: [puppet-dev] RBAC for Dashboard and Puppet

2011-03-07 Thread Markus Roberts
So going back to the initial proposal that James made: It occurs to me that the logical extension of a Dashboard RBAC system (or perhaps even moving elements of the problem upstream) is for auth.conf to recognize users or perhaps better "roles" as an authentication construct. This seems like a ve

[Puppet-dev] Re: [puppet-dev] RBAC for Dashboard and Puppet

2011-03-07 Thread Randall Hansen
On Mar 7, 2011, at 8:22 AM, James Turnbull wrote: > Depends whether they are the same thing but yes assuming we do store > some concept of roles in the master then it should be the SoT. James and I just talked about this, and we have some more questions. We agree that the master should be the s

[Puppet-dev] Re: RBAC for Dashboard and Puppet

2011-03-07 Thread Randall Hansen
On Mar 5, 2011, at 12:32 PM, James Turnbull wrote: > puppet.conf: > [roles] > admin=APIkey > ... > auth.conf: > allow admin I agree that this seems like a step up from host-based auth. I don't see how it's role-based, aside from calling it a "role" in puppet.conf. No, I take that back. If th

Re: [Puppet-dev] [PATCH/facter 1/1] Fixed #5485 - Removed trailing line for selinux_mode fact

2011-03-07 Thread James Turnbull
Paul Nasrat wrote: > On 7 March 2011 09:25, James Turnbull wrote: >> Signed-off-by: James Turnbull > > > This fact probably could do with a unittest - there is selinux_spec.rb > already and you should be able to add the missing test as you are > touching it. Sure. > > Perhaps use Resolution:

[Puppet-dev] Re: RBAC for Dashboard and Puppet

2011-03-07 Thread James Turnbull
Randall Hansen wrote: > > In that case, how do you revoke a user's role? Disabling the key would be > like removing the role entirely, revoking access for everyone else with the > key. Or changing the key too. Not sure - that'd need some thought. > > What is the source of truth? If we stor

Re: [Puppet-dev] Composite namevar

2011-03-07 Thread Markus Roberts
Trevor -- Thanks for the extended explanation. This is something that should be > stuck up on the Type dev wiki. > > I'll try to get around to it, but no promises :-/. > At the point it was introduced (2.6.0) I believe we held back on publicly documenting it because 1) it might be forced to chang

Re: [Puppet-dev] Composite namevar

2011-03-07 Thread Trevor Vaughan
Markus, Thanks for the extended explanation. This is something that should be stuck up on the Type dev wiki. I'll try to get around to it, but no promises :-/. Thanks, Trevor On Fri, Mar 4, 2011 at 7:07 PM, Markus Roberts wrote: > > >> >> The title_pattern method is used in resource.rb in the

Re: [Puppet-dev] [PATCH/facter 1/1] Fixed #5485 - Removed trailing line for selinux_mode fact

2011-03-07 Thread Paul Nasrat
On 7 March 2011 09:25, James Turnbull wrote: > > Signed-off-by: James Turnbull This fact probably could do with a unittest - there is selinux_spec.rb already and you should be able to add the missing test as you are touching it. Perhaps use Resolution::Exec rather than %x{} We also should enf

[Puppet-dev] ensure /etc/puppet directory: bug or feature?

2011-03-07 Thread Gary Law
Hi I'm getting burned by efforts to make /etc/puppet a symlink in the Solaris package of puppet. Trouble is more recent versions of puppet are ensuring this is a directory (not sure in which version this behaviour crept in). I don't want it to be a directory[1] I would like this confdir to be defi

[Puppet-dev] [PATCH/facter 1/1] Fixed #5485 - Removed trailing line for selinux_mode fact

2011-03-07 Thread James Turnbull
Signed-off-by: James Turnbull --- Local-branch: tickets/master/5485 lib/facter/selinux.rb |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/facter/selinux.rb b/lib/facter/selinux.rb index 0e9637d..d312b3b 100644 --- a/lib/facter/selinux.rb +++ b/lib/facter/selinux

[Puppet-dev] [PATCH/facter 1/1] Fixed #4980 - Added default for architecture as hardwaremodel

2011-03-07 Thread James Turnbull
Signed-off-by: James Turnbull --- Local-branch: tickets/master/4980 lib/facter/architecture.rb |9 - 1 files changed, 0 insertions(+), 9 deletions(-) diff --git a/lib/facter/architecture.rb b/lib/facter/architecture.rb index e4aaeba..8ccd604 100644 --- a/lib/facter/architecture.rb +