Problem - init script in puppet-server-3.2.1-1.el6.noarch not updated for proper pid file path

70 views
Skip to first unread message

Kenneth Edgar

unread,
Jun 19, 2013, 10:36:49 AM6/19/13
to puppe...@googlegroups.com
Hello,

This is my first time posting, so I apologize if someone else has posted this before, I didn't see anything.

I installed puppet-server-3.2.1-1.el6.noarch from the x86_64 puppetlabs-release-6-7.noarch repo.  I had issues stopping and restarting via the init script and did a little digging.  I found that the master's pid file is now in /var/lib/puppet/run/ rather than /var/run/puppet/, however this change was not updated for the stop procedures in the init script.

The pidfile variable should look like: "pidfile=/var/lib/puppet/run/master.pid"

This also appears to be an issue with the puppet agent init script.

Thank you,
Ken Edgar

Jo Rhett

unread,
Jun 22, 2013, 11:51:08 PM6/22/13
to puppe...@googlegroups.com
On Jun 19, 2013, at 7:36 AM, Kenneth Edgar wrote:
I installed puppet-server-3.2.1-1.el6.noarch from the x86_64 puppetlabs-release-6-7.noarch repo.  I had issues stopping and restarting via the init script and did a little digging.  I found that the master's pid file is now in /var/lib/puppet/run/ rather than /var/run/puppet/, however this change was not updated for the stop procedures in the init script.

I can confirm this problem. The agent and master now put their PID files in different places than what the init scripts expect. Process management of puppet agent and puppet server is thereby broken.

There are two workarounds:

1. Edit /etc/sysconfig/puppet and /etc/sysconfig/puppetmaster to indicate PIDFILE= new location

2. Edit /etc/puppet/puppet.conf indicate
[agent]
pidfile = /var/run/puppet/agent.pid
[master]
pidfile = /var/run/puppet/master.pid

Obviously neither one of these is optimal. This has been reported as http://projects.puppetlabs.com/issues/21404

-- 
Jo Rhett
Net Consonance : net philanthropy to improve open source and internet projects.



Matthaus Owens

unread,
Jun 23, 2013, 4:22:56 PM6/23/13
to puppe...@googlegroups.com
Kenneth,
Have you edited puppet.conf since installing puppet? The puppet rpm
lays down a default puppet.conf that includes rundir=/var/run/puppet
under [main], which makes pidfile /var/run/puppet/agent.pid and
/var/run/puppet/master.pid. A fresh install of puppet 3.2.1 for me
resulted in the following:

[root@el6-64 ~]# yum install puppet-3.2.1
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirror.facebook.net
* extras: centos.mirror.ndchost.com
* updates: centos.mirror.ndchost.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package puppet.noarch 0:3.2.1-1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================
Package Arch Version
Repository Size
=====================================================================================================
Installing:
puppet noarch 3.2.1-1.el6
puppetlabs-products 1.0 M

Transaction Summary
=====================================================================================================
Install 1 Package(s)

Total download size: 1.0 M
Installed size: 3.1 M
Is this ok [y/N]: y
Downloading Packages:
puppet-3.2.1-1.el6.noarch.rpm
| 1.0 MB 00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : puppet-3.2.1-1.el6.noarch
1/1
Verifying : puppet-3.2.1-1.el6.noarch
1/1

Installed:
puppet.noarch 0:3.2.1-1.el6

Complete!
[root@el6-64 ~]# /usr/bin/puppet agent --configprint pidfile
/var/run/puppet/agent.pid
[root@el6-64 ~]# /usr/bin/puppet master --configprint pidfile
/var/run/puppet/master.pid
> --
> 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 puppet-dev+...@googlegroups.com.
> To post to this group, send email to puppe...@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-dev.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



--
Matthaus Owens
Release Manager, Puppet Labs

Join us at PuppetConf 2013, August 22-23 in San Francisco -
http://bit.ly/pupconf13
Register now and take advantage of the Early Bird discount - save 25%!

Kenneth Edgar

unread,
Jun 25, 2013, 12:06:22 PM6/25/13
to puppe...@googlegroups.com
I used genconfig to create the /etc/puppet/puppet.conf file.  I also noticed that the agent places the run file in /var/run/puppet/

Matthaus Owens

unread,
Jun 25, 2013, 12:33:20 PM6/25/13
to puppe...@googlegroups.com
Kenneth, can you post your puppet.conf (or post a sanitized version)?

Kenneth Edgar

unread,
Jul 2, 2013, 3:13:56 PM7/2/13
to puppe...@googlegroups.com
Going through pro puppet, the only thing I think I've changed in this config file is the name of the master which is just a test box.
puppet.conf

Kenneth Edgar

unread,
Jul 2, 2013, 3:14:58 PM7/2/13
to puppe...@googlegroups.com
Sorry, google hasn't been sending me e-mail updates from this group, so I didn't notice the response right away

Matthaus Owens

unread,
Jul 2, 2013, 3:21:16 PM7/2/13
to puppe...@googlegroups.com
Kenneth,
This setting in puppet.conf:

# Where Puppet PID files are kept.
# The default value is '$vardir/run'.
rundir = /var/lib/puppet/run

Will break the init scripts provided with the rpm packages, which
expect rundir to be "/var/run/puppet". If you update your rundir
setting to be /var/run/puppet, the init scripts should behave as
expected.
You will also need to either remove or update this section:

# The file containing the PID of a running process. This file is
intended to be used by service management frameworks and monitoring
systems to determine if a puppet process is still in the process
table.
# The default value is '$rundir/${run_mode}.pid'.
pidfile = /var/lib/puppet/run/master.pid

Pidfile should be /var/run/puppet/master.pid for the init script to
work. If you have rundir correctly set as mentioned above, you can
safely remove this setting as it will default to $rundir/master.pid

Hope that helps.

ken edgar

unread,
Jul 2, 2013, 3:57:54 PM7/2/13
to puppe...@googlegroups.com
Thanks Matthaus for the help, appreciate it!


You received this message because you are subscribed to a topic in the Google Groups "Puppet Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-dev/Lb1Tl-S9IEk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to puppet-dev+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages