Puppet: System Administration Automated

Support

Ticket #1214 (new enhancement)

Opened 5 months ago

Last modified 4 months ago

Enhanced RedHat init script wth mongrel support

Reported by: fs Assigned to: lutter
Priority: normal Milestone:
Component: Red Hat Version: 0.24.4
Severity: normal Keywords: init
Cc: lutter Triage Stage: Accepted
Attached Patches: Insufficient Complexity: Unknown

Description

I've taken the Red Hat? init scripted posted at http://reductivelabs.com/trac/puppet/wiki/UsingMongrel and merged it with the existing stock version. Essentially, it adds support for two new settings in /etc/sysconfig/puppetmaster:

PUPPETMASTER_SERVER_TYPE This can be set to WEBBRICK (the default) or MONGREL. If set to MONGREL, it will launch multiple instances of puppetmasterd with --servertype mongrel.

PUPPETMASTER_PORTS A list of ports. If you're using the mongrel server, the script will start up an instance of puppetmasterd for each port in the list.

If you don't add either of those options to your /etc/sysconfig/puppetmaster file, the default will be to behave exactly as the current script does, so users can safely upgrade to this script without risk of breaking existing behavior.

Attachments

puppetmaster-mongrel (3.2 kB) - added by fs on 05/06/08 22:26:19.
Red Hat? init script with mongrel support
puppetmaster-mongrel2 (3.4 kB) - added by fs on 05/19/08 15:19:41.

Change History

05/06/08 22:26:19 changed by fs

  • attachment puppetmaster-mongrel added.

Red Hat? init script with mongrel support

05/07/08 13:45:56 changed by jamtur01

  • cc set to lutter.
  • owner changed from community to lutter.
  • stage changed from Unreviewed to Needs more info.

I've going to flick to lutter as the Red Hat expert - if he thinks it works - fine with me.

05/12/08 23:20:44 changed by luke

  • stage changed from Needs more info to Needs design decision.

I concur. David?

(follow-up: ↓ 5 ) 05/15/08 00:06:38 changed by lutter

I like the idea, but am not that happy with how it is actually implemented. Some comments:

* Delete the #set -x line

* when defining the lockfile var for WEBRICK, use $LOCKDIR (and move its definition up)

* having all those m_XXX_proc makes the script much harder to read than sticking them directly into the m_XXX functions (particularly for m_status)

* PUPPETMASTER_OPTS has no effect in the Mongrel case

* as far as organization goes, I'd much prefer one start function that has an if for the two servertypes than the 'computed' if done with ${FP}_start

05/15/08 18:04:36 changed by luke

  • stage changed from Needs design decision to Accepted.
  • patch changed from Code to Insufficient.

(in reply to: ↑ 3 ) 05/19/08 15:19:14 changed by fs

Replying to lutter:

I like the idea, but am not that happy with how it is actually implemented. Some comments: * Delete the #set -x line

Done (not sure how I let that one slip through there...)

* when defining the lockfile var for WEBRICK, use $LOCKDIR (and move its definition up)

Done.

* having all those m_XXX_proc makes the script much harder to read than sticking them directly into the m_XXX functions (particularly for m_status)

Okay, I've factored out the _proc functions.

* PUPPETMASTER_OPTS has no effect in the Mongrel case

Fixed.

* as far as organization goes, I'd much prefer one start function that has an if for the two servertypes than the 'computed' if done with ${FP}_start

Done, for stop, status, and restart as well.

Let me know if there are any other changes you'd like to see made.

05/19/08 15:19:41 changed by fs

  • attachment puppetmaster-mongrel2 added.