Does the puppet agent start puppetmaster?

48 views
Skip to first unread message

César

unread,
Apr 18, 2016, 6:05:55 AM4/18/16
to Puppet Users
Hi all,

I have been looking for some docs to get more information on the subject, but I have not been able to find them. Apologies if this has been asked before!

I'm curious about what happens when a puppet agent run is performed but there are no puppetmaster processes yet (I'm talking about puppetmaster configured by Passenger, not the daemonized configuration).
When that happens usually I see something like this on the logs

Apr 18 09:59:19 ms1 puppet-master[5849]: Starting Puppet master version 3.3.2

My question would be: Should I always expect the puppet agent to somehow spawn a puppetmaster process if there are none? Who's in charge of that?

Thanks,
Cesar.

Martin Alfke

unread,
Apr 18, 2016, 7:24:19 AM4/18/16
to puppet...@googlegroups.com
Hi Cesar,

On 18 Apr 2016, at 12:05, César <xcu...@gmail.com> wrote:

> Hi all,
>
> I have been looking for some docs to get more information on the subject, but I have not been able to find them. Apologies if this has been asked before!
>
> I'm curious about what happens when a puppet agent run is performed but there are no puppetmaster processes yet (I'm talking about puppetmaster configured by Passenger, not the daemonized configuration).

An agent requires a running master as a central instance.
You deploy your puppet code onto that master.
The agent asks the master for its configuration and the master checks node classification, classes, templates and “compiles” a catalog.
The catalog (which is minified JSON) is then sent back to the agent.

> When that happens usually I see something like this on the logs
>
> Apr 18 09:59:19 ms1 puppet-master[5849]: Starting Puppet master version 3.3.2

The master should have been started by an init script.
Elder versions of Puppet used an Apache/Nginx in combination with Passenger/Unicorn to spin up the Ruby application.
Newer versions of the master are running on top of a JVM (the new server is written in Clojure).

>
> My question would be: Should I always expect the puppet agent to somehow spawn a puppetmaster process if there are none? Who's in charge of that?

An agent should not spin up a local master, but connect to an existing master instance.

hth,
Martin

>
> Thanks,
> Cesar.
>
> --
> You received this message because you are subscribed to the Google Groups "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/a6b4d24e-1ea8-425d-ac4c-6e5c81b94007%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

jcbollinger

unread,
Apr 18, 2016, 1:09:44 PM4/18/16
to Puppet Users
Where the master is hosted in Apache / Passenger, as you stipulated, it is Passenger (on the server) that is responsible for managing puppetmaster instances.  The agent has nothign directly to do with it, but if a catalog request arrives at Apache / Passenger when there are no puppetmaster instances currently running, then I would indeed expect Passenger to spin one up to handle the request, and some number of future requests.


John

Ramin K

unread,
Apr 18, 2016, 1:14:07 PM4/18/16
to puppet...@googlegroups.com
In all versions of Passenger the default config will not start any
application processes. Once a request is received Passenger will start
the matching application process. This is the behavior you're seeing.

On a production server I recommend setting PassengerPreStart
https://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html#PassengerPreStart
which will automatically start an application process. Available in
Passenger 3+. However you can still end up with no Puppet master process
available depending on other settings.

I wrote some about how I tune Passenger for production Puppet master
loads here.
https://ask.puppet.com/question/13433/how-should-i-tune-passenger-to-run-puppet/

Ramin

Reply all
Reply to author
Forward
0 new messages