[Puppet-dev] [PATCH/facter 1/1] (#5666) windows support for facter/id.rb

2010-12-23 Thread William Van Hevelingen
From: William Van Hevelingen Signed-off-by: William Van Hevelingen --- Local-branch: feature/master/5666 lib/facter/id.rb |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/facter/id.rb b/lib/facter/id.rb index 0a4067d..deddc4a 100644 --- a/lib/facter/id.rb +++ b/lib/

[Puppet-dev] [PATCH/puppet 3/3] (#5660) Changed wrong description for protocol

2010-12-23 Thread Stefan Schulte
I contrast to the description you cannot use the same title for different resources. Thats what title_patterns are for: To use one title to specify all key_attributes. So if one wants to specify a resource with two protocols, the easiest way to this is to just write port { 'telnet:tcp': number =

[Puppet-dev] [PATCH/puppet 1/3] (#5660) New Type to handle /etc/services entries

2010-12-23 Thread Stefan Schulte
This new type "port" handles entries in /etc/services. It uses multiple key_attributes name and protocol, so you are able to add e.g. multiple telnet lines for tcp and udp. Sample usage port { 'telnet': number => '23', protocol=> 'tcp', description => 'Telnet' }

[Puppet-dev] [PATCH/puppet 2/3] (#5660) Parsedfile provider for port

2010-12-23 Thread Stefan Schulte
This provider uses parsedfile to parse entries in /etc/services. Because we use composite keys we have to provide an individual match method to find resources for a single record. Signed-off-by: Stefan Schulte --- Local-branch: feature/next/5660 lib/puppet/provider/port/parsed.rb |

[Puppet-dev]

2010-12-23 Thread Stefan Schulte
I talked about a resourcetype for /etc/services on the list and a resourcetype with name and protoco as a composite key seems be be the best way to implement it. This patch requires: #5605 #5661 #5662 I have no idea if this works on Mac OS X because I just tested it with a standard linux /etc/ser

[Puppet-dev] [PATCH/puppet 1/1] (#5605) Prefetch doesnt work with composite keys

2010-12-23 Thread Stefan Schulte
The uniqueness_key method of a type or resource object should return a key that can be used to identify this resource. In fact puppet seldomly uses this method and instead uses resource[:name] as an identifier. While this is totally fine for resourcetypes with a single key_attribute (and resource[

[Puppet-dev] [PATCH/puppet 2/2] (#5662) Fixed tests that didnt stub key_attributes

2010-12-23 Thread Stefan Schulte
The parsedfile provider calls the method key_attributes of the resource class to decide what resourceparameters must be put in the property_hash. Tests that uses fake resources and only stub resource[:name] must also stub resource.class.key_attributes Signed-off-by: Stefan Schulte --- spec/unit/

[Puppet-dev] [PATCH/puppet 1/2] (#5662) Parsedfile doesnt work with mult keyattr

2010-12-23 Thread Stefan Schulte
When one wants to use the parsedfile provider for a type with more than one key_attribute (e.g. a type for entries in /etc/services with name and protocol as key_attributes) the provider will not store all key_attributes in property_hash and not all keyattributes will be visible in the to_line func

[Puppet-dev] [PATCH/puppet 1/1] (#5661) Creating types dont work with >1 namevar

2010-12-23 Thread Stefan Schulte
The methods [] and []= of type.rb are handling :name in a special way. When someone wants to access resource[:name] puppet tries to replace :name with the name_var. If the type has more than one key_attribute name_var is always returning false so we'll get the error Resource type does not suppo

Re: [Puppet-dev] Prefetch after every change

2010-12-23 Thread Stefan Schulte
On Wed, Dec 22, 2010 at 09:55:27AM -0800, Luke Kanies wrote: > It's a bit more complicated for packages, because the dependency trees are so > large, but is it possible to pull the dependency graph of these services? > > IMO, that's the "right" long-term direction: importing external dependency

Re: [Puppet-dev] Possibly able to cut Puppet run time by half?

2010-12-23 Thread Trevor Vaughan
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brice, Thanks for the feedback, this is good stuff! > > That's more or less what rsync does. For sourced files we could even use > HTTP If-Modified-Since and/or If-None-Match to perform the check (and > thus the check would be done server side). Ye

Re: [Puppet-dev] Possibly able to cut Puppet run time by half?

2010-12-23 Thread Brice Figureau
On 17/12/10 16:44, Trevor Vaughan wrote: > I've been looking at the usage of MD5 checksums by Puppet and I think > that there may be room for quite a bit of optimization. I do agree. > The clients seem to compute the MD5 checksum of all files and in > catalog content every time they compare two f

[Puppet-dev] Managing puppet mount resources in AIX

2010-12-23 Thread Héctor Rivas Gándara
Hello, I am working on the mount provider for aix. I implemented it using the native commands from AIX to do so: crfs, rmfs, chfs, lsfs... In AIX the recomended and supported way to manage mount points is by using these commands, and not to modify the fstab equivalent, /etc/filesystems. The prob