puppetlabs/puppet — pull request #1167 by jeffmccune (2012-09-18 18:39:10+00:00)
Title: (#3757) Rename agent_pidfile to agent_catalog_run_lockfile

Without this patch it is very confusing what the intended purpose of the
agent_pidfile setting is. This confusion may lead to people thinking this
file is intended to be used my monitoring systems or service management
frameworks to determine the PID of a running puppet agent process. This
thinking is incorrect, the `pidfile` setting is intended for this purpose.

The `agent_pidfile` setting is intended to provide mutual exclusion of
configuration catalog runs. This patch reduces confusion by more closely
matching the name and description to the intent.

In addition, the prose in the descriptions and comments have been
augmented to make it clear "running agent" refers to an agent performing a
configuration catalog run and not simply the running agent process.

(Maint) Improve error message when catalog run is in progress

When a catalog run is currently in progress, or the `puppet agent
--configprint agent_catalog_run_lockfile` is stale, the error message
looks like this:

Run of Puppet configuration client already in progress; skipping

This is a problem because if the system is deadlocked from a stale file,
it's not clear what file needs to be removed. This patch improves the
error message to be:

Run of Puppet configuration client already in progress; skipping \
(/var/lib/puppet/state/agent_catalog_run.lock exists)

A new method has been added to make it easy to print out the file being
referenced by the `running?` method.