On Wednesday, July 15, 2015 at 7:06:42 PM UTC-7, Trevor Vaughan wrote: > > So, we ran across this one today and I dug up the thread where Felix > Frank, John Bolinger, and I all agreed (https://goo.gl/LQ20bj) that there > were solid use cases for keeping the Webrick version of Puppet around. > > We were all fine with losing Rack support but, as of right now, I do not > know how to debug the internals of the server-side Ruby code within the > Clojure stack. > > As far as I can tell, I can't do the following in Puppet Server: > > 1) Stuff Pry into the middle of the stack and interact with it so that you > can inspect the internal state of the Puppet Master process while testing > custom types, functions, and providers. >
The documentation for using pry is here: https://github.com/puppetlabs/puppet-server/blob/master/documentation/dev_debugging.markdown 2) Easily debug the *server* portions of the Ruby code > Yeah, I wish there's a wrapper similar to puppet master --compile for the puppet-server stack. The example I got from support doesn't work and I haven't chased down the issue yet, maybe it works for other people: /opt/puppet/bin/java -cp /opt/puppet/share/puppetserver/puppet-server-release.jar org.jruby.Main -I/opt/puppet/lib/ruby/site_ruby/1.9.1 /opt/puppet/bin/puppet master --compile <certname> --trace WARNING: unimplemented method called: request#signature_algorithm Error: Could not prepare for execution: Unknown signature algorithm '' 3) Spin up a lightweight Puppet server instance for trying/debugging some > code on a laptop of limited resources > > Looking over PUP-4435, I don't see any indication as to exactly *why* we > can't keep Webrick support or how to do the three items above. > > Digging into the referred ticket of PUP-4394, it seems like it would be > relatively easy to either gracefully bail if the puppet user/group don't > exist or, alternatively, to create them as an option. > > Yes, throw all sorts of "don't use this in production" warnings, but I > need to know how to do the three things above prior to losing Webrick > support because the code in 'puppet apply' doesn't work the same way as the > puppet server compiler in all cases. > puppet-server doesn't always behave the same as the ruby server code, so I don't know if it's actually helpful. A few issues I run into are around https connection (due to jruby) and environment variable preservation (SERVER-584) that only occur with the puppet-server stack. I would agree a few debugging examples in the documentation target at ruby v.s. closure code would be really helpful since we are poking at code three layers deep. Thanks, Nan -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/78f372a5-6d14-4f87-8cde-142e08774703%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
