pierra mathieu
2013-Sep-09 11:26 UTC
[Puppet Users] Puppet calls the ENC twice for some nodes.
Hi everyone, I have an issue setting up Puppet with an ENC. For some nodes, puppet calls my ENC twice with a 2 sec interval. All my agents share the same configuration file. Considering this very basic ENC : #!/bin/bash> nodeName=$1 > echo `date` $nodeName >> /tmp/encCalls > echo "--- > classes: > testClass:"Here is the content of /tmp/encCalls after a few run on two nodes. 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 : host2Anybody knows why two calls are made ? Thanks. -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Steven VanDevender
2013-Sep-09 17:28 UTC
[Puppet Users] Puppet calls the ENC twice for some nodes.
pierra mathieu writes: > Hi everyone, > > I have an issue setting up Puppet with an ENC. > For some nodes, puppet calls my ENC twice with a 2 sec interval. Why is that a problem? Your ENC should always return the same data for the same node, and it should be efficient enough that it can be called for every node in your system (even twice). -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
jcbollinger
2013-Sep-10 14:22 UTC
[Puppet Users] Re: Puppet calls the ENC twice for some nodes.
On Monday, September 9, 2013 6:26:26 AM UTC-5, pierra mathieu wrote:> > Hi everyone, > > I have an issue setting up Puppet with an ENC. > For some nodes, puppet calls my ENC twice with a 2 sec interval. > > All my agents share the same configuration file. > > > Considering this very basic ENC : > > #!/bin/bash >> nodeName=$1 >> echo `date` $nodeName >> /tmp/encCalls >> echo "--- >> classes: >> testClass:" > > > > Here is the content of /tmp/encCalls after a few run on two nodes. > > 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 > > > > Anybody knows why two calls are made ? > >My first guess would be that you have two copies of the agent running on some nodes. If your manifest set is as simple as your ENC, then the Puppet agent could perform a full cycle fast enough that two separate catalog requests from the same node are received within 2 seconds. John -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
pierra mathieu
2013-Sep-20 12:46 UTC
[Puppet Users] Re: Puppet calls the ENC twice for some nodes.
Thanks for the answers and sorry for my late one, I''ve only one agent process running :> 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 agentAnd the agent cycle isn''t really fast, something like 5-10 sec. I was thinking about adding an acknowledgment the first time a class is requested by a node, so i''d like to choose which class to return for *each*request. Moreover, I''m curious and this comportment from puppet seems a little bit weird/useless. For information, here is my agent puppet.conf:> [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 = falseCommenting *pluginsync* or *report* doesn''t change anything. Any other ideas ? Thanks. Le lundi 9 septembre 2013 13:26:26 UTC+2, pierra mathieu a écrit :> > Hi everyone, > > I have an issue setting up Puppet with an ENC. > For some nodes, puppet calls my ENC twice with a 2 sec interval. > > All my agents share the same configuration file. > > > Considering this very basic ENC : > > #!/bin/bash >> nodeName=$1 >> echo `date` $nodeName >> /tmp/encCalls >> echo "--- >> classes: >> testClass:" > > > > Here is the content of /tmp/encCalls after a few run on two nodes. > > 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 > > > > Anybody knows why two calls are made ? > > Thanks. >-- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
pierra mathieu
2013-Sep-20 12:47 UTC
[Puppet Users] Re: Puppet calls the ENC twice for some nodes.
Thanks for the answers and sorry for my late one, I''ve only one agent process running :> 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 agentAnd the agent cycle isn''t really fast, something like 5-10 sec. I was thinking about adding an acknowledgment the first time a class is requested by a node, so i''d like to choose which class to return for *each* request. Moreover, I''m curious and this comportment from puppet seems a little bit weird/useless. For information, here is my agent puppet.conf:> [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 = falseCommenting *pluginsync* or *report* doesn''t change anything. Any other ideas ? Thanks. -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Greg Sutcliffe
2013-Sep-20 17:05 UTC
Re: [Puppet Users] Re: Puppet calls the ENC twice for some nodes.
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 On 20 Sep 2013 13:46, "pierra mathieu" <partmat71@gmail.com> wrote:> Thanks for the answers and sorry for my late one, > > I''ve only one agent process running : > >> 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 > > > And the agent cycle isn''t really fast, something like 5-10 sec. > > I was thinking about adding an acknowledgment the first time a class is > requested by a node, so i''d like to choose which class to return for *each > * request. > Moreover, I''m curious and this comportment from puppet seems a little bit > weird/useless. > > > For information, here is my agent puppet.conf: > >> [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 > > > Commenting *pluginsync* or *report* doesn''t change anything. > > Any other ideas ? > > Thanks. > > Le lundi 9 septembre 2013 13:26:26 UTC+2, pierra mathieu a écrit : >> >> Hi everyone, >> >> I have an issue setting up Puppet with an ENC. >> For some nodes, puppet calls my ENC twice with a 2 sec interval. >> >> All my agents share the same configuration file. >> >> >> Considering this very basic ENC : >> >> #!/bin/bash >>> nodeName=$1 >>> echo `date` $nodeName >> /tmp/encCalls >>> echo "--- >>> classes: >>> testClass:" >> >> >> >> Here is the content of /tmp/encCalls after a few run on two nodes. >> >> 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 >> >> >> >> Anybody knows why two calls are made ? >> >> Thanks. >> > -- > 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+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users. > For more options, visit https://groups.google.com/groups/opt_out. >-- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Greg Sutcliffe
2013-Sep-20 17:07 UTC
Re: [Puppet Users] Re: Puppet calls the ENC twice for some nodes.
On 20 Sep 2013 18:05, "Greg Sutcliffe" <greg.sutcliffe@gmail.com> wrote:> the should authoritatively be in.Gah, phone keyboard. "The *client* should authoritatively..." Sorry 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
jcbollinger
2013-Sep-23 13:59 UTC
Re: [Puppet Users] Re: Puppet calls the ENC twice for some nodes.
On Friday, September 20, 2013 12:05:17 PM UTC-5, Greg Sutcliffe wrote:> > 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. >Not exactly, but that may well be the right track. It would be pointless for the master to run the ENC more than once for catalog compilation, for it would have no reason to expect that the ENC''s output would change. HOWEVER, the master''s file server may need to run the ENC again to determine the environment from which to serve ''source''d files. John -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.