So this seemed worth another thread given the significant progress...
just about all done by Brice as usual.... :)

With jruby 1.4.0 and jetty-rackup from
http://github.com/geekq/jetty-rackup and a simple config.ru file that
looks like:

-----------------
$0 = "puppetmasterd"
require 'puppet'

ARGV << "--verbose"
#ARGV << "--debug"
#ARGV << "--trace"
 # I have a special config file for my servers
ARGV << "--config" << "/etc/puppet/puppetmasterd.conf"
ARGV << "--no-daemonize"
ARGV << "--user" << "puppet"
ARGV << "--no-ca"

ARGV << "--rack"
require 'puppet/application/puppetmasterd'
# we're usually running inside a Rack::Builder.new {} block,
# therefore we need to call run *here*.
run Puppet::Application[:puppetmasterd].run
-----------------

then this little modification to jetty-rackup
-----------------
jetty = org.mortbay.jetty.Server.new options[:Port]
# next 3 lines are new
jetty.get_connectors.each do |c|
  c.set_header_buffer_size 8192
end
-----------------
and we have something that almost works.

err: Could not retrieve catalog: Uncaught exception fork is unsafe and
disabled by default on JRuby in method puppetmaster.getconfig

I've enabled forking.... -J-Djruby.fork.enabled=true and crossed my
fingers... oh look at all this...

WARNING: fork is highly unlikely to be safe or stable on the JVM. Have fun!
WARNING: fork is highly unlikely to be safe or stable on the JVM. Have fun!
WARNING: fork is highly unlikely to be safe or stable on the JVM. Have fun!

and we blow up earlier than we did before...  Tried the latest HEAD,
it was completely broken, so reverted to a few commits earlier, and
made some progress... but then the actual forking looks to fail.

info: Autoloaded module base
debug: Puppet::Type::Package::ProviderRpm: Executing '/usr/bin/rpm --version'
Could not autoload rpm: No child processes - No child processes


It looks like we only fork in three places in Puppet for what it's worth.




-- 
nigel

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to