I am puzzled and banging my head on the wall since two hours. After doing some basic and first time setup with ENC (see my earlier posts here<https://groups.google.com/forum/#!msg/puppet-users/eoq31kUHdlk/2bI1gLc5m5MJ>) I succeeded to propagate client data. Now when I revert back to the old site.pp style, everything broke loose. For ENC I had to change the puppet.conf to include "node_terminus" and "external_node" parameters, and had to comment them out when I go to site.ppstyle, but puppet just doesn''t let me do this anymore. I am using a template, e.g. " /etc/puppet/module/modulename/template/puppet.conf.erb" to populate puppet.conf in clients, but this doesn''t work anymore. If I manually change "/etc/puppet/puppet.conf" in a client machine, running puppet agent changes it back to the one where the lines "external_nodes" and "node_terminus" were defined. I don''t understand where is this ghost file that is overwriting puppet.conffor clients irrespective of what is defined in the puppet.conf.erb. The file resource type for puppet.conf looks like this. "puppet" is also a module name in /etc/puppet/modules. file { "/etc/puppet/puppet.conf" : ensure => present, content => template("puppet/puppet.conf.erb") owner => "puppet", group => "puppet", notify => Class["puppet::puppet_service"], require => Class["puppet::puppet_install"]; } Now if I run puppet agent on one of the clients, it complains with the following error and uses cached catalog. Warning: Unable to fetch my node definition, but the agent run will continue: Warning: Error 400 on SERVER: You must set the ''external_nodes'' parameter to use the external node terminus ... .... .... Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed when searching for node node_name: You must set the ''external_nodes'' parameter to use the external node terminus Notice: Using cached catalog Info: Applying configuration version ''1357861593'' Any help is appreciated. I am just lost at this moment with no clue. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/sIIbH85G7qgJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
jcbollinger
2013-Jan-11 14:35 UTC
[Puppet Users] Re: ghost overwriting puppet.conf (help!)
On Thursday, January 10, 2013 7:46:29 PM UTC-6, iamauser wrote:> > I am puzzled and banging my head on the wall since two hours. > > After doing some basic and first time setup with ENC (see my earlier posts > here<https://groups.google.com/forum/#!msg/puppet-users/eoq31kUHdlk/2bI1gLc5m5MJ>) > I succeeded to propagate client data. Now when I revert back to the old > site.pp style, everything broke loose. > > For ENC I had to change the puppet.conf to include "node_terminus" and > "external_node" parameters, and had to comment them out when I go to > site.pp style, but puppet just doesn''t let me do this anymore. >This is not a Puppet problem. Like any other program, Puppet reliably produces the same outputs when given the same inputs. Do note that only the master cares about ''node_terminus'' or ''external_node''. You must change these in the master''s puppet.conf, and you must restart the master for them to take effect.> > I am using a template, e.g. " > /etc/puppet/module/modulename/template/puppet.conf.erb" to populate > puppet.conf in clients, but this doesn''t work anymore. > > If I manually change "/etc/puppet/puppet.conf" in a client machine, > running puppet agent changes it back to the one where the lines > "external_nodes" and "node_terminus" were defined. > > I don''t understand where is this ghost file that is overwriting > puppet.conf for clients irrespective of what is defined in the > puppet.conf.erb. > > The file resource type for puppet.conf looks like this. "puppet" is also > a module name in /etc/puppet/modules. > > file { > "/etc/puppet/puppet.conf" : > ensure => present, > content => template("puppet/puppet.conf.erb") > owner => "puppet", > group => "puppet", > notify => Class["puppet::puppet_service"], > require => Class["puppet::puppet_install"]; > } > > > Now if I run puppet agent on one of the clients, it complains with the > following error and uses cached catalog. > > Warning: Unable to fetch my node definition, but the agent run will > continue: > Warning: Error 400 on SERVER: You must set the ''external_nodes'' parameter > to use the external node terminus > ... > .... > .... > Error: Could not retrieve catalog from remote server: Error 400 on SERVER: > Failed when searching for node node_name: You must set the ''external_nodes'' > parameter to use the external node terminus > Notice: Using cached catalog >That right there is why your clients are getting the old puppet.conf. You have somehow borked the master''s puppet.conf, and now it is not serving fresh catalogs. The agent is applying a cached catalog, and the agent is operating exactly as designed by managing puppet.conf to the state that the node''s (cached) catalog directs. If the master is also a Puppet client, then you would be well advised to shut down its puppet agent while you are trying to fix this, lest your fixes be clobbered. Before turning the agent back on, verify that the catalog the master receives will be appropriate for it. Also, be mindful in the future that configuration changes affecting the master''s operation generally require the master to be restarted before they take effect. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/ANAYKmUHyP0J. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.