Puppet thread safety

28 views
Skip to first unread message

Vincent Miszczak

unread,
May 2, 2014, 4:27:04 PM5/2/14
to puppe...@googlegroups.com
Hello,

I'd like to do the following : 

site.pp
custom_function_that_changes_puppet_internal_variables()
hiera_include("classes")
custom_function_that_restores_puppet_internal_variables()

Custom functions are  implemented using 

module Puppet::Parser::Functions
      newfunction(:hiera_hook) do |*args|

Multiple nodes will ask for this, is it safe to do ?

Andy Parker

unread,
May 6, 2014, 7:13:32 PM5/6/14
to puppe...@googlegroups.com
On Fri, May 2, 2014 at 1:27 PM, Vincent Miszczak <vincent....@gmail.com> wrote:
Hello,

I'd like to do the following : 

site.pp
custom_function_that_changes_puppet_internal_variables()
hiera_include("classes")
custom_function_that_restores_puppet_internal_variables()


I would be very careful about doing this because the internals of puppet are very easy to get into unknown state regardless of threads being involved.

What are you trying to achieve?
 
Custom functions are  implemented using 

module Puppet::Parser::Functions
      newfunction(:hiera_hook) do |*args|

Multiple nodes will ask for this, is it safe to do ?

Puppet does not work in a threaded environment in general. 

--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/6632c6c3-1ec4-422f-a64f-dad21956ef29%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Andrew Parker
Freenode: zaphod42
Twitter: @aparker42
Software Developer

Join us at PuppetConf 2014September 22-24 in San Francisco
Register by May 30th to take advantage of the Early Adopter discount save $349!
Reply all
Reply to author
Forward
0 new messages