Puppet: System Administration Automated

Support

Ticket #686 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

puppetmasterd --mongrel fails to daemonize

Reported by: porridge Assigned to: luke
Priority: normal Milestone: beaker
Component: server Version: 0.23.0
Severity: normal Keywords: mongrel daemonize
Cc: Triage Stage: Ready for checkin
Attached Patches: Code Complexity: Unknown

Description

Unless you specify --debug or --verbose, it fails with the following message:

/opt/bin/puppetmasterd:292: undefined method `daemonize' for #<Mongrel::HttpServer:0xb779ad94> (No Method Error?)

This is with 0.22.4, but 0.23.0 probably has the same problem.

One (not necessarily correct) way to fix this is to apply this:

--- tmp/puppetmasterd.orig      2007-06-26 15:40:16.000000000 +0100
+++ tmp/puppetmasterd   2007-06-26 16:21:06.000000000 +0100
@@ -80,6 +80,7 @@

 require 'getoptlong'
 require 'puppet'
+require 'puppet/daemon'
 require 'puppet/sslcertificates'

 options = [
@@ -256,6 +257,9 @@
         if addr == ""
             addr =  "127.0.0.1"
         end
+       class Mongrel::HttpServer
+               include Puppet::Daemon
+       end
         server = Mongrel::HttpServer.new(addr, Puppet[:masterport])
         server.register("/", handler)
     else

Change History

07/04/07 21:23:54 changed by luke

  • stage changed from Unreviewed to Ready for checkin.
  • milestone set to beaker.

07/09/07 01:02:31 changed by luke

  • status changed from new to closed.
  • resolution set to fixed.

I can't reproduce this with 0.23.0 (at least, not with current svn, which is almost equivalent), but I don't recall fixing this, either. Maybe it's a difference in Mongrel version; I'm running 1.0.1.

Anyway, I did my best to make sure this is fixed in [2659].