running puppet agent manually under debian

3,397 views
Skip to first unread message

rektide

unread,
Apr 8, 2011, 1:34:00 PM4/8/11
to Puppet Users
the debian puppet package has a puppet agent running. this creates a /
var/run/puppet/agent.pid file. when i run `sudo puppet agent`, i get:

Could not prepare for execution: Could not create PID file: /var/run/
puppet/agent.pid

this prevents me from applying a change i want to make right now.

in debian, assuming the user has installed the puppet package and thus
has a puppet agent running, what steps should one take to manually run
puppet agent (that is, to have puppet run)? certainly there must be a
non-full-of-shit option that doesnt entail stopping the daemon,
manually running, then restarting the agent?

Nigel Kersten

unread,
Apr 8, 2011, 1:55:51 PM4/8/11
to puppet...@googlegroups.com, rektide

Send USR1 to the puppet agent process.

kill -USR1 $(cat /var/lib/puppet/run/agent.pid)

and it will reload and run.

Patrick

unread,
Apr 9, 2011, 1:56:46 PM4/9/11
to puppet...@googlegroups.com
On Apr 8, 2011, at 10:34 AM, rektide wrote:
> in debian, assuming the user has installed the puppet package and thus
> has a puppet agent running, what steps should one take to manually run
> puppet agent (that is, to have puppet run)? certainly there must be a
> non-full-of-shit option that doesnt entail stopping the daemon,
> manually running, then restarting the agent?

Nigel sent you an option to tell the currently running daemon to trigger a new run right now. You can also manually run puppet in a way that will give you more immediate feedback like this:

puppetd -- verbose -- no-daemonize --onetime

This will run another puppet process, which will terminate when the run is over. The original process will do nothing, and continue to run, unchanged by this command.

Reply all
Reply to author
Forward
0 new messages