[Puppet Users] Re: Changes to files
josbal schrieb: Hi Guys, Quick question about fileservering files with puppet. I understand that a puppet client re-runs its catalogue, when it knows that catalogue has changed from the last time it ran a check. Not entirely correct. The client applies the complete[1] catalogue everytime it runs. That includes checking all file resources against their source. [1] modulo schedules and --tags Regards, DavidS -- dasz.at OG Tel: +43 (0)664 2602670 Web: http://dasz.at Klosterneuburg UID: ATU64260999 FB-Nr.: FN 309285 g FB-Gericht: LG Korneuburg --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~--~~~~--~~--~--~---
[Puppet Users] Re: Changes to files
josbal schrieb: Hi Guys, Quick question about fileservering files with puppet. I understand that a puppet client re-runs its catalogue, when it knows that catalogue has changed from the last time it ran a check. Not entirely correct. The client applies the complete[1] catalogue everytime it runs. That includes checking all file resources against their source. The other question is whether or not the server generates a new catalogue or re-uses the old one. If you are using the source parameter to transmit the file, it doesn't matter, since the contents are not transmittet wirhin the catalogue. If you are using content with a function like file(), template() or generate(), I don't know how puppet would react. Anyone else has an idea here? [1] modulo schedules and --tags Regards, DavidS -- dasz.at OG Tel: +43 (0)664 2602670 Web: http://dasz.at Klosterneuburg UID: ATU64260999 FB-Nr.: FN 309285 g FB-Gericht: LG Korneuburg --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~--~~~~--~~--~--~---
[Puppet Users] Re: Changes to files
Hi David, Thanks for your response. So if i am using source for my file, will it be downloaded everytime regardless of whether the file already exists on the client, or will it only download it if the file doesn't exist on the client. Or does it use md5 to compare the file and only download if it is different? Cheers, Josh --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~--~~~~--~~--~--~---
[Puppet Users] Re: Changes to files
josbal schrieb: Hi David, Thanks for your response. So if i am using source for my file, will it be downloaded everytime regardless of whether the file already exists on the client, or will it only download it if the file doesn't exist on the client. Or does it use md5 to compare the file and only download if it is different? This depends on the other parameters of this file resource. See http://reductivelabs.com/trac/puppet/wiki/TypeReference#file for details. Specifically the checksum parameter. Regards, DavidS -- dasz.at OG Tel: +43 (0)664 2602670 Web: http://dasz.at Klosterneuburg UID: ATU64260999 FB-Nr.: FN 309285 g FB-Gericht: LG Korneuburg --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~--~~~~--~~--~--~---
[Puppet Users] Forwarding a big binary file is slow.
I tried to forward the war file of 24MB from fileserver of puppet to the client. However, it very took time to do it, and, after all, the client side became a time-out error. I think that I see the source of puppet, and understood the cause. Because fileserver does the content of the file in URL Encode when the file is forwarded. (puppet/network/handler/filserver.rb:204) if @local return str else return CGI.escape(str) end It takes time of three minutes over in my server for this processing. I do not understand why such processing is done. I want you to teach the method in which someone is good to solve this problem. (Version used is 0.24.5) --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~--~~~~--~~--~--~---
[Puppet Users] Re: Specifying nodes by type
Brad wrote: On Jun 4, 8:27 pm, Brad schi...@gmail.com wrote: I'm working on a real fact by following these steps: http://reductivelabs.com/trac/puppet/wiki/AddingFacts I verified that the custom fact works when run locally on the server. On the client when I run: puppetd --server hostname --test --factsync I see the custom fact being retrieved and stored in /var/lib/puppet/ facts on the client. But the custom fact does not seem to run and the value is not sent to the server. Ok, it looks like that link above is old information. It would be nice if that was mentioned at the *top* of that text rather than the bottom. I followed this instead: http://reductivelabs.com/trac/puppet/wiki/PluginsInModules And everything is works as expected. The page does say - three lines down from the top: You can add new facts by writing a snippet of ruby code. Puppet uses the Plugins InModules approach to distribute these facts to your hosts. But yes it was a little confusing. I've edited the page to make it easier to understand. Please let me know if that has helped. The wiki is also open to be edited. Please feel free to create a login and update the documentation if you would prefer. Regards James Turnbull -- Author of: * Pro Linux Systems Administration (http://tinyurl.com/linuxadmin) * Pulling Strings with Puppet (http://tinyurl.com/pupbook) * Pro Nagios 2.0 (http://tinyurl.com/pronagios) * Hardening Linux (http://tinyurl.com/hardeninglinux) signature.asc Description: OpenPGP digital signature
[Puppet Users] Puppetmasterd looses contact with the mysql database (using storeconfigs)
Hi All I've just bootstrapped my new, shining puppet setup (replacing an 2,5 year old, messy one), with (almost) all the bells and whistles: A Passenger-based setup with storeconfigs enabled. For a start I've only got three node definitions; two specific ones and node default. The default one doesn't do anything yet, and only one of the specific nodes has actual classes enabled. Now, when I startup mysql and puppetmasterd, the first one or two runs of puppetd on the client is fine. Puppetmasterd stores the configs, but suddenly (and this is with only one host contacting the puppetmaster) the log says: Could not store configs: Mysql::Error: MySQL server has gone away: SELECT * FROM `hosts` WHERE (`hosts`.`name` = 'web01.mydomain.com') LIMIT 1 At first I thought it was MySQL drowning, but I've found that a restart of puppetmasterd (with /etc/init.d/apache2 restart, as it run through Passenger) fixes the problem - but only temporarily. Next time a host contacts the puppetmaster, I get the error stated above. :- ( And it fails until I restart puppetmaster again. I have the following optimizations in my passenger configuration (cut from Nigel Kerstens mails about his Passengerbased setup): PassengerLogLevel 1 PassengerMaxRequests 3000 PassengerMaxPoolSize 15 PassengerStatThrottleRate 600 I've also tried to optimize the MySQL configuration, but as a restart of Apache/Passenger solves the problem (for one clientrun), I don't think that the problem lies with MySQL. Do any of you have a clue of what can be wrong here? -- Med venlig hilsen/Best regards Juri Rischel Jensen Fab:IT ApS Vesterbrogade 50 DK-1620 København Tlf: +45 70 202 407 www.fab-it.dk --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~--~~~~--~~--~--~---
[Puppet Users] Re: does puppet+augeas actually work? limits.conf busticated
David Lutterkort wrote: On Wed, 2009-06-03 at 12:56 -0700, Gajillion wrote: All, I've tried several lenses and several iterations and have never been able to get augeas and puppet to work together. My latest attempt: augeas {memlock: changes = [ ins domain after /files/etc/security/limits.conf/domain [last()], set /files/etc/security/limits.conf/domain[last()]/ *, I bet the problem is the trailing '/' - Augeas' XPath syntax doesn't allow that. The reason this works in augtool is that augtool will be helpful and clean up the path you entered and remove the trailing slash. The Puppet Augeas type does not - but it also does not check the return value of Augeas.set; the next set in your changes creates an domain node with no value, which is what save ultimately chokes on. Clearly, we need better error checking/reporting ... I will put in a ticket. -- bk --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~--~~~~--~~--~--~---
[Puppet Users] Re: does puppet+augeas actually work? limits.conf busticated
That didn't work either: debug: Augeas[memlock](provider=augeas): sending command 'ins' with params [domain, after, /files/etc/security/limits.conf/files/etc/ security/limits.conf/domain[last()]] debug: Augeas[memlock](provider=augeas): sending command 'set' with params [/files/etc/security/limits.conf/files/etc/security/ limits.conf/domain[last()], *] debug: Augeas[memlock](provider=augeas): sending command 'set' with params [/files/etc/security/limits.conf/files/etc/security/ limits.conf/domain[last()]/type, hard] debug: Augeas[memlock](provider=augeas): sending command 'set' with params [/files/etc/security/limits.conf/files/etc/security/ limits.conf/domain[last()]/item, memlock] debug: Augeas[memlock](provider=augeas): sending command 'set' with params [/files/etc/security/limits.conf/files/etc/security/ limits.conf/domain[last()]/value, unlimited] err: //Node[buildtest]/wombat::setup/Augeas[memlock]/returns: change from need_to_run to 0 failed: Save failed with return code false On Jun 4, 7:00 pm, David Lutterkort lut...@redhat.com wrote: On Wed, 2009-06-03 at 12:56 -0700, Gajillion wrote: All, I've tried several lenses and several iterations and have never been able to get augeas and puppet to work together. My latest attempt: augeas {memlock: changes = [ ins domain after /files/etc/security/limits.conf/domain [last()], set /files/etc/security/limits.conf/domain[last()]/ *, I bet the problem is the trailing '/' - Augeas' XPath syntax doesn't allow that. The reason this works in augtool is that augtool will be helpful and clean up the path you entered and remove the trailing slash. The Puppet Augeas type does not - but it also does not check the return value of Augeas.set; the next set in your changes creates an domain node with no value, which is what save ultimately chokes on. Clearly, we need better error checking/reporting ... David --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~--~~~~--~~--~--~---
[Puppet Users] Re: Environment variable access inside an exec
You could also use augeas to manage those options. On Thu, Jun 4, 2009 at 7:12 PM, Mike Renfro ren...@tntech.edu wrote: On 6/4/2009 5:59 PM, Brandon Whalen wrote: I've spent some time looking at the example recipes and reading the docs on a problem, but I'm still stumped. I'm trying to add some options to my fstab and am finding some problems. I'm using the environment option to create an environment variable MNT_OPTS that I then reference as part of a sed call. I'm finding that MNT_OPTS is empty when I reference it. My exact code is below. Unless you're specifically trying to add options to whatever /home entry already exists, you might want to use the builtin mount type. I know you can use it to specify all the mount options, but I'm not sure if you can use the '+' operator to add options to whatever exists. http://reductivelabs.com/trac/puppet/wiki/TypeReference#mount -- Mike Renfro / RD Engineer, Center for Manufacturing Research, 931 372-3601 / Tennessee Technological University --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~--~~~~--~~--~--~---
[Puppet Users] Re: does puppet+augeas actually work? limits.conf busticated
On Fri, 2009-06-05 at 06:02 -0700, Gajillion wrote: That didn't work either: And I was so convinced it would ;) debug: Augeas[memlock](provider=augeas): sending command 'ins' with params [domain, after, /files/etc/security/limits.conf/files/etc/ security/limits.conf/domain[last()]] Do you have both a context set and use an absolute path in your changes now ? The prefix /files/etc/security/limits.conf is duplicated in the paths - if that still doesn't fix it, can you send the whole limits.conf file and the augeas resource you use in your manifest ? David --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~--~~~~--~~--~--~---
[Puppet Users] Re: does puppet+augeas actually work? limits.conf busticated
Solution! I owe everyone a big thanks and big apology. It turns out that rpm -e ruby doesn't really rpm -e ruby... Pretty much everything in /usr/lib/ ruby and /usr/lib64/ruby stayed in place when I did that, so when I upgraded ruby and puppet from 0.24.5 to 0.24.8 and ruby from 1.8.1 to 1.8.6, it just overlayed the 1.8.6 files on top of the 1.8.1 instead of removing a bunch of stuff that it should have. In effect, I was really still running puppet 0.24.5 despite the fact that it reported itself as 0.24.8. I removed all the rpms, deleted /usr/lib/ruby and / usr/lib64/ruby and reinstalled and it works as advertised. And David - you were right. It does fail with the trailing slash :) Thanks again, Mark On Jun 5, 12:56 pm, David Lutterkort lut...@redhat.com wrote: On Fri, 2009-06-05 at 06:02 -0700, Gajillion wrote: That didn't work either: And I was so convinced it would ;) debug: Augeas[memlock](provider=augeas): sending command 'ins' with params [domain, after, /files/etc/security/limits.conf/files/etc/ security/limits.conf/domain[last()]] Do you have both a context set and use an absolute path in your changes now ? The prefix /files/etc/security/limits.conf is duplicated in the paths - if that still doesn't fix it, can you send the whole limits.conf file and the augeas resource you use in your manifest ? David --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~--~~~~--~~--~--~---
[Puppet Users] Re: Cert
Did anyone find out what was causing this ? Thanks, Alex D. On May 20, 12:18 pm, Luke Kanies l...@madstop.com wrote: On May 19, 2009, at 8:07 PM, Drew Morone wrote: Having a problem with cert negotiation between client and server. client: CentOS 4.4 2.6.9 kernel ruby 1.8.1-7 puppet 0.24.8 Server: Debian 4 2.6.9 kernel ruby 1.8.7 0.24.8-1 Client: Launch puppetd with -w30 Server: puppetca --list shows client server. I puppetca --sign it. Then on the client, I get this: notice: Got signed certificate notice: Starting Puppet client version 0.24.8 debug: Loaded state in 0.03 seconds debug: Retrieved facts in 0.81 seconds debug: Retrieving catalog debug: Calling puppetmaster.getconfig warning: Certificate validation failed; consider using the certname configuration option err: Could not retrieve catalog: Certificates were not trusted: certificate verify failed I've checked the time on both servers. they are the same. I've checked the cert on both servers w/ openssl verify. they are good. Any ideas? Which certificate did you check on the client, and how did you do it? It *might* be the fact that your client is using ruby 1.8.1, but I doubt it. -- Life isn't fair. It's just fairer than death, that's all. -- William Goldman - Luke Kanies |http://reductivelabs.com|http://madstop.com --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~--~~~~--~~--~--~---
[Puppet Users] Re: Cert
Actually, the problem was solved once the hostnames are the same as the cert names. On May 20, 12:18 pm, Luke Kanies l...@madstop.com wrote: On May 19, 2009, at 8:07 PM, Drew Morone wrote: Having a problem with cert negotiation between client and server. client: CentOS 4.4 2.6.9 kernel ruby 1.8.1-7 puppet 0.24.8 Server: Debian 4 2.6.9 kernel ruby 1.8.7 0.24.8-1 Client: Launch puppetd with -w30 Server: puppetca --list shows client server. I puppetca --sign it. Then on the client, I get this: notice: Got signed certificate notice: Starting Puppet client version 0.24.8 debug: Loaded state in 0.03 seconds debug: Retrieved facts in 0.81 seconds debug: Retrieving catalog debug: Calling puppetmaster.getconfig warning: Certificate validation failed; consider using the certname configuration option err: Could not retrieve catalog: Certificates were not trusted: certificate verify failed I've checked the time on both servers. they are the same. I've checked the cert on both servers w/ openssl verify. they are good. Any ideas? Which certificate did you check on the client, and how did you do it? It *might* be the fact that your client is using ruby 1.8.1, but I doubt it. -- Life isn't fair. It's just fairer than death, that's all. -- William Goldman - Luke Kanies |http://reductivelabs.com|http://madstop.com --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~--~~~~--~~--~--~---
[Puppet Users] templates with ERB
So I have been doing some testing of content = template. Our site has used a custom solution for configuration management w/ a mix of rsync/m4/make and a little cfengine on the side. Now for us the power of m4 is that not only you can do variable substitution but it can include files. I am looking to be able to include files within a template w/ ERB but from the documentation that does not seem possible. Or even if it is possible to have a numter of templates listed in my content= that would be concatenated? Anyone else trying to do this or have done this? -- --- Derek T. Yarnell --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~--~~~~--~~--~--~---
[Puppet Users] templates, ERB include, import or whatever
So I have been doing some testing of content = template. Our site has used a custom solution for configuration management w/ a mix of rsync/m4/make and a little cfengine on the side. Now for us the power of m4 is that not only you can do variable substitution but it can include files. I am looking to be able to include files within a template w/ ERB but from the documentation that does not seem possible. Or even if it is possible to have a numter of templates listed in my content= that would be concatenated? Anyone else trying to do this or have done this? -- --- Derek T. Yarnell --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~--~~~~--~~--~--~---
[Puppet Users] Re: templates, ERB include, import or whatever
Am 05.06.2009 um 19:57 schrieb Derek Yarnell: So I have been doing some testing of content = template. Our site has used a custom solution for configuration management w/ a mix of rsync/m4/make and a little cfengine on the side. Now for us the power of m4 is that not only you can do variable substitution but it can include files. I am looking to be able to include files within a template w/ ERB but from the documentation that does not seem possible. Or even if it is possible to have a numter of templates listed in my content= that would be concatenated? Anyone else trying to do this or have done this? IIRC (and please do cross-check with the wiki/docu to make sure), the content attribute takes a string, whatever it is. template() is a puppet function that returns a string, which is a suitable content for the content attribute (sic). If you just want to concatenate a certain set of templates regardless of any logic, that would be a way to go. Regarding the erb templates and the possibility to include other files/ templates: rails does it, so it's possible, but I can't say if it's rails' or erb's doing. BR, Felix --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~--~~~~--~~--~--~---
[Puppet Users] Re: templates with ERB
content = template(one,two,three); I think is what will work for concatenation. http://projects.reductivelabs.com/issues/1818 Read Luke's comment at the bottom. in 0.24.8 lib/puppet/parser/functions/inline_template.rb:if multiple template strings are specified, their output is all concatenated lib/puppet/parser/functions/template.rb:if multiple templates are specified, their output is all concatenated Details here: http://reductivelabs.com/trac/puppet/wiki/PuppetTemplating -Jason So I have been doing some testing of content = template. Our site has used a custom solution for configuration management w/ a mix of rsync/m4/make and a little cfengine on the side. Now for us the power of m4 is that not only you can do variable substitution but it can include files. I am looking to be able to include files within a template w/ ERB but from the documentation that does not seem possible. Or even if it is possible to have a numter of templates listed in my content= that would be concatenated? Anyone else trying to do this or have done this? -- --- Derek T. Yarnell --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~--~~~~--~~--~--~---