Re: [Puppet-dev] Autorequiring parent directories to the home directory in user resources

2015-03-03 Thread 'Stefan Schulte' via Puppet Developers
On 03.03.2015 21:31, John Bollinger wrote: > > > On Tuesday, March 3, 2015 at 1:35:28 PM UTC-6, Stefan Schulte wrote: > > [..] > maybe I am missing something here but > > a) a resource relationship that is autorequired can be overwritten > with expli

Re: [Puppet-dev] Autorequiring parent directories to the home directory in user resources

2015-03-03 Thread 'Stefan Schulte' via Puppet Developers
Hello On 02.03.2015 22:21, John Bollinger wrote: > > *Disadvantages to symlinks autorequiring their targets*: > > 1. Many unneeded resource relationships are generated. > 2. Under some circumstances, Puppet will needlessly create > relationship cycles. > 3. Although the autorequirement coul

Re: [Puppet-dev] flush after all resources are synced

2014-03-06 Thread Stefan Schulte
Hi Erik, On 06.03.2014 09:28, Erik Dalén wrote: > Isn't this what was done in http://projects.puppetlabs.com/issues/3946 ? > So should be available in 3.4.0+ > > Was discussed in this mail > thread: https://groups.google.com/forum/#!topic/puppet-dev/Iqs5jEGfu_0 thanks for finding the ticket and

[Puppet-dev] flush after all resources are synced

2014-03-05 Thread Stefan Schulte
Hello, is there a way for a custom provider to define a method that flushes resources afer *all* resources are processed? I have a custom type to manage configuration aspects of a specific application and I need to restart that application for configuration changes to take effect. If I define a f

Re: [Puppet-dev] Idiomatic Puppet way to get global context in a instances method from a custom provider

2014-02-18 Thread Stefan Schulte
On 17.02.2014 22:53, bert hajee wrote: > L.S, > > What is the idiomatic Puppet way to get global context in a instances > method for a custom provider? > > I’m building a custom type and provider for some Oracle items. Oracle > can have multiple databases running on a system. So I need a way to t

Re: [Puppet-dev] Committer question: In which branch should new facts go

2014-02-18 Thread Stefan Schulte
Hi Adrien, On 18.02.2014 18:50, Adrien Thebo wrote:> I should have responded sooner to this thread, but now that the horse > has clearly left the barn I might as well shut the gate. > > We've been working on getting Facter 2 ready for release for about two > months now, and right now we're right

Re: [Puppet-dev] Committer question: In which branch should new facts go

2014-02-16 Thread Stefan Schulte
On 16.02.2014 16:43, Kylo Ginsberg wrote: > Please target the 'facter-2' branch. See this puppet-dev thread for some > background: > > https://groups.google.com/forum/#!msg/puppet-dev/Q24GLe6s1_4/hPwHgvVhnpIJ > > > Now https://github.com/puppetlabs/facter/blob/master/COMMITTERS.md talks > >

[Puppet-dev] Committer question: In which branch should new facts go

2014-02-16 Thread Stefan Schulte
Hello, I haven't merged any code since the new semver scheme and I am currently reviewing https://github.com/puppetlabs/facter/pull/560 which introduces a new uuid fact for blockdevices. My question is now: In which branch should this code be merged? >From my understanding it should go in the nex

Re: [Puppet-dev] rspec, type, provider ...where to put which code

2013-11-21 Thread Stefan Schulte
On 19.11.2013 11:09, Johan De Wit wrote: > Hi, > > I should have payed much more attention in the programming lessons, or > maybe it is because I took them too long ago ... > > I'm trying to write a custom type, and I started with writing the rspec > first, then the type definition, and somewhere

Re: [Puppet-dev] Question about COMMITTERS.md

2013-05-12 Thread Stefan Schulte
On Thu, 9 May 2013 22:06:04 +0200 Stefan Schulte wrote: > Hi, > > I'm currently reading COMMITTERS.md to learn the new commit process > with the new "stable" and "master" branches and need some help: > > First I picked a simple pull request > https

[Puppet-dev] Question about COMMITTERS.md

2013-05-09 Thread Stefan Schulte
Hi, I'm currently reading COMMITTERS.md to learn the new commit process with the new "stable" and "master" branches and need some help: First I picked a simple pull request https://github.com/puppetlabs/puppet/pull/1636 that I think should go in the stable branch (at leasts it's no backward incom

[Puppet-dev] Title vs namevar

2013-04-29 Thread Stefan Schulte
I'm currently trying to resolve issues around composite namevars but there is one thing I do not understand: 1) It is common practice to ommit the namevar when declaring a resource in a puppet manifest, because it is implicitly set by the title so in a lot of cases resource[:title] equals resource

Re: [Puppet-dev] Composite namevars and self.prefetch

2013-04-25 Thread Stefan Schulte
On Wed, 24 Apr 2013 23:05:13 -0700 (PDT) Chuck Dand wrote: > I've been trying to implement a custom type/provider in which I'd > like to use composite namevars. From what I can find support for > composite namevars when using self.prefetch in the provider is a > little bit rough at the current ti

Re: [Puppet-dev] Kill facter 2.x branch and release 1.7 soon

2013-02-13 Thread Stefan Schulte
On Wed, 13 Feb 2013 14:59:20 -0800 Jeff McCune wrote: > I've also updated the CONTRIBUTING and COMMITTERS document in Facter. > Please see https://github.com/puppetlabs/facter/pull/395 Ah ok, thanks for the update ;-) -Stefan -- You received this message because you are subscribed to the Goo

Re: [Puppet-dev] Kill facter 2.x branch and release 1.7 soon

2013-02-13 Thread Stefan Schulte
On Wed, 6 Feb 2013 14:35:42 -0800 Jeff McCune wrote: > I'd like to take a quick moment and let everyone know that we're > planning on deleting the 2.x branch in the facter repository. The > master branch contains all of the same functionality and will become > the next major version of Facter, s

Re: [Puppet-dev] Custom (ruby) type in module not found - "Invalid resource"

2012-10-08 Thread Stefan Schulte
On Mon, Oct 08, 2012 at 07:56:42AM -0700, Axel B wrote: > Hello readers, > > [...] > err: Could not retrieve catalog from remote server: Error 400 on SERVER: > Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid > resource type reposync at /etc/puppet/manifests/site.pp:98 on

Re: [Puppet Users] Re: [Puppet-dev] Do you rely on 'param=>undef' being equal to '(nothing)'?

2012-09-18 Thread Stefan Schulte
On Tue, Sep 18, 2012 at 05:27:07PM -0700, Eric Sorenson wrote: > On Friday, September 14, 2012 3:36:20 PM UTC-7, Stefan Schulte wrote: > > > > > > I use this a lot to be able to have an optional parameter in a parent > > class that is passed to an included c

Re: [Puppet-dev] Do you rely on 'param=>undef' being equal to '(nothing)'?

2012-09-14 Thread Stefan Schulte
On Fri, Sep 14, 2012 at 11:31:08AM -0700, Eric Sorenson wrote: > Hi, there's an issue that came up recently in the 3.0RCs -- Big thanks to > Erik Dalén for reporting it in #16221 -- that involves a behaviour change to > part of the DSL. In a nutshell, this code: > [..]> > class toplevel ( >

Re: [Puppet-dev] More fun with composite namevars.

2012-09-10 Thread Stefan Schulte
On Mon, Sep 10, 2012 at 12:23:30PM -0400, Trevor Vaughan wrote: > Thanks Stefan, > > I toyed around with that idea a bit but, at this point, the code is SO > much clearer/cleaner in the 'initialize' define that I think it will > become my preferred method of doing this type of thing and I couldn't

Re: [Puppet-dev] More fun with composite namevars.

2012-09-10 Thread Stefan Schulte
On Mon, Sep 10, 2012 at 10:07:14AM -0400, Trevor Vaughan wrote: > All, > > Is it possible to use default values in a composite namevar? > > I'm having a heck of a time making it work properly. > > I tried: > > def self.title_patterns > [ > [ > /^(.*)$/, >[ >

Re: [Puppet-dev] master first?

2012-08-13 Thread Stefan Schulte
On Mon, Aug 13, 2012 at 08:59:52AM -0700, Andy Parker wrote: > On Sat, Aug 11, 2012 at 8:03 PM, Stefan Schulte > wrote: > > How does the situation now looks for someone who wants to merge code? > > Let's say there is a request to pull ticket/master/foo into master. If I &

Re: [Puppet-dev] master first?

2012-08-11 Thread Stefan Schulte
On Wed, Aug 01, 2012 at 03:46:09PM -0700, Andy Parker wrote: > Ok, so based on what has been talked about here and my frustration > I've put together another change for > the CONTRIBUTING.md. > > https://github.com/puppetlabs/puppet/pull/995 > > I took out a lot of the verbiage and cut it down to

Re: [Puppet-dev] Re: Can custom functions accept arrays as parameters?

2012-07-26 Thread Stefan Schulte
On Tue, Jul 24, 2012 at 10:37:47PM +0200, Brice Figureau wrote: > On 24/07/12 22:30, Matthew Probst wrote: > > Actually, I had it _that_ way before I tried the ways I posted > > previously, in imitation of the exact same code. But, to make sure I > > wasn't just messing it up, I went ahead and tri

Re: [Puppet-dev] Accessing Puppet::Property::List elements

2012-07-18 Thread Stefan Schulte
On Mon, Jul 16, 2012 at 11:19:52AM +0100, Dominic Cleal wrote: > Hello, > > I'm currently implementing a new provider for the mounttab type (the one > distributed in the puppetlabs/mount_providers module) in the > augeasproviders[1] project. > > From the provider I need to access the list of opti

Re: [Puppet-dev] 'Service' type performance issues.

2012-05-21 Thread Stefan Schulte
On Thu, May 17, 2012 at 05:04:29PM -0400, Trevor Vaughan wrote: > Sure > > For the following manifest: > > service { 'haldaemon': > ensure => 'running', > enable => 'true', > hasrestart => 'true', > hasstatus => 'true' > } > > The result is: > > info: /Stage[main]/Service[h

Re: [Puppet-dev] Puppet, ActiveRecord, file handles, and forking...

2012-01-13 Thread Stefan Schulte
On Fri, Jan 13, 2012 at 09:46:46AM -0800, Daniel Pittman wrote: > G'day. > > At the moment we have some parts of the Puppet code that have a > lurking bug around ActiveRecord: when we fork, if an AR database > connection is open, we will break that connection in the parent when > the child exits.

Re: [Puppet-dev] ActiveRecord forking issues?

2012-01-13 Thread Stefan Schulte
On Fri, Oct 21, 2011 at 06:39:04PM +0200, Stefan Schulte wrote: > Hi, > > After I'd switched from no reporting to tagmail I got about 20 messages a > day with failed puppet runs and messages like > > Mysql2::Error: Lost connection to MySQL server during query: >

Re: [Puppet-dev] [PATCH/puppet 04/21] Significantly cleaning Puppet::Type attribute mgmt

2011-10-22 Thread Stefan Schulte
Hi Luke, I'm currently reviewing the patchset. One general question: Is this targeted to a specific release or ready to merge? From what I've read so far it should not break custom types/providers but the changes are important to know if you are writing tests for your custom types/providers (like

[Puppet-dev] ActiveRecord forking issues?

2011-10-21 Thread Stefan Schulte
Hi, After I'd switched from no reporting to tagmail I got about 20 messages a day with failed puppet runs and messages like Mysql2::Error: Lost connection to MySQL server during query: SELECT `fact_names`.* FROM `fact_names` WHERE `fact_names`.`name` = 'kernelrelease' LIMIT 1 I k

Re: [Puppet-dev] Re: local volumes for facter #4115

2011-10-07 Thread Stefan Schulte
On Fri, Oct 07, 2011 at 03:24:54AM -0700, Krzysztof Wilczynski wrote: > Hello, > > [...] > > +1 > > > > I would also recommend changing the output format a little so it is a > > comma-separated list (which follows what other facts usually do). > > > > Current output: > > > > local_volumes => / /de

Re: [Puppet-dev] [PATCH] (#4135) Update pluginsync to only load ruby files.

2011-09-15 Thread Stefan Schulte
On Sat, Jul 16, 2011 at 09:36:46AM -0700, Nan Liu wrote: > Pluginsync allows replication of all files, but we should only load > ruby files available in the pluginsync directory. For example, > currently pluginsync will attempt and fail to load puppet-module > generated readme files. This change re

Re: [Puppet-dev] (puppetlabs/facter) New pull request: Add VirtualBox detection for Darwin

2011-09-13 Thread Stefan Schulte
On Tue, Sep 13, 2011 at 01:15:12PM -0700, wearetherob...@puppetlabs.com wrote: > diff --git a/lib/facter/virtual.rb b/lib/facter/virtual.rb > index a583995..3cb5b42 100644 > --- a/lib/facter/virtual.rb > +++ b/lib/facter/virtual.rb > @@ -16,12 +16,11 @@ > # contents of files in there. > # If

Re: [Puppet-dev] (puppetlabs/puppet) New pull request: Ticket/2.7.x/8410

2011-08-23 Thread Stefan Schulte
On Mon, Aug 22, 2011 at 06:00:05PM -0700, wearetherob...@puppetlabs.com wrote: > > > > > Greetings! > > Please review the pull request #54: href="https://github.com/puppetlabs/puppet/pull/54"; > title="Ticket/2.7.x/8410">Ticket/2.7.x/8410 opened by (nicklewis) > > > Some

[Puppet-dev] Two providers managing the same file. Possible?

2011-08-22 Thread Stefan Schulte
Hi, managing multiple swap devices is currently not possible in puppet because the mointpoint has to be unique. My question is: Is it possible to create a second type called swap and a parsedfile provider (that may also do swapoff swapon an so on) that manages the same /etc/(v)fstab file? I gues

[Puppet-dev] [PATCH/puppet 1/4] (#7986) Cleanup pkg provider #1

2011-07-14 Thread Stefan Schulte
The testing of hash[:error] is apparently dead code because it is never set to anything different than "ok". Remove the hashkey :missing because it is never used later. Signed-off-by: Stefan Schulte --- Local-branch: ticket/2.7.x/7986 lib/puppet/provider/package/pkg.rb

[Puppet-dev] [PATCH/puppet 4/4] (#7986) Improve specs for pkg provider

2011-07-14 Thread Stefan Schulte
Add fixtures to test correct parsing on different packages (preferred publisher / not preferred publisher) Signed-off-by: Stefan Schulte --- Local-branch: ticket/2.7.x/7986 spec/fixtures/unit/provider/package/pkg/pkg_list |7 ++ .../unit/provider/package/pkg/pkg_list_dummy |1

[Puppet-dev] [PATCH/puppet 2/4] (#7986) Cleanup pkg provider #2

2011-07-14 Thread Stefan Schulte
match 'pkg list' line foo Signed-off-by: Stefan Schulte --- Local-branch: ticket/2.7.x/7986 lib/puppet/provider/package/pkg.rb |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/puppet/provider/package/pkg.rb b/lib/puppet/provider/package/pkg.rb index 31f

[Puppet-dev] [PATCH/puppet 3/4] (#7986) Modify pkg provider to handle publisher

2011-07-14 Thread Stefan Schulte
The methods :instances, :query and :latest did not handle pkg list -H lines correctly when the publisher of a package is not the preferred publisher. Modify the parsing method to handle lines with publisher correctly Signed-off-by: Stefan Schulte --- Local-branch: ticket/2.7.x/7986 lib/puppet

[Puppet-dev] pkg provider cannot handle publisher

2011-07-14 Thread Stefan Schulte
As mentioned here https://projects.puppetlabs.com/issues/7986#note-8 the pkg provider cannot handle the output of "pkg list -H" when an installed package is not from the preferred publisher. This patchset uses a slightly different regex to parse the output. It is worth mentioning that I only test

Re: [Puppet-dev] Custom type only works via 'puppet apply'

2011-07-01 Thread Stefan Schulte
On Fri, Jul 01, 2011 at 06:36:24AM -0700, Chetan wrote: > Hi, > > I've written a custom type which works just fine when I run it > manually on some host via 'puppet apply' but via 'puppet agent' (using > puppetmaster) it doesn't seem to get executed at all. I've put debug > messages in various par

[Puppet-dev] [PATCH/puppet 1/2] (#8193) Support new keytypes for ssh_authorized_key

2011-07-01 Thread Stefan Schulte
: Stefan Schulte --- Local-branch: ticket/2.7.x/8193 lib/puppet/type/ssh_authorized_key.rb |7 +++ spec/unit/type/ssh_authorized_key_spec.rb | 19 --- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/lib/puppet/type/ssh_authorized_key.rb b/lib/puppet/type

[Puppet-dev] [PATCH/puppet 2/2] (#8193) Support new keytypes for sshkey

2011-07-01 Thread Stefan Schulte
: Stefan Schulte --- Local-branch: ticket/2.7.x/8193 lib/puppet/type/sshkey.rb |8 spec/unit/type/sshkey_spec.rb | 20 +--- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/lib/puppet/type/sshkey.rb b/lib/puppet/type/sshkey.rb index 59a1a12..41b3dde

[Puppet-dev] ssh_authorized_keys should support new key types

2011-07-01 Thread Stefan Schulte
Stig Sandbeck Mathisen reported: SSH now supports additional key types. From the sshd man page (openssh version 5.8p1 on ubuntu): For protocol version 2 the keytype is “ecdsa-sha2-nistp256”, “ecdsa-sha2-nistp384”, “ecdsa-sha2-nistp521”, “ssh-dss” or “ssh-rsa”.

Re: [Puppet-dev] Re: prefetching in custom providers

2011-06-24 Thread Stefan Schulte
On Fri, Jun 24, 2011 at 03:00:20PM -0700, Luke Kanies wrote: > On Jun 23, 2011, at 11:08 AM, Carl Caum wrote: > > > > > On Jun 22, 2011, at 10:55 PM, Luke Kanies wrote: > > > >> On Jun 22, 2011, at 6:05 PM, Carl Caum wrote: > >> > >>> I'm not clear at all on how to do prefetching in custom prov

[Puppet-dev] [PATCH/puppet 2/2] (#7114) Fix value validation on options

2011-06-21 Thread Stefan Schulte
Support single options that legally include a comma like "from=host1,host2". We now basically allow either "word" or "key=value" as options. That's also what the parsedfile provider currently supports when parsing options. Signed-off-by: Stefan Schulte --- L

[Puppet-dev] ticket 7114fixup against 2.7.x

2011-06-21 Thread Stefan Schulte
The patch for #7114 (already merged in 2.7.x) included stricter value validation for the options property of the ssh_authorized_key type. As it turns out it now rejects valid options. * first patch includes tests to show the misbehaviour * second patch fixes the error -- You received this messag

[Puppet-dev] [PATCH/puppet 1/2] (#7114) Add tests for option property

2011-06-21 Thread Stefan Schulte
rom="host1,host2". Add tests that demonstrate that the new value validation on options is to strict. Signed-off-by: Stefan Schulte --- Local-branch: ticket/2.7.x/7114fixup .../provider/ssh_authorized_key_spec.rb|6 +++--- spec/unit/type/ssh_authorized_key_spec.rb

Re: [Puppet-dev] [PATCH/puppet 1/4] (#7114) Improve value validation for authorized_key

2011-06-15 Thread Stefan Schulte
It looks like I was to restrictive here, see comments below On Sat, Apr 23, 2011 at 11:16:34AM +0200, Stefan Schulte wrote: > Whitespaces in any of the properties can lead to incorrect entries in > the authorized_keys file. > > Signed-off-by: Stefan Schulte > --- >

Re: [Puppet-dev] State, provider & type

2011-06-02 Thread Stefan Schulte
On Tue, May 24, 2011 at 02:54:37PM +0200, Florent Paillot wrote: > Hi Stefan, > > Le 21/05/2011 14:42, Stefan Schulte a écrit : > > On Fri, May 20, 2011 at 07:00:38PM +0200, Florent Paillot wrote: > >> Hi all, > >> > >> > >> I try to code

Re: [Puppet-dev] issue 7629 against master

2011-05-24 Thread Stefan Schulte
On Tue, May 24, 2011 at 12:12:20AM +0200, Stefan Schulte 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 some other name that :name and see if it resolves t

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 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] 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

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

2011-05-23 Thread Stefan Schulte
fail. Signed-off-by: Stefan Schulte --- Local-branch: feature/next/mounttab lib/puppet/provider/mountpoint/mount.rb | 135 +++ 1 files changed, 135 insertions(+), 0 deletions(-) create mode 100755 lib/puppet/provider/mountpoint/mount.rb diff --git a/lib/puppet

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

2011-05-23 Thread Stefan Schulte
t you havent specified explicitly. E.g mounting with `mount -o defaults` or without any option will become 'rw' when running `mount` afterwards Signed-off-by: Stefan Schulte --- Local-branch: feature/next/mounttab lib/puppet/type/mountpoint.rb | 124 +

[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/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: Stef

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

2011-05-23 Thread Stefan Schulte
not present in /etc/fstab because these mounts would also be listed when running »puppet resource mount« which is not desired Signed-off-by: Stefan Schulte --- lib/puppet/provider/mount/parsed.rb | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/lib/puppet

[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] 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

Re: [Puppet-dev] State, provider & type

2011-05-21 Thread Stefan Schulte
On Fri, May 20, 2011 at 07:00:38PM +0200, Florent Paillot wrote: > Hi all, > > > I try to code a Puppet type that act like this : > > class1 { > > mytype { "a name": > command => "command = YY" > } > } > > class2 { > > mytype { "a name": > command => "command = XX", > } > } > Yo

Re: [Puppet-dev] [PATCH/puppet 2/2] Prevent spec failure caused by network device mock leak

2011-05-07 Thread Stefan Schulte
On Sat, May 07, 2011 at 06:47:30PM +0200, Brice Figureau wrote: > We were leaking some mocks in the network device singleton from > tests to tests. > > Signed-off-by: Brice Figureau > --- > lib/puppet/util/network_device.rb |5 + > spec/unit/util/network_device_spec.rb |4 >

[Puppet-dev] [PATCH/puppet 1/1] (#7188) Add a mounttab type and provider

2011-05-04 Thread Stefan Schulte
but also true/false (and yes/no will still be put in vfstab) * no property supports whitespace so we wont write currupt fstab entries to disk (#6409) Signed-off-by: Stefan Schulte --- Local-branch: feature/2.7.x/mounttab lib/puppet/provider/mounttab/parsed.rb | 36 lib/pup

[Puppet-dev] [PATCH/puppet 1/1] (#7299) rake spec should work when net/ssh is absent

2011-05-01 Thread Stefan Schulte
Signed-off-by: Stefan Schulte --- Local-branch: ticket/2.7.x/7299 .../unit/util/network_device/transport/ssh_spec.rb |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/spec/unit/util/network_device/transport/ssh_spec.rb b/spec/unit/util/network_device/transport

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

2011-05-01 Thread Stefan Schulte
The instance method now behaves like the prefetch method: After parsing /etc/(v)fstab run mount to update the ensure state from either :unmounted to :mounted and from :absent to :ghost Signed-off-by: Stefan Schulte --- Local-branch: ticket/2.7.x/7300 lib/puppet/provider/mount/parsed.rb | 18

[Puppet-dev] Instances method of mountprovider is broken

2011-05-01 Thread Stefan Schulte
Running »puppet resource mount« always reports :unmounted because the instances method never takes the actual mountstate into account. The bug was introduced while fixing #4914 (probably 9f40608 because the retrieve method of the mounttype changed) The first patch shows the actual misbehaviour. T

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

2011-05-01 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: Stef

[Puppet-dev] [PATCH/puppet 4/4] (#7114) Target returns correct value

2011-04-23 Thread Stefan Schulte
Fix the ssh_authorized_key parsedfile provider to return the current target value instead of the should value. Without this change puppet always thinks that the target property is in sync and thus will never move one key to the correct file. Signed-off-by: Stefan Schulte --- lib/puppet

[Puppet-dev] [PATCH/puppet 1/4] (#7114) Improve value validation for authorized_key

2011-04-23 Thread Stefan Schulte
Whitespaces in any of the properties can lead to incorrect entries in the authorized_keys file. Signed-off-by: Stefan Schulte --- lib/puppet/type/ssh_authorized_key.rb | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/lib/puppet/type/ssh_authorized_key.rb b

[Puppet-dev] [PATCH/puppet 3/4] (#7114) Add integration tests for authorized_key

2011-04-23 Thread Stefan Schulte
Add tests to show the issue that one key is not moved from one keyfile to another keyfile if target is not in sync. Signed-off-by: Stefan Schulte --- .../provider/ssh_authorized_key_spec.rb| 207 1 files changed, 207 insertions(+), 0 deletions(-) create mode

[Puppet-dev] ssh_authorized_key not moving key from one target to another

2011-04-23 Thread Stefan Schulte
As described in #7114 when the user specifies e.g. ssh_authorized_key { 'myuser': type => rsa, key => '...', user => 'myuser', target => '/here', ensure => present, } and the key is already present in someone else's keyfile, puppet will not move the key to

[Puppet-dev] [PATCH/puppet 2/4] (#7114) Improve unit tests for ssh_authorized_key

2011-04-23 Thread Stefan Schulte
Add tests to check if the type supports valid values for all the properties. Also check if the type rejects values that are invalid. Signed-off-by: Stefan Schulte --- spec/unit/type/ssh_authorized_key_spec.rb | 249 + 1 files changed, 179 insertions(+), 70 deletions

Re: [Puppet-dev] rspec - getting puppet output

2011-04-17 Thread Stefan Schulte
On Sun, Apr 17, 2011 at 11:07:14PM +0200, Brice Figureau wrote: > On 17/04/11 22:15, Stefan Schulte wrote: > > I'm currently writing an integration test for ssh_authorized_key that > > basically does the following > > > > - write a tempfile with a few dummy lines &

[Puppet-dev] rspec - getting puppet output

2011-04-17 Thread Stefan Schulte
Hi, I'm currently writing an integration test for ssh_authorized_key that basically does the following - write a tempfile with a few dummy lines - apply a catalog with one or more resources - check the tempfile again Now I have a failing test and I dont know why it failed. Is there a way to see

Re: [Puppet-dev] ANNOUNCE: Puppet 2.6.8rc1 available!

2011-04-14 Thread Stefan Schulte
Any chance to address #6845 in this release (patch already sent to puppet-dev)? The mountprovider is currently not working at all on Solaris (the title »mount tmpfs on Solaris fail« is misleading). -Stefan On Wed, Apr 13, 2011 at 05:57:38PM -0700, Matt Robinson wrote: > This release addresses iss

Re: [Puppet-dev] [PATCH/puppet 1/1] (#4835) Fixes spurious changes when managing group membership on OS X

2011-04-13 Thread Stefan Schulte
On Wed, Apr 13, 2011 at 03:46:29PM -0700, Nigel Kersten wrote: > On Wed, Apr 13, 2011 at 3:41 PM, Stefan Schulte > wrote: > > On Wed, Apr 13, 2011 at 10:50:58AM -0700, Nigel Kersten wrote: > >> On Wed, Apr 13, 2011 at 2:41 AM, Stefan Schulte > >> wrote: > >&g

Re: [Puppet-dev] [PATCH/puppet 1/1] (#4835) Fixes spurious changes when managing group membership on OS X

2011-04-13 Thread Stefan Schulte
On Wed, Apr 13, 2011 at 10:50:58AM -0700, Nigel Kersten wrote: > On Wed, Apr 13, 2011 at 2:41 AM, Stefan Schulte > wrote: > > On Tue, Apr 12, 2011 at 07:32:49PM -0700, Nigel Kersten wrote: > >>   Unless you happened to have members added to a group in exactly the > >>

Re: [Puppet-dev] [PATCH/puppet 1/1] (#4835) Fixes spurious changes when managing group membership on OS X

2011-04-13 Thread Stefan Schulte
On Tue, Apr 12, 2011 at 07:32:49PM -0700, Nigel Kersten wrote: > Unless you happened to have members added to a group in exactly the > same order as they appear in your puppet manifests, Puppet considered > the 'is' and 'should' values to be out of sync due to ordering differences > between the a

Re: [Puppet-dev] Wrong spec but passes anyways?!

2011-04-12 Thread Stefan Schulte
On Tue, Apr 12, 2011 at 05:38:54AM -0700, Luke Kanies wrote: > On Apr 12, 2011, at 3:24 AM, Stefan Schulte > wrote: > > > Hi, > > > > I'm currrently looking at the specs for the ssh_authorized_key provider. > > There are two tests that give me a head

[Puppet-dev] Wrong spec but passes anyways?!

2011-04-12 Thread Stefan Schulte
Hi, I'm currrently looking at the specs for the ssh_authorized_key provider. There are two tests that give me a headache: it "should create the directory if it doesn't exist" do File.stubs(:exist?).with(@dir).returns false Dir.expects(:mkdir).with(@dir,0700) @provider.flush

[Puppet-dev] [PATCH/puppet 2/2] (#5660) Add integration tests for port provider

2011-04-09 Thread Stefan Schulte
that is not true (yet) puppet has problems whenever it parses /etc/services and port name is not unique (e.g. telnet/tcp and telnet/udp should be managed or do appear in the file). Signed-off-by: Stefan Schulte --- Local-branch: feature/next/5660 spec/integration/provider/port_spec.rb | 286

[Puppet-dev] Next interation

2011-04-09 Thread Stefan Schulte
Here is the next iteration of my patches. All the previous commits are now just one single commit. I hope I corrected all the spelling errors in the type and provider code. I now also use the two arguments form of raise_error. That was a great tip because it showed a few bugs in validate methods

[Puppet-dev] Run specs on Solaris with 2.6.7

2011-04-01 Thread Stefan Schulte
Can someone please run rspec -c --format s spec/unit/provider/mount/parsed_spec.rb on a Solaris machine against puppet 2.6.7? John Warburton reported a serious bug #6845 where puppet parses /etc/vfstab on Solaris like an /etc/fstab file. This may also destroy your whole file since /etc/fstab

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

2011-03-29 Thread Stefan Schulte
On Mon, Mar 28, 2011 at 02:12:48PM -0700, Jacob Helwig wrote: > On Tue, 22 Mar 2011 23:35:10 +0100, Stefan Schulte wrote: > [...] > The original version also allowed 'ddp' (even though it wasn't > documented). Should this version allow it, too? I just want to

[Puppet-dev] [PATCH/puppet 1/1] (#6845) Mount writes incorrect vfstab entries

2011-03-25 Thread Stefan Schulte
Facter[:operatingsystem] will not retrieve the operatingsystem as a string so puppet will always write fstab entries. Signed-off-by: Stefan Schulte --- lib/puppet/provider/mount/parsed.rb |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/puppet/provider/mount

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

2011-03-22 Thread Stefan Schulte
'tcp', description => 'Telnet' } Because the type makes use of the title_patterns function this can also be written as port { 'telnet/tcp': number => '23', description => 'Telnet' } This type only supports t

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

2011-03-22 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/5660N lib/puppet/provider/port/parsed.rb

[Puppet-dev] Rebased on current next

2011-03-22 Thread Stefan Schulte
The tests now work - The provider-spec for the port type now uses the »all_parsedfile_providers« helper to test correct file parsing. - add a validate function to satisfy a failing test - improve documentation of the type (including your corrections) - changed separator in the title_pattern from

Re: [Puppet-dev] (#5660) Puppet should handle port entries in /etc/services with a native type

2011-03-22 Thread Stefan Schulte
On Mon, Mar 21, 2011 at 03:42:33PM -0700, Jacob Helwig wrote: > On Fri, 24 Dec 2010 01:04:12 +0100, Stefan Schulte wrote: > > > > 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 >

Re: [Puppet-dev] [PATCH/puppet 1/1] Fix #5610: Prevent unnecessary RAL lookups

2011-03-20 Thread Stefan Schulte
On Sun, Mar 20, 2011 at 08:06:56AM -0700, Jesse A Wolfe wrote: > > > > > > Is there a specific reason why uniqueness_key should be a SORTED list of > > keyattributes? If we do not sort them they appear in the array in the > > same order as the params were defined in the type definition (so the > >

Re: [Puppet-dev] mount provider discussion

2011-03-19 Thread Stefan Schulte
On Fri, Feb 25, 2011 at 02:40:25PM -0800, Paul Berry wrote: > On Fri, Feb 25, 2011 at 2:06 PM, Stefan Schulte < > stefan.schu...@taunusstein.net> wrote: > > > > > I'm not really satisfied with the mount provider and I tried to explain > > that in »Refactori

Re: [Puppet-dev] [PATCH/puppet 1/1] Fix #5610: Prevent unnecessary RAL lookups

2011-03-16 Thread Stefan Schulte
On Tue, Mar 15, 2011 at 05:50:42PM -0700, Jesse Wolfe wrote: > [...] >def uniqueness_key > -to_resource.uniqueness_key > +self.class.key_attributes.sort_by { |attribute_name| attribute_name.to_s > }.map{ |attribute_name| self[attribute_name] } >end > > [...] > > + describe "when

[Puppet-dev] OT: Puppet Camp Dates

2011-03-13 Thread Stefan Schulte
Hi, according to several sources (e.g [1] and [2]) Puppet Camp Europe 2011 will be from April 28 to April 29. According to [3] (puppetlabs.com -> Services -> Events -> Puppetcamp) however, the enddate is April 30. I guess the last one is incorrect? -Stefan [1] http://puppetcamp-eu-2011.eventbri

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

Re: [Puppet-dev] Composite namevar

2011-03-04 Thread Stefan Schulte
On Fri, Mar 04, 2011 at 05:08:05PM -0500, Trevor Vaughan wrote: > Thanks for the example! That was exactly what I was looking for. > > Also, thanks for the bug list since I would have run into them. > > Is title_patterns an override that must be called? What's the > difference between this and ju

Re: [Puppet-dev] Composite namevar

2011-03-04 Thread Stefan Schulte
On Fri, Mar 04, 2011 at 01:46:54PM -0500, Trevor Vaughan wrote: > Is it possible to create a composite namevar when creating a custom type? > > Say you have an /etc/passwd like file that could exist at multiple locations. > > The actual unique set of variables is the target path of the file > com

[Puppet-dev] Getting errors when sending to the list

2011-02-28 Thread Stefan Schulte
For each message I'm sending to puppet-dev or puppet-users I get a mail in my inbox (since 26th Feb): The message that you sent was undeliverable to the following: Mdelves (User account is expired) The sender is mailer-dae...@mthelen7.ballarat.edu.au. Do also have this problem? -Stef

Re: [Puppet-dev] mount provider discussion

2011-02-25 Thread Stefan Schulte
On Fri, Feb 25, 2011 at 02:40:25PM -0800, Paul Berry wrote: > > Yes, my intention was that we overwrite flush in a way that does umount > before. In fact, the order of operations I had in mind was: > 1. umount anything that needs unmounting (this includes both resources that > have { ensure => un

Re: [Puppet-dev]

2011-02-25 Thread Stefan Schulte
On Fri, Feb 25, 2011 at 12:12:36PM -0800, Paul Berry wrote: > Stefan-- > > The dev team has been investigating several bugs in the mount provider > recently (#4184, #6309, #6409, and #6411), in addition to the one you are > working on. and #6027, #5991 > It looks like you've made a substantial b

Re: [Puppet-dev] [PATCH/puppet 2/3] (#6309) Ensure the correct device is mounted when managing mounts

2011-02-22 Thread Stefan Schulte
On Tue, Feb 22, 2011 at 10:43:36AM -0800, Nigel Kersten wrote: > [...] > > Yep. We're going to treat the device much like "content" on the file > type to try and be consistent. > > mount { "/mnt/a": ensure => unmounted, } > # Will ensure nothing is mounted at /mnt/a > > mount { "/mnt/a": ensur

  1   2   >