Ask Your Question

How does puppet decide if a node is active?

asked 2016-02-11 09:32:36 -0600

amirb gravatar image

updated 2016-02-14 07:03:03 -0600

I'm trying to change default behavior in puppet when a Notify resource is applied on a node. Current state (3.8) is that whenever the client is applying a simply Notify message, the client will send a report with state "Active". This is somewhat misleading because nothing really changed on the node.

Is it possible to change this so that puppet will not make a Notify resource change node status to "Active"? Thanks.

EDIT #1 I'm using Puppet 3.8 + Foreman 1.9.2. Puppet is sending agent reports to Foreman, and Foreman shows the Notify resource as being active \ applied \ changed. When using the "warning" function in a manifest, the message will not be included in the report. (only in the puppetmaster log file) There's a closed bug in Foreman for this issue, you can find it here

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-02-13 11:58:10 -0600

lqueryvg gravatar image

updated 2016-02-14 10:45:36 -0600

I don't see why it would be misleading to report the node as active in this situation.

When puppet agent runs, it must contact the master to fetch the catalogue which tells it what to do, even if that is only to apply Notify resource.

If you want to apply resources on a node without contacting the master, you should look at the puppet apply command which allows you to run node-local manifest files without contacting the master.


I know this is not the answer you are looking for, but given that the following tickets are still open:

... I don't think the ability to log messages on the agent without creating a "change" is going to get added to Puppet any time soon. I had a quick look at Foreman and I get the impression the "Active" status associated with agent resources changing is embedded and inherent. Nevertheless, it still might be worth pursuing this with the Foreman community.

edit flag offensive delete link more


When you're using the Notify resource to simply generate output it's not accurate to describe the node as "Active" because nothing is changed, it's just a message. Running "puppet apply" will not help in my situation because I need the agent to send a report at the end of each puppet run.

amirb gravatar imageamirb ( 2016-02-13 12:35:52 -0600 )edit

Puppet is not just about changes; it's also about stopping configuration drift. If the agent is periodically running, comparing resources against desired states as per manifests on the master, then even if no changes are made, the agent is actively doing it's job. "Active" seems correct, IMO.

lqueryvg gravatar imagelqueryvg ( 2016-02-13 14:50:13 -0600 )edit

There are some circumstances that make this behavior seem odd, for instance when the goal of using the Notify resource is strictly for auditing, you don't expect the node to become "active" when all that happened is a message in the client log. This is espicially true when using puppet + Foreman UI.

amirb gravatar imageamirb ( 2016-02-14 03:41:31 -0600 )edit

This link talks about running puppet apply and sending a report to the master:!topic/puppet-users/AanR33PvZwk. Have you tried this ? I'm not sure if it will still report the node status as "Active" though.

lqueryvg gravatar imagelqueryvg ( 2016-02-14 04:59:17 -0600 )edit

I'm actually searching for a more straight-forward solution because we are already working with puppet agent on all nodes, with predefined run-intervals. Do you know where (maybe in puppetmaster sources) I can add an exception to ignore Notify resources from being treated as "Active" \ "Changed"?

amirb gravatar imageamirb ( 2016-02-14 05:50:21 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2016-02-11 09:32:36 -0600

Seen: 245 times

Last updated: Feb 14 '16