Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 238612 - app-admin/puppet - puppetd won't start when puppetmaster is already running
Summary: app-admin/puppet - puppetd won't start when puppetmaster is already running
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-24 21:35 UTC by Brendan Kirby
Modified: 2008-09-26 16:14 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brendan Kirby 2008-09-24 21:35:31 UTC
If I want puppet to manage my puppetmaster server, I need both puppetd and puppetmaster running.  However, the /etc/init.d/puppet and /etc/init.d/puppetmaster look for /usr/bin/ruby rather than the particular daemon.  

Reproducible: Always

Steps to Reproduce:
1.start-stop-daemon --start --exec /usr/bin/ruby /usr/bin/puppetd
2.echo Result: $?


Actual Results:  
/usr/bin/ruby already running.
Result: 1

Expected Results:  
Result: 0


I changed start-stop-daemon in /etc/init.d/puppet and /etc/init.d/puppetmaster to not call /usr/bin/ruby and instead call their daemon directly.  Here's a patch for the init files:
--- puppet-orig 2008-06-29 18:47:13.000000000 -0700
+++ puppet      2008-09-24 13:27:20.000000000 -0700
@@ -24,7 +24,7 @@
         [[ -n "${PUPPET_EXTRA_OPTS}" ]] && options="${options} ${PUPPET_EXTRA_OPTS}"
 
         ebegin "Starting puppet"
-        start-stop-daemon --start --quiet --exec /usr/bin/ruby /usr/bin/puppetd -- ${options}
+        start-stop-daemon --start --quiet --exec /usr/bin/puppetd -- ${options}
         eend $? "Failed to start puppet"
 }
 
--- puppetmaster-orig   2008-06-29 18:47:12.000000000 -0700
+++ puppetmaster        2008-09-24 13:27:32.000000000 -0700
@@ -34,7 +34,7 @@
        [[ -n "${PUPPETMASTER_EXTRA_OPTS}" ]] && options="${options} ${PUPPETMASTER_EXTRA_OPTS}"
 
        ebegin "Starting puppetmaster"
-       start-stop-daemon --start --quiet --exec /usr/bin/ruby /usr/bin/puppetmasterd \
+       start-stop-daemon --start --quiet --exec /usr/bin/puppetmasterd \
                -- ${options}
        eend $? "Failed to start puppetmaster"
 }
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2008-09-26 13:53:45 UTC
Please specify the version and revision of app-admin/puppet in the Summary.
Also, please post your `emerge --info'.
Comment 2 Brendan Kirby 2008-09-26 16:14:23 UTC
Sorry I forgot the version number.. 
app-admin/puppet version 0.24.4 

After looking around a little more I noticed that the init scripts in both the tar file and the portage tree don't have the /usr/bin/ruby after the --exec in the start-stop-daemon line.  So, I re-installed puppet.  This removed /usr/bin/ruby from puppetmaster, but not puppet.  Which, I think, fixes the problem.  I guess it was fixed after I installed puppet.

The /usr/bin/ruby in the puppet init script appears to be coming from the openrc patch.  Since I'm not using openrc yet, this doesn't effect me and I don't have any other ruby daemons.  I'm curious why openrc needs this, though.