#!/bin/bash
nodeName=$1
echo `date` $nodeName >> /tmp/encCalls
echo "---
classes:
testClass:"
Mon Sep 9 11:36:15 CEST 2013 : host1
Mon Sep 9 11:36:17 CEST 2013 : host1
Mon Sep 9 11:41:04 CEST 2013 : host2
Mon Sep 9 11:42:04 CEST 2013 : host1
Mon Sep 9 11:42:06 CEST 2013 : host1
Mon Sep 9 11:45:13 CEST 2013 : host2
ps -aef | grep puppet
root 4080 2811 0 14:14 pts/0 00:00:00 grep puppet
root 18328 1 0 Sep12 ? 00:00:02 /usr/bin/ruby /usr/bin/puppet agent
[main]
logdir = /var/log/puppet
rundir = /var/run/puppet
ssldir = $vardir/ssl
pluginsync = true
[agent]
classfile = $vardir/classes.txt
localconfig = $vardir/localconfig
server=********
report = true
usecacheonfailure = false
Is this puppet3? As I recall, in puppet3, the master makes a separate call to the enc to determine the environment the should authoritatively be in. Once that's established, it makes a second call to get the classes and parameters.
Hth,
Greg
--
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 post to this group, send email to puppet...@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.
On 20 Sep 2013 18:05, "Greg Sutcliffe" <greg.su...@gmail.com> wrote:
> the should authoritatively be in.
Gah, phone keyboard. "The *client* should authoritatively..."
Sorry
Greg
Is this puppet3? As I recall, in puppet3, the master makes a separate call to the enc to determine the environment the should authoritatively be in. Once that's established, it makes a second call to get the classes and parameters.
--
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/373455ff-43f4-4f27-8667-ab896c240ea6%40googlegroups.com.
Hi, chanced across this discussion when I noticed an ENC was being called twice. I understand I may not be using the ENC terminus exactly as it's been designed, but it's unexpected that it was called twice. Also worth noting that I can't see a note about the ENC being called twice here: http://docs.puppetlabs.com/guides/external_nodes.html
In my case, I'm using an ENC to push virtual host changes to an agent running a web server, the YAML returned by the ENC uses create_resources to dynamically add resources to the catalogue.I observed via logging in the ENC script that on the first run, the ENC was excecuted but the catalogue was not applied, on the second run the catalogue was applied on the agent.
This causes problems where we use an API to dynamically apply resources to a catalogue (1st run gets the catalogue resources, returns 'OK' to the API, 2nd run then tries to get resources but gets nothing as the 'OK' sent to the API has effectively modified the resources to be applied).I've worked around this, for now, by using a lock file, so that the 'OK' API call is only run once but this still applies two calls to the API to dynamically get resources for the catalogue, where only one is required. I double checked the master and the agent configs, and the master only shows the ENC being referenced once and there is one agent being run, only.Based on this, is there any way the agent can be set to call the ENC once only ? The only argument to the script is the agent hostname and there is no apparent difference in the environment of the first and second ENC calls.