Hi all, Can anyone tell me what config setting generates the yaml output in / var/lib/puppet/yaml/node? I''m getting output in /var/lib/puppet/yaml/facts but not node. This is puppet v3.rc2 and I''ve specified report = true all over the place but nothing is being produced (except of course in /var/lib/ puppet/reports as you''d expect). Cheers, Den -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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.
Think I might be already answering my own question but it appears that this is a change in v3 - have downgraded to v2.7 and it appears. However I did find this while grep''ing through the source code of v3, puppet node find node2.mylocal --terminus plain --render-as yaml It appears very similar in output but haven''t diff''d against it. Den On Jun 4, 8:35 pm, denmat <tu2bg...@gmail.com> wrote:> Hi all, > > Can anyone tell me what config setting generates the yaml output in / > var/lib/puppet/yaml/node? > > I''m getting output in /var/lib/puppet/yaml/facts but not node. > > This is puppet v3.rc2 and I''ve specified report = true all over the > place but nothing is being produced (except of course in /var/lib/ > puppet/reports as you''d expect). > > Cheers, > Den-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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.
On Mon, Jun 4, 2012 at 3:48 AM, denmat <tu2bgone@gmail.com> wrote:> Think I might be already answering my own question but it appears that > this is a change in v3 - have downgraded to v2.7 and it appears.In Puppet 2.7 this is handled by the save method called on the node instance of Puppet::Node::Yaml which is a subclass of Puppet::Indirector::Yaml. The method that actually writes the node cache file to disk is implemented in the Puppet::Indirector::Yaml class here: https://github.com/puppetlabs/puppet/blob/master/lib/puppet/indirector/yaml.rb#L41-47 This save method is called on the master before the catalog is returned to the agent. I''m not sure why we''re not writing this node cache in Puppet 3.x, but it may be a performance optimization because this is a synchronous write operation called in line while the agent is blocked waiting for a catalog to be returned. What are you trying to do with the node cache? Perhaps there''s another approach in Puppet 3.x. For more detail, here''s the point where the node cache is written to disk in Puppet 2.7. As you can see, this is happening in-line with the HTTP request so it''s a bit of a performance concern for us. --> #0 Puppet::Indirector::Yaml.save(request#Puppet::Indirector::R...) at line /vagrant/src/puppet/lib/puppet/indirector/yaml.rb:34 #1 Puppet::Indirector::Indirection.expire(key#String) at line /vagrant/src/puppet/lib/puppet/indirector/indirection.rb:182 #2 Puppet::Node::Facts::NodeExpirer.save(instance#Puppet::Node::Facts, key#NilClass,...) at line /vagrant/src/puppet/lib/puppet/node/facts.rb:19 #3 Puppet::Resource::Catalog::Compiler.extract_facts_from_request(request#Puppet::Indirector::R...,...) at line /vagrant/src/puppet/lib/puppet/indirector/catalog/compiler.rb:26 #4 Puppet::Resource::Catalog::Compiler.find(request#Puppet::Indirector::R...) at line /vagrant/src/puppet/lib/puppet/indirector/catalog/compiler.rb:31 #5 Puppet::Indirector::Indirection.find at line /vagrant/src/puppet/lib/puppet/indirector/indirection.rb:196 #6 Puppet::Network::HTTP::Handler.do_find(indirection_name#String, key#String, params#Hash,...) at line /vagrant/src/puppet/lib/puppet/network/http/handler.rb:109 #7 Kernel.send(request#WEBrick::HTTPRequest, response#WEBrick::HTTPResponse, indirection#String,...) at line /vagrant/src/puppet/lib/puppet/network/http/handler.rb:68 #8 Puppet::Network::HTTP::Handler.to_s(request#WEBrick::HTTPRequest, response#WEBrick::HTTPResponse,...) at line /vagrant/src/puppet/lib/puppet/network/http/handler.rb:68 #9 Puppet::Network::HTTP::WEBrickREST.service(request#WEBrick::HTTPRequest, response#WEBrick::HTTPResponse,...) at line /vagrant/src/puppet/lib/puppet/network/http/webrick/rest.rb:24 #10 WEBrick::HTTPServer.service(req#WEBrick::HTTPRequest, res#WEBrick::HTTPResponse,...) at line /Users/jeff/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/webrick/httpserver.rb:104 #11 WEBrick::HTTPServer.run(sock#OpenSSL::SSL::SSLSocket) at line /Users/jeff/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/webrick/httpserver.rb:65 #12 Proc.listen(sock#OpenSSL::SSL::SSLSocket) at line /vagrant/src/puppet/lib/puppet/network/http/webrick.rb:45 #13 WEBrick::GenericServer.start_thread(sock#OpenSSL::SSL::SSLSocket) at line /Users/jeff/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/webrick/server.rb:173 Cheers, -Jeff -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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.
Thanks Jeff, Cucumber-puppet uses those files as input for testing. That''s the only reason I noticed. So in this case, if I can use the puppet node find command I can populate the yaml directories for cucumber. On Tue, Jun 5, 2012 at 3:17 AM, Jeff McCune <jeff@puppetlabs.com> wrote:> On Mon, Jun 4, 2012 at 3:48 AM, denmat <tu2bgone@gmail.com> wrote: >> Think I might be already answering my own question but it appears that >> this is a change in v3 - have downgraded to v2.7 and it appears. > > In Puppet 2.7 this is handled by the save method called on the node > instance of Puppet::Node::Yaml which is a subclass of > Puppet::Indirector::Yaml. > > The method that actually writes the node cache file to disk is > implemented in the Puppet::Indirector::Yaml class here: > > https://github.com/puppetlabs/puppet/blob/master/lib/puppet/indirector/yaml.rb#L41-47 > > This save method is called on the master before the catalog is > returned to the agent. > > I''m not sure why we''re not writing this node cache in Puppet 3.x, but > it may be a performance optimization because this is a synchronous > write operation called in line while the agent is blocked waiting for > a catalog to be returned. > > What are you trying to do with the node cache? Perhaps there''s > another approach in Puppet 3.x. > > For more detail, here''s the point where the node cache is written to > disk in Puppet 2.7. As you can see, this is happening in-line with > the HTTP request so it''s a bit of a performance concern for us. > > --> #0 Puppet::Indirector::Yaml.save(request#Puppet::Indirector::R...) > at line /vagrant/src/puppet/lib/puppet/indirector/yaml.rb:34 > #1 Puppet::Indirector::Indirection.expire(key#String) > at line /vagrant/src/puppet/lib/puppet/indirector/indirection.rb:182 > #2 Puppet::Node::Facts::NodeExpirer.save(instance#Puppet::Node::Facts, > key#NilClass,...) > at line /vagrant/src/puppet/lib/puppet/node/facts.rb:19 > #3 Puppet::Resource::Catalog::Compiler.extract_facts_from_request(request#Puppet::Indirector::R...,...) > at line /vagrant/src/puppet/lib/puppet/indirector/catalog/compiler.rb:26 > #4 Puppet::Resource::Catalog::Compiler.find(request#Puppet::Indirector::R...) > at line /vagrant/src/puppet/lib/puppet/indirector/catalog/compiler.rb:31 > #5 Puppet::Indirector::Indirection.find > at line /vagrant/src/puppet/lib/puppet/indirector/indirection.rb:196 > #6 Puppet::Network::HTTP::Handler.do_find(indirection_name#String, > key#String, params#Hash,...) > at line /vagrant/src/puppet/lib/puppet/network/http/handler.rb:109 > #7 Kernel.send(request#WEBrick::HTTPRequest, > response#WEBrick::HTTPResponse, indirection#String,...) > at line /vagrant/src/puppet/lib/puppet/network/http/handler.rb:68 > #8 Puppet::Network::HTTP::Handler.to_s(request#WEBrick::HTTPRequest, > response#WEBrick::HTTPResponse,...) > at line /vagrant/src/puppet/lib/puppet/network/http/handler.rb:68 > #9 Puppet::Network::HTTP::WEBrickREST.service(request#WEBrick::HTTPRequest, > response#WEBrick::HTTPResponse,...) > at line /vagrant/src/puppet/lib/puppet/network/http/webrick/rest.rb:24 > #10 WEBrick::HTTPServer.service(req#WEBrick::HTTPRequest, > res#WEBrick::HTTPResponse,...) > at line /Users/jeff/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/webrick/httpserver.rb:104 > #11 WEBrick::HTTPServer.run(sock#OpenSSL::SSL::SSLSocket) > at line /Users/jeff/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/webrick/httpserver.rb:65 > #12 Proc.listen(sock#OpenSSL::SSL::SSLSocket) > at line /vagrant/src/puppet/lib/puppet/network/http/webrick.rb:45 > #13 WEBrick::GenericServer.start_thread(sock#OpenSSL::SSL::SSLSocket) > at line /Users/jeff/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/webrick/server.rb:173 > > Cheers, > -Jeff > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > 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. >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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.