Re: [Puppet-dev] issue 7629 against master

2011-05-23 Thread Luke Kanies
On May 23, 2011, at 11:45 AM, Dan Bode wrote: > This is an experimental set of patches that I wrote for composite namevars > to work with parsedfile and to support purging. > > This is not ready to be merged, I would just like to get some input on the > following: > - does this work (for peopl

[Puppet-dev] Graph databases and languages

2011-05-23 Thread Luke Kanies
Hi all, I've been thinking for a while of experimenting with graph databases -- especially Neo4j[1], but there are others out there -- and just this week I ran across a graph language, Gremlin[2]. I know Volcane has done some experimentation with Neo4j, but has anyone else messed with any of t

[Puppet-dev] Re: [Puppet Users] custom provider type error message

2011-05-23 Thread Nan Liu
On Mon, May 23, 2011 at 4:01 PM, MolMorroco wrote: > # 1. able to see confirm pluginsync = true works > $ find /var/lib/puppet/lib/puppet/ -type f > /var/lib/puppet/lib/puppet/type/custominstall.rb > /var/lib/puppet/lib/puppet/provider/custominstall/custominstall.rb > > # 2. but I still get the fo

Re: [Puppet-dev] issue 7629 against master

2011-05-23 Thread Dan Bode
can you point me to a branch I can pull from? On Mon, May 23, 2011 at 3:12 PM, Stefan Schulte < stefan.schu...@taunusstein.net> wrote: > On Mon, May 23, 2011 at 02:39:40PM -0700, Dan Bode wrote: > > :name is special (and hardcoded) in several parts of the Puppet code. > Could > > you try using so

Re: [Puppet-dev] isrequired doesn't do anything in a type?

2011-05-23 Thread Luke Kanies
On May 23, 2011, at 11:53 AM, Jacob Helwig wrote: > So, I'm working on #7188 and thought "hey, it would be great if we had > built-in checks that these required parameters were actually specified". > Especially since the current mount type claims that fstype is required, > yet does nothing (other

Re: [Puppet-dev] issue 7629 against master

2011-05-23 Thread Stefan Schulte
On Mon, May 23, 2011 at 02:39:40PM -0700, Dan Bode wrote: > :name is special (and hardcoded) in several parts of the Puppet code. Could > you try using some other name that :name and see if it resolves those > issues? > Doesnt resolve the issue. The test did pass before I applied your patch. Here

Re: [Puppet-dev] issue 7629 against master

2011-05-23 Thread Dan Bode
:name is special (and hardcoded) in several parts of the Puppet code. Could you try using some other name that :name and see if it resolves those issues? On Mon, May 23, 2011 at 2:25 PM, Stefan Schulte < stefan.schu...@taunusstein.net> wrote: > On Mon, May 23, 2011 at 11:45:45AM -0700, Dan Bode w

Re: [Puppet-dev] issue 7629 against master

2011-05-23 Thread Stefan Schulte
On Mon, May 23, 2011 at 11:45:45AM -0700, Dan Bode wrote: > This is an experimental set of patches that I wrote for composite namevars > to work with parsedfile and to support purging. > > This is not ready to be merged, I would just like to get some input on the > following: > - does this wor

Re: [Puppet-dev] [PATCH/puppet 7/7] (#7629) hash2resource should use namevar_join.

2011-05-23 Thread Dan Bode
On Mon, May 23, 2011 at 11:45 AM, Dan Bode wrote: > For types with composite namevars, hash2resource > should use namevar_join to populate tilte with > namevar. > > Signed-off-by: Dan Bode > --- > Local-branch: issue/master/7629 > lib/puppet/type.rb |7 +-- > 1 files changed, 5 insertio

Re: [Puppet-dev] [PATCH/puppet 3/7] (#7629) added namevar_join method to type

2011-05-23 Thread Dan Bode
On Mon, May 23, 2011 at 11:45 AM, Dan Bode wrote: > - for composite namevars to support purging > and 'puppet resource' quiery all, it needs to > be possible to map from the composite namevars > to a single id. > > - the basic idea is that authors of types need to > implement this method if t

Re: [Puppet-dev] isrequired doesn't do anything in a type?

2011-05-23 Thread Stefan Schulte
On Mon, May 23, 2011 at 11:53:12AM -0700, Jacob Helwig wrote: [...] > Is there an implemented way of doing 'this parameter is required; fail > at compile time'? Hopefully without having to do a defaultto of a bogus > value, and having a validation failure against that. You can specify a validate

Re: [Puppet-dev] [PATCH/puppet 5/7] (#7629) should identify resources by uniqueness key during prefetching.

2011-05-23 Thread Dan Bode
On Mon, May 23, 2011 at 11:45 AM, Dan Bode wrote: > - this ensures that resources are unique based on > composite namevars. > - I need to review why this is required.. > > Signed-off-by: Dan Bode > --- > Local-branch: issue/master/7629 > lib/puppet/transaction.rb |4 +++- > 1 files changed

[Puppet-dev] [PATCH/puppet 3/3] (#7188) Split mounttype - new provider mountpoint

2011-05-23 Thread Stefan Schulte
Add a provider called mount that uses the output of mount to prefetch current mounted devices and uses mount/umount to perform changes. It may not work on any other System than Linux and even on this platform it is not really well tested so far. Especially prefetching options and the fstype may fa

[Puppet-dev] [PATCH/puppet 2/3] (#7188) Split mounttype - new type mountpoint

2011-05-23 Thread Stefan Schulte
Add a new type called mountpoint. This one should only ensure that a device on a mountpoint is mounted/not mounted. Valid properties are device, fstype and options but they are not required because it's likely that there already is an fstab entry for the described mount. Mountoptions are currentl

[Puppet-dev] feature mounttab against next

2011-05-23 Thread Stefan Schulte
As requested my attempt for a mountpoint type/provider for the splitted mount type. The type should be usable but the provider is probably not and doesnt have any tests yet. One thought about a mountpoint provider in general: How to handle mount options? I we specify options as parameters then w

[Puppet-dev] [PATCH/puppet 1/1] [#3238] Fix ActiveRecord connection leak

2011-05-23 Thread James Turnbull
From: Rein Henrichs ActiveRecord does not release connections back to its connection pool automatically. This patch forces ActiveRecord to release its own connections. Signed-off-by: James Turnbull --- Local-branch: tickets/2.7.x/3238 lib/puppet/rails.rb |2 + lib/

[Puppet-dev] [PATCH/puppet 1/2] (#7300) Add specs for the mount provider

2011-05-23 Thread Stefan Schulte
Add specs to demonstrate that the instances method is currently broken because it does not take the actual mountstate into account. As a result running "puppet resource mount" on the commandline will report every mount that appears in /etc/(v)fstab as unmounted. Signed-off-by: Stefan Schulte ---

[Puppet-dev] [PATCH/puppet 2/2] (#7300) Fix instances method of mount provider

2011-05-23 Thread Stefan Schulte
The instances method now behaves similar to the prefetch method. At first /etc/(v)fstab is parsed to find mounts. After that the mount command is run to update the ensure state from :unmounted to :mounted. The instances method however does not take mounted devices into account that are currently n

[Puppet-dev] ticket 7300 against 2.6.x

2011-05-23 Thread Stefan Schulte
After discussion on redmine http://projects.puppetlabs.com/issues/7300#note-10 here is the previous fix against 2.6.x which does not introduce the change in behaviour: * patch against 2.7.x (the previous one) will show mounts that are specified in /etc/fstab AND mounted devices that do not app

Re: [Puppet-dev] isrequired doesn't do anything in a type?

2011-05-23 Thread Dan Bode
its been like that for at least a year: http://projects.puppetlabs.com/issues/4049 On Mon, May 23, 2011 at 11:53 AM, Jacob Helwig wrote: > So, I'm working on #7188 and thought "hey, it would be great if we had > built-in checks that these required parameters were actually specified". > Especial

[Puppet-dev] isrequired doesn't do anything in a type?

2011-05-23 Thread Jacob Helwig
So, I'm working on #7188 and thought "hey, it would be great if we had built-in checks that these required parameters were actually specified". Especially since the current mount type claims that fstype is required, yet does nothing (other than break things after a successful run) if it's not speci

[Puppet-dev] [PATCH/puppet 1/7] (#7625) should fail explicitly if no title_pattern is matched

2011-05-23 Thread Dan Bode
- Introduction of composite namevars places extra restrictions on resource title format (in order to guarantee uniqueness it should be based on all namevars) - Puppet was not explicitly handling the case where the title is invalid Signed-off-by: Dan Bode --- Local-branch: issue/master/762

[Puppet-dev] [PATCH/puppet 2/7] (#7629) parsedfile should use composite namevar to compare records to the resources that we have specified.

2011-05-23 Thread Dan Bode
- previously, it was only matching based on the name parameter. This caused a few problems. - should not have to specify a name param - it does not make as much sense with composite namevars - for composite namevars, it needs to match records to resources based on all of the namevars.

[Puppet-dev] [PATCH/puppet 4/7] (#7629) provider name should be derived using namevar_join.

2011-05-23 Thread Dan Bode
- it was previously hardcoded to use :name param which does not work for composite namevars. Signed-off-by: Dan Bode --- Local-branch: issue/master/7629 lib/puppet/provider.rb |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/puppet/provider.rb b/lib/puppet/provider

[Puppet-dev] [PATCH/puppet 7/7] (#7629) hash2resource should use namevar_join.

2011-05-23 Thread Dan Bode
For types with composite namevars, hash2resource should use namevar_join to populate tilte with namevar. Signed-off-by: Dan Bode --- Local-branch: issue/master/7629 lib/puppet/type.rb |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/puppet/type.rb b/lib/puppet/t

[Puppet-dev] issue 7629 against master

2011-05-23 Thread Dan Bode
This is an experimental set of patches that I wrote for composite namevars to work with parsedfile and to support purging. This is not ready to be merged, I would just like to get some input on the following: - does this work (for people who have pending composite namevar work) - will this b

[Puppet-dev] [PATCH/puppet 5/7] (#7629) should identify resources by uniqueness key during prefetching.

2011-05-23 Thread Dan Bode
- this ensures that resources are unique based on composite namevars. - I need to review why this is required.. Signed-off-by: Dan Bode --- Local-branch: issue/master/7629 lib/puppet/transaction.rb |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/lib/puppet/transacti

[Puppet-dev] [PATCH/puppet 3/7] (#7629) added namevar_join method to type

2011-05-23 Thread Dan Bode
- for composite namevars to support purging and 'puppet resource' quiery all, it needs to be possible to map from the composite namevars to a single id. - the basic idea is that authors of types need to implement this method if they want to support query all or purging. Signed-off-by: D

[Puppet-dev] [PATCH/puppet 6/7] (#7629) changed name to title since types with composite namevars may not have a :name parmeter.

2011-05-23 Thread Dan Bode
Signed-off-by: Dan Bode --- Local-branch: issue/master/7629 lib/puppet/type.rb |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/lib/puppet/type.rb b/lib/puppet/type.rb index dc4764e..e62a764 100644 --- a/lib/puppet/type.rb +++ b/lib/puppet/type.rb @@ -893,8 +893,7 @@ cl

Re: [Puppet-dev] composite namevars (part 1) - purging

2011-05-23 Thread markus
> Hm, does this work in case I have one keyattribute that is not "name" > (like the fileresource where the keyattribute is "path")? No, but neither does the existing code. :( > If not, here is a second suggestion > > def self.title_join(hash) > # extract all parameters that are keya

Re: [Puppet-dev] composite namevars (part 1) - purging

2011-05-23 Thread Stefan Schulte
On Sun, May 22, 2011 at 05:56:29PM -0700, Dan Bode wrote: > I just finished something very similar: > > > def self.title_join(hash) > "#{hash[:domain]}/#{hash[:type]}/#{hash[:item]}" > end > > where the default case was: > > + def self.title_join(hash) > +case key_attributes.length

[Puppet-dev] [PATCH/mcollective 2/2] 7627 - Missing check when opening classesfile

2011-05-23 Thread R.I.Pienaar
Update changelog and adjust error message to provide some more information to assist with debugging. Write tests for the has_cf_class? method Signed-off-by: R.I.Pienaar --- Local-branch: bug/master/7627 lib/mcollective/util.rb |4 ++-- spec/spec_helper.rb |1 + spec/unit/util_spec.r

[Puppet-dev] [PATCH/mcollective 1/2] 7627 - Missing check when opening classesfile

2011-05-23 Thread R.I.Pienaar
From: Nicolas Szalay Handle exceptions when trying to parse the classes file and log a warning level message. Signed-off-by: R.I.Pienaar --- Local-branch: bug/master/7627 lib/mcollective/util.rb | 14 +- 1 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/mcollecti

[Puppet-dev] [PATCH/mcollective 1/1] 7626 - Application framework should not catch normal exit calls

2011-05-23 Thread R.I.Pienaar
Catch and raise again the SystemExit exception which allows the normal exit method to be used instead. Remove other uses of the exit! method in favor of the exit method Adjust tests accordingly Signed-off-by: R.I.Pienaar --- Local-branch: bug/master/7626 lib/mcollective/application.rb |9 +