Re: [Puppet-dev] puppet4 regressions or features?

2015-05-14 Thread Erik Dalén
On Fri, 15 May 2015 at 00:59 Joshua hoblitt wrote: > As I'm slowly updating my modules' testing boilerplate for puppet 4.x, > I've run into a couple cases of breakage that I'm unsure if they are > intentional changes in semantics or regressions. > > When introspecting on a resource and the param

Re: [Puppet-dev] Validation Resources

2015-05-14 Thread Erik Dalén
On Thu, 14 May 2015 at 21:45 Trevor Vaughan wrote: > Hmmwhat about a concept of deferred actions? > > I.e. Try this resource, can't do it, shove it (and it's dependencies) to > the bottom of the stack and do everything else, then come back to it. > If puppet would think that the provider is

[Puppet-dev] puppet4 regressions or features?

2015-05-14 Thread Joshua hoblitt
As I'm slowly updating my modules' testing boilerplate for puppet 4.x, I've run into a couple cases of breakage that I'm unsure if they are intentional changes in semantics or regressions. When introspecting on a resource and the param is undefined, an empty string is now being returned instea

Re: [Puppet-dev] Re: Validation Resources

2015-05-14 Thread Dan Bode
On Thu, May 14, 2015 at 12:54 PM, Trevor Vaughan wrote: > - I've also moved away from the model of directly querying to perform the >> same actions through a service registration/discovery system (in my case >> consul) > > > Interesting, were you doing these in the providers/on the clients, or at

Re: [Puppet-dev] Re: Validation Resources

2015-05-14 Thread Trevor Vaughan
> > - I've also moved away from the model of directly querying to perform the > same actions through a service registration/discovery system (in my case > consul) Interesting, were you doing these in the providers/on the clients, or at catalog compile time? I was thinking it would be a catalog c

[Puppet-dev] Re: Validation Resources

2015-05-14 Thread Dan Bode
On Thursday, May 14, 2015 at 12:11:19 PM UTC-7, Spencer Krum wrote: > > Hi Folks, > > There is currently a PR against stdlib that I am writing to you today > about: https://github.com/puppetlabs/puppetlabs-stdlib/pull/444 > Thanks to Spredzy for making this PR. > > This is tracked in jira: >

Re: [Puppet-dev] Validation Resources

2015-05-14 Thread Trevor Vaughan
Hmmwhat about a concept of deferred actions? I.e. Try this resource, can't do it, shove it (and it's dependencies) to the bottom of the stack and do everything else, then come back to it. You could even technically have a method for simply backgrounding that entire resource chain. This sort

Re: [Puppet-dev] Validation Resources

2015-05-14 Thread Trevor Vaughan
Hey! Do you have a link to that presentation? For a Java spin lock, wouldn't it go something like: * First try -> Wait until timeout * Timeout -> Drop file * Second try -> Notice and remove file * Try again * etc... Trevor On Thu, May 14, 2015 at 3:33 PM, Spencer Krum wrote: > Trevor, > > I

Re: [Puppet-dev] Validation Resources

2015-05-14 Thread Spencer Krum
Trevor, I agree that if you take it to its logical conclusion you end up with semaphores stored in consul and a handful of Puppet resources to interact with them. Dan Bode presented on exactly this (and what doesn't work well about it) at the PDX Puppet Users group last month. I think though that

Re: [Puppet-dev] Validation Resources

2015-05-14 Thread Colleen Murphy
On Thu, May 14, 2015 at 12:11 PM, Spencer Krum wrote: > Hi Folks, > > There is currently a PR against stdlib that I am writing to you today > about: https://github.com/puppetlabs/puppetlabs-stdlib/pull/444 > Thanks to Spredzy for making this PR. > > This is tracked in jira: > https://tickets.pupp

Re: [Puppet-dev] Validation Resources

2015-05-14 Thread Trevor Vaughan
Ugh, sorry all, didn't mean to make that so rant-ish. Anyway, it would seem that you would not want to hold up a catalog compilation or application for this. Instead, you would want to register the check with a service that could drop a queriable entity that could be used by Puppet for making deci

Re: [Puppet-dev] Validation Resources

2015-05-14 Thread Trevor Vaughan
I'd like to counter this limited use case with my rant about semaphores from five years ago: http://comments.gmane.org/gmane.comp.sysutils.puppet.devel/13039. Followed by the conversation from two years ago. https://projects.puppetlabs.com/issues/16187 What you want is cross-node synchronization

[Puppet-dev] Re: Validation Resources

2015-05-14 Thread Clayton O'Neill
We have something almost exactly the same as this that we use internally. We also have a http_conn_validator that we use for services more like PuppetDB that need to do a HTTP request against a specific URI, or look for a specific HTTP result code. This has been huge for us to be able to automa

[Puppet-dev] Validation Resources

2015-05-14 Thread Spencer Krum
Hi Folks, There is currently a PR against stdlib that I am writing to you today about: https://github.com/puppetlabs/puppetlabs-stdlib/pull/444 Thanks to Spredzy for making this PR. This is tracked in jira: https://tickets.puppetlabs.com/browse/MODULES-1982 This pattern has poked up a few differ

[Puppet-dev] Re: Using functions inside functions in Puppet 4

2015-05-14 Thread Henrik Lindberg
On 2015-14-05 12:58, Alessandro Franceschi wrote: Hi all, sorry to bother, I should probably search around better but I'm quite confident that I can find here a quick solution. I've this issue: https://github.com/example42/puppi/issues/123 in a function which tries to use the hiera function as f

[Puppet-dev] Using functions inside functions in Puppet 4

2015-05-14 Thread Alessandro Franceschi
Hi all, sorry to bother, I should probably search around better but I'm quite confident that I can find here a quick solution. I've this issue: https://github.com/example42/puppi/issues/123 in a function which tries to use the hiera function as follows: value = function_hiera(["#{module_name}_#