Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 466234 - app-admin/puppet-2.7.21 puts PID files in /var/run/puppet
Summary: app-admin/puppet-2.7.21 puts PID files in /var/run/puppet
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Matthew Thode ( prometheanfire )
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: keepdir-var-run_lock
  Show dependency tree
 
Reported: 2013-04-17 12:24 UTC by Peter Wilmott (RETIRED)
Modified: 2013-05-06 22:07 UTC (History)
2 users (show)

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


Attachments
puppet-2.7.21.ebuild.patch (puppet-2.7.21.ebuild.patch,594 bytes, patch)
2013-04-17 12:26 UTC, Peter Wilmott (RETIRED)
Details | Diff
puppetmaster.confd.patch (puppetmaster.confd.patch,378 bytes, text/plain)
2013-04-17 12:27 UTC, Peter Wilmott (RETIRED)
Details
puppet.confd.new (puppet.confd.new,134 bytes, text/plain)
2013-04-17 12:27 UTC, Peter Wilmott (RETIRED)
Details
puppet-2.7.21.ebuild.patch (puppet-2.7.21.ebuild.patch,810 bytes, patch)
2013-04-17 12:33 UTC, Peter Wilmott (RETIRED)
Details | Diff
puppet.conf.new (puppet.conf.new,842 bytes, text/plain)
2013-04-17 12:35 UTC, Peter Wilmott (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Wilmott (RETIRED) gentoo-dev 2013-04-17 12:24:27 UTC
app-admin/puppet-2.7.21 tries to put PID files into /var/run/puppet (Aka /run/puppet) which is mounted as tmpfs. This caused the puppet directory to be removed on reboot and thus puppet fails to start.

Puppet should place it's PID files into /var/run, this can be configured in /etc/conf.d/puppet and /etc/conf.d/puppetmaster




Reproducible: Always

Steps to Reproduce:
1. rc-update add puppet default
2. reboot
3. /etc/init.d/puppet status

Actual Results:  
/etc/init.d/puppet[2066]: Please make sure PUPPET_PID_DIR is defined and points to a existing directory
/etc/init.d/puppet[2058]: ERROR: puppet failed to start


Expected Results:  
Puppet should have started correctly.


Currently /etc/conf.d/puppet is pulled from the tarball (conf/gentoo/conf.d/puppet) while /etc/conf.d/puppetmaster is contained in the portage tree (app-admin/puppet/files).

I suggest we package /etc/conf.d/puppet the same way as /etc/conf.d/puppetmaster, and amend them both to use /run for PID files.

I assume puppet-3.x is also affected however I am not running it so cannot confirm that.
Comment 1 Peter Wilmott (RETIRED) gentoo-dev 2013-04-17 12:26:40 UTC
Created attachment 345768 [details, diff]
puppet-2.7.21.ebuild.patch
Comment 2 Peter Wilmott (RETIRED) gentoo-dev 2013-04-17 12:27:00 UTC
Created attachment 345770 [details]
puppetmaster.confd.patch
Comment 3 Peter Wilmott (RETIRED) gentoo-dev 2013-04-17 12:27:19 UTC
Created attachment 345772 [details]
puppet.confd.new
Comment 4 Peter Wilmott (RETIRED) gentoo-dev 2013-04-17 12:33:29 UTC
rundir is also defined in /etc/puppet.conf, which again is currently pulled from the tarball (conf/redhat/puppet.conf). Patches for that as well...
Comment 5 Peter Wilmott (RETIRED) gentoo-dev 2013-04-17 12:33:49 UTC
Created attachment 345774 [details, diff]
puppet-2.7.21.ebuild.patch
Comment 6 Peter Wilmott (RETIRED) gentoo-dev 2013-04-17 12:35:28 UTC
Created attachment 345776 [details]
puppet.conf.new
Comment 7 Hans de Graaff gentoo-dev Security 2013-04-21 08:08:21 UTC
It would probably be easier to fix this using 'checkpath' in the init.d file instead of using keepdir in the ebuild, so that the /var/run/puppet directory is created at runtime instead of install.
Comment 8 Peter Wilmott (RETIRED) gentoo-dev 2013-04-22 10:28:48 UTC
Whichever you think is easiest. I was under the impression that subdirectories in /var/run should no longer be used however I may be mistaken about this.
Comment 9 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2013-04-26 18:53:35 UTC
we already have it set to build the directories on startup.

start_pre() {                                                                                                                                                  
        checkpath --directory --owner puppet:puppet "${PUPPET_PID_DIR}"                                                                                        
    checkpath --directory --owner puppet:puppet --mode 750 ${PUPPET_LOG_DIR}                                                                                   
}

As far as sub-directories in /var/run, since it is a symlink to /run the question becomes should we allow sub-directories in /run. I say we should, so until told otherwise...


I think that answers everything in this bug, I miss something?
Comment 10 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2013-05-06 16:04:50 UTC
closing after waiting for an update :|