Re: [Puppet Users] Puppet not picking up new configs
On 21/11/2011, at 15:20, Michal Ludvig mlud...@logix.net.nz wrote: On 11/21/2011 04:46 PM, Denmat wrote: Hi, Puppetmasterd uses the webrick web server which is meant really for development only. Once you get over a number of nodes you see these issue. Check the puppetlabs docs on scaling for your options. As I've got only 12 nodes in this project I don't think I ran into a scaling issue yet.. Yeah, 12 isn't big but the webrick isnt built to handle many (single threaded I believe), especially if they are reporting in at the same time. I only had a handful before setting up passenger/apache. The other issue you are seeing is due to caching. I know this was a recently looked into but I can't remember if it was addressed and in which version (most likely 2.7.x). You can query the project page for current tickets. I can't find anything relevant among the recent ca 2 months of tickets. Any more specific pointers plz? http://projects.puppetlabs.com/issues/8750 Thanks Michal Cheers, Den On 21/11/2011, at 11:08, Michal Ludvigmlud...@logix.net.nz wrote: Hi all, I've got a Puppet 2.6.8 setup on RHEL 5.6 with nodes.pp containing a simple import nodes/*.pp and per-node configs in nodes/hostname.pp Occasionally puppet master misses new nodes' files, simply ignores them and the subsequent puppet agent run on the node fails with Could not find default node or by name with All that is needed in such a case is /etc/init.d/puppetmaster restart but it's clearly not an optimal fix. It doesn't happen all the time, in most cases the new node's file is correctly recognised, but in the last case the file was sitting there for 4 days unnoticed and only after puppetmaster restart it was read in. Any idea what's causing it? Is there anything we can do to prevent this from happening again and again? Thanks! Michal -- 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. -- 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. -- 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.
Re: [Puppet Users] Re: Multiple nodes.pp files
Yes, big difference. The 'import' function will literally add the contents of a manifest file into where your import statement is, it's like a 'include woof.h' in C/C++ or source /etc/sysconfig/woof in Bash. It should really never be used anywhere outside of site.pp to add classes and functions but rather with Puppet's class autoloading functionality. When you import something Puppet will search your modules for a class of the given name, see here for examples of how the class name or custom define (they autoload the same way): http://docs.puppetlabs.com/guides/modules.html#module-autoloading Some more differences: if you were to be silly and import a manifest file with a class definition in it, say import modules/woof/manifests/init.pp, that doesn't declare the class on a node (it doesn't turn it on). You can include a class multiple times, this is nice for handling loose overlapping dependencies between modules. If you import a file multiple times it will be added to the catalog compilation multiple times and most likely give you a lot of errors about things having multiple declarations. So: import path/to/a/file.pp include some_class::that_i_defined::correctly HTH, -Luke On 19/11/11 12:36, Hugo Deprez wrote: Thank you Ramin, I used import nodes/*.pp this is exactly what I wanted. I am quite confuse about the difference between import and include (used for a module). is there a real difference ? Regards, Hugo On 17 November 2011 21:04, Ramin Kramin.khat...@gmail.com wrote: Tech documentation is littered with examples that illustrate exactly one thing and call it day. 99% of the power of any system comes from learning to combine multiple functions. I chose that example because it illustrates regex, using regex in a node as well as case statements, adding classes based on case statements, setting a default in a case statement, and should have the OP considering that Puppet can do more then 1:1 mapping. Getting past the 1:1 mapping idea seems to take most traditional sysadmins or non CS types longer. Simply, demonstrating possibilities was more important than least keystrokes. Also my example avoids first match problems. Yours does as well assuming it was clear that the first statement *had* to be first. That is probably the number #2 mistake of documentation, illustrating a concept without exploring the assumptions of the example. Ramin On Nov 17, 10:47 am, Jo Rhettjrh...@netconsonance.com wrote: On Nov 16, 2011, at 11:08 AM, Ramin K wrote: You can also use regex in your node files to further simplify though if you're doing a lot of logic here you should probably start thinking about an ENC. fe.pp node /^fe\d+(.*)/ inherits basenode { case $::fqdn { /(.*)stage|demo(.*)/: { include hostgroup::frontend::stage } default: { include hostgroup::frontend::prod } } } Ramin, curious as to how this differs from the shorter …? node /^fe\d+(.*)(stage|demo)(.*)/ inherits basenode { include hostgroup::frontend::stage} node /^fe\d+(.*)/ inherits basenode { include hostgroup::frontend::prod } I love regexs too, but that seems to be excessive syntax. (and FYI, you forgot parens around the | …) -- Jo Rhett Net Consonance : consonant endings by net philanthropy, open source and other randomness -- 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. -- Luke Bigum Information Systems +44 (0) 20 3192 2520 luke.bi...@lmax.com | http://www.lmax.com LMAX, Yellow Building, 1A Nicholas Road, London W11 4AN The information in this e-mail and any attachment is confidential and is intended only for the named recipient(s). The e-mail may not be disclosed or used by any person other than the addressee, nor may it be copied in any way. If you are not a named recipient please notify the sender immediately and delete any copies of this message. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Any view or opinions presented are solely those of the author and do not necessarily represent those of the company. -- 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.
Re: [Puppet Users] Escaping Quotes
exec { 'oracle-extract-part': command = /usr/bin/printf \n\np\n2\n2091\n+16384M\nw\n\ | /sbin/fdisk /dev/xvdj, unless = /bin/cat /proc/partitions | /bin/grep ${orcl_ephm_device}2; } if you don't need to interpolate a variable, you can simply use single quotes, so you don't need to escape anything. grrr ~pete -- 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.
Re: [Puppet Users] Escaping Quotes
On 11/21/2011 01:30 AM, Douglas Garstang wrote: Grrr. I have the exec{} below in my puppet module. How do I escape the \ characters? I've tried every possible combination I can think of. I've used one, I've used two, and I've used THREE \. exec { 'oracle-extract-part': command = /usr/bin/printf \n\np\n2\n2091\n+16384M\nw\n\ | /sbin/fdisk /dev/xvdj, unless = /bin/cat /proc/partitions | /bin/grep ${orcl_ephm_device}2; } Sounds like you need to use FOUR. Say you wanted to use printf to print a newline. You would run this: (1) printf \n But, the backslash has special meaning in bash (or most shells). If you type that in bash, you have to escape it, one of these ways: (2) printf \\n (3) printf '\n' Puppet runs commands through a shell. So, you will have to apply escaping appropriate for whatever shell is in use. But, the command is also in a string. Backslashes have special meaning in puppet strings. So, we know the command we want to give to bash is: (4) printf \\n To put that in a puppet string we need to escape the \: (5) printf n If you don't like all the backslashes, you could give single quotes to bash: (6) printf '\\n' This is example 3, quoted with puppet's rules. You could also use single quotes in Puppet, but Puppet's single-quote strings still find special meaning in \, so it doesn't really get you anything, and if you are using single quotes for bash it's actually worse. You'd need this: (7) 'printf \'\\n\'' Given (7), puppet will give (8) to bash: (8) printf '\n' and bash will give to exec(): (9) printf \n Make sense? -- 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: Foreman API, problem when creating hostgroups
On Nov 21, 8:29 am, Ohad Levy ohadl...@gmail.com wrote: CC foreman users list. 2011/11/20 Poul Sørensen poulhsoren...@gmail.com: I am trying to create a hostgroup using the Foreman API POST /hostgroups {name:api-created-hostgroup,...,puppetmaster:puppet.dev.somewhere.com,...} which returns a 422-error Failed to save: Name can't be blank or contain trailing white spaces. it looks like you are missing the hostgroup parameter hash, afair, if you look at the look, all attributes are values of the key hostgroup. Wrapping the request-body as { hostgroup = $body } surely solved the problem. For some reason, I've missed it in the doc, where it actually is very clear http://theforeman.org/projects/foreman/wiki/API btw: 0.4. has been released and has a lot of enchantments in the api area, might worth upgrading. System upgraded earlier today... Thanks for a swift response! regards Poul -- 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.
Re: [Puppet Users] Dashboard not working (406 Not Acceptable)
Anybody? Any ideas? Thanks again On Sun, Nov 13, 2011 at 2:45 PM, Galed Friedmann galed.friedm...@onavo.comwrote: Hi all, I've created a replication of my puppet environment in order to set it up in a new location. I've created an exact replication of my master server which is running the puppet master, dashboard server, and mysql. Everything is working fine except for the dashboard. The master is configured to send reports to dashboard and indeed is sending them, but looking at production.log in dashboard I see this: Processing ReportsController#upload (for 127.0.0.1 at 2011-11-13 12:43:26) [POST] Parameters: {action=upload, controller=reports} Completed in 1ms (View: 0, DB: 0) | 406 Not Acceptable [ http://localhost/reports/upload] For every attempt of the master to send a report. This is a working configuration so I guess I missed something when I changed the setting of the new server, any idea what might be wrong here? puppet master configuration: [master] storeconfigs = true dbadapter = mysql dbuser = ... dbpassword = ... dbserver = localhost dbsocket = /var/run/mysqld/mysqld.sock reports = store, http reporturl = http://localhost:3000/reports/upload Thanks! -- 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/-/mGPKjqlxWY0J. 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. -- 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.
Re: [Puppet Users] Escaping Quotes
How about using the alternate single quotes in ruby %q{string string string} Max On 11/21/11, Phil Frost ind...@bitglue.com wrote: On 11/21/2011 01:30 AM, Douglas Garstang wrote: Grrr. I have the exec{} below in my puppet module. How do I escape the \ characters? I've tried every possible combination I can think of. I've used one, I've used two, and I've used THREE \. exec { 'oracle-extract-part': command = /usr/bin/printf \n\np\n2\n2091\n+16384M\nw\n\ | /sbin/fdisk /dev/xvdj, unless = /bin/cat /proc/partitions | /bin/grep ${orcl_ephm_device}2; } Sounds like you need to use FOUR. Say you wanted to use printf to print a newline. You would run this: (1) printf \n But, the backslash has special meaning in bash (or most shells). If you type that in bash, you have to escape it, one of these ways: (2) printf \\n (3) printf '\n' Puppet runs commands through a shell. So, you will have to apply escaping appropriate for whatever shell is in use. But, the command is also in a string. Backslashes have special meaning in puppet strings. So, we know the command we want to give to bash is: (4) printf \\n To put that in a puppet string we need to escape the \: (5) printf n If you don't like all the backslashes, you could give single quotes to bash: (6) printf '\\n' This is example 3, quoted with puppet's rules. You could also use single quotes in Puppet, but Puppet's single-quote strings still find special meaning in \, so it doesn't really get you anything, and if you are using single quotes for bash it's actually worse. You'd need this: (7) 'printf \'\\n\'' Given (7), puppet will give (8) to bash: (8) printf '\n' and bash will give to exec(): (9) printf \n Make sense? -- 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. -- 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.
Re: [Puppet Users] Escaping Quotes
Zitat von Max Schubert max.schub...@gmail.com: How about using the alternate single quotes in ruby %q{string string string} puppet manifests are not ruby code. ~pete -- 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.
AW: [Puppet Users] Dashboard not working (406 Not Acceptable)
Just an idea: Seems, Puppet is using the URL http://localhost/reports/upload though you have specified 'reporturl = http://localhost:3000/reports/upload'. Is it possible that there is some command line argument overriding your puppet.conf? However I don't use the 'reporturl' argument at all. This is my configuration: 41 [master] 42 user = puppet 43 group = puppet 44 reports = puppet_dashboard 45 storeconfigs = true 46 dbadapter = mysql 47 dbuser = puppet 48 dbpassword = xxx 49 dbserver = localhost 50 dbsocket = /var/lib/mysql/mysql.sock 51 52 [agent] 53 server = my.derver.net 54 environment=loc_b_build 55 debug = true 56 verbose = true 57 runintervall = 600 58 report = true Bernd Von: puppet-users@googlegroups.com [mailto:puppet-users@googlegroups.com] Im Auftrag von Galed Friedmann Gesendet: Montag, 21. November 2011 14:13 An: puppet-users@googlegroups.com Betreff: Re: [Puppet Users] Dashboard not working (406 Not Acceptable) Anybody? Any ideas? Thanks again On Sun, Nov 13, 2011 at 2:45 PM, Galed Friedmann galed.friedm...@onavo.com wrote: Hi all, I've created a replication of my puppet environment in order to set it up in a new location. I've created an exact replication of my master server which is running the puppet master, dashboard server, and mysql. Everything is working fine except for the dashboard. The master is configured to send reports to dashboard and indeed is sending them, but looking at production.log in dashboard I see this: Processing ReportsController#upload (for 127.0.0.1 at 2011-11-13 12:43:26) [POST] Parameters: {action=upload, controller=reports} Completed in 1ms (View: 0, DB: 0) | 406 Not Acceptable [http://localhost/reports/upload] For every attempt of the master to send a report. This is a working configuration so I guess I missed something when I changed the setting of the new server, any idea what might be wrong here? puppet master configuration: [master] storeconfigs = true dbadapter = mysql dbuser = ... dbpassword = ... dbserver = localhost dbsocket = /var/run/mysqld/mysqld.sock reports = store, http reporturl = http://localhost:3000/reports/upload Thanks! -- 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/-/mGPKjqlxWY0J. 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. -- 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. -- 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.
Re: [Puppet Users] Re: Multiple nodes.pp files
On 11/21/11 11:13 AM, Luke Bigum wrote: Yes, big difference. The 'import' function will literally add the contents of a manifest file into where your import statement is, it's like a 'include woof.h' in C/C++ or source /etc/sysconfig/woof in Bash. It should really never be used anywhere outside of site.pp to add classes and functions but rather with Puppet's class autoloading functionality. [CUT] I think it's related. I'm using 2.7.3 with puppet apply only and I've noticed that if you declare a variable in the importing manifest (say, init.pp), it will not be callable from the imported manifest. So: init.pp: $myvariable = blabla myresource { $myvariable : ensure = present } import secondmanifest.pp # secondmanifest.pp: mysersource { /etc/$myvariable: ensure = present } doesn't work. -- Alexander Fortin http://about.me/alexanderfortin/ -- 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.
Re: [Puppet Users] Escaping Quotes
Right - forgot that :). Maybe support for an alternate quoting operator should be added. On 11/21/11, Peter Meier peter.me...@immerda.ch wrote: Zitat von Max Schubert max.schub...@gmail.com: How about using the alternate single quotes in ruby %q{string string string} puppet manifests are not ruby code. ~pete -- 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. -- 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.
WG: Re: [Puppet Users] AW: nagios_service does not replace target file
This module does basically what I have done in the very beginning. Create an empty directory as a preparation step for the configuration files. But this configuration also did not regenerate the files. Seems, I will stick with my workaround and delete the files manually and the restart the Puppet agent. If anyone is interested in details, see: http://wp.me/p1RukY-1n. Thanks for helping, Gabriel! Bernd -Ursprüngliche Nachricht- Von: Bernd Adamowicz [mailto:i...@bernd-adamowicz.de] Gesendet: Donnerstag, 17. November 2011 22:36 An: Bernd Adamowicz Betreff: Fwd: Re: [Puppet Users] AW: nagios_service does not replace target file --- Forwarded message --- From: Bernd Adamowicz i...@bernd-adamowicz.de To: puppet-users@googlegroups.com Cc: Subject: Re: [Puppet Users] AW: nagios_service does not replace target file Date: Thu, 17 Nov 2011 22:29:23 +0100 The rsync process does definitely not disturb the generation of the files. I've checked this several times. However I will have a look at the module mentioned by you as soon as I'm back in the office on Monday. Maybe I'll find some issues. Thanks so far! Bernd On Thu, 17 Nov 2011 22:06:02 +0100, Gabriel Filion lelu...@gmail.com wrote: On 11-11-17 04:04 AM, Bernd Adamowicz wrote: Removing the 'require' link leads back to the very first problem I've encountered: The files are not regenerated even thought the stored configurations inside the MySQL database changed (I did check the table content before.). hmm right, sorry you had mentioned this in your original post. I must say I don't understand why it wouldn't be working. I'm using puppet 2.6.2 with this module: https://labs.riseup.net/code/projects/shared-nagios permissions are set right, and files get modified for new exported resources. You said you rsynced the files from somewhere else, though. If you hold out that rsync process for a while, do you see new services getting added to the file? -- 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.
Re: [Puppet Users] Escaping Quotes
I'd deploy a wee script that does what you are trying to handle in the command string, and just call that instead. On 21 Nov 2011, at 06:30, Douglas Garstang wrote: Grrr. I have the exec{} below in my puppet module. How do I escape the \ characters? I've tried every possible combination I can think of. I've used one, I've used two, and I've used THREE \. exec { 'oracle-extract-part': command = /usr/bin/printf \n\np\n2\n2091\n+16384M\nw\n\ | /sbin/fdisk /dev/xvdj, unless = /bin/cat /proc/partitions | /bin/grep ${orcl_ephm_device}2; } With three \, it ends up looking like this in the log: Nov 21 01:27:45 dev-c3-app-15 puppet-agent[3091]: (/Stage[main]/Oracle::Server11g/Exec[oracle-swap-part]/returns) change from notrun to 0 failed: /usr/bin/printf \n\#012p\#0121\#0121\#012+32768M\#012t\#01282\#012w\#012\ | /sbin/fdisk /dev/xvdj returned 1 instead of one of [0] at /etc/puppet/devmp/modules/oracle/manifests/server11g.pp:136 Now... that's obviously not right. How do I escape \ symbols? Doug. -- 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. -- 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: Variables inside node definition
On Nov 18, 6:20 pm, Gonzalo Servat gser...@gmail.com wrote: On Sat, Nov 19, 2011 at 12:58 AM, jcbollinger john.bollin...@stjude.orgwrote: [..snip..] You have a great use case here for external data: instead of using a node variable to communicate the machine's purpose, you could instead have class motd look it up via extlookup() or hiera. Thanks for replying John. I hadn't looked into extlookup() until you mentioned this. It's just what I need! I also have a custom facter variable that defines which data centre the server is in, which fits in nicely with extlookup() to look into a dc-specific CSV file. Great, I'm glad to hear it. I'm not using ENC as I do call a few defines from node definitions, and I don't think there is a way of calling defines from a YAML node definition? You are correct. External node classifiers cannot declare individual resources, including defined type instances. You would have to wrap yours in classes to use an ENC. I'm sure it would be possible, but it might be more work than you want to undertake right now. John -- 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: Puppet changes mount point directory ownership.
On Nov 20, 3:59 pm, Douglas Garstang doug.garst...@gmail.com wrote: I've got a directory, /u01/app that is owned by oracle.oinstall. I have this in my manifest: # # Mount point for the Oracle database. # '/u01/app': device = '/dev/xvdo', atboot = true, ensure = mounted, fstype = 'ext4', options = 'defaults', require = Exec['oracle-app-makefs']; As part of the mount operation, puppet changes the ownership on /u01/app to root.root. Why? How can I stop this? It has nothing to do with Puppet. While the filesystem is mounted on / u01/app, the permissions (and all other properties) on that directory are those of the root of the mounted filesystem, not those of the underlying mount point. You can manage the permissions (and everything else) of the mounted filesystem via all the normal tools. If you dismount the filesystem then you should see the underlying mount point's own permissions again. Note that it is tricky with Puppet to manage both a mount point and the root of a filesystem mounted there, because neither Puppet nor the system itself can distinguish the two very well. John -- 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.
Re: [Puppet Users] Puppet not picking up new configs
On 2011-11-20 16:08 , Michal Ludvig wrote: Hi all, I've got a Puppet 2.6.8 setup on RHEL 5.6 with nodes.pp containing a simple import nodes/*.pp and per-node configs in nodes/hostname.pp Occasionally puppet master misses new nodes' files, simply ignores them and the subsequent puppet agent run on the node fails with Could not find default node or by name with All that is needed in such a case is /etc/init.d/puppetmaster restart but it's clearly not an optimal fix. It doesn't happen all the time, in most cases the new node's file is correctly recognised, but in the last case the file was sitting there for 4 days unnoticed and only after puppetmaster restart it was read in. Any idea what's causing it? Is there anything we can do to prevent this from happening again and again? Thanks! Michal Pretty sure you're just running into the normal behavior of the caching that puppet does: Since puppet caches successfully compiled files until it notices that they've changed, it won't go back to re-compile the nodes.pp (and pick up the new nodes/hostname.pp files) until nodes.pp itself needs a recompile. -- Jacob Helwig http://about.me/jhelwig signature.asc Description: OpenPGP digital signature
Re: [Puppet Users] Re: Is it possible to get a list of all nodes in your manifests and all classes assigned to those nodes programatically in Ruby?
This is (almost) trivial. First, create a fact that turns /var/lib/puppet/state/classes.txt into an array. Then extract that fact from the storedconfigs DB programmatically. Admittedly, this won't get all defined nodes, as that is somewhat meaningless since nodes can be default or regular exceptions. Instead, this gets all nodes that have run Puppet at least once. On Nov 20, 2011, at 6:04 PM, James Turnbull wrote: Trevor Vaughan wrote: Sorry but...bump? On 11/18/2011 02:20 PM, Trevor Vaughan wrote: Sorry if this is a double post, my e-mail glitched on me. Anyway, I'm trying to write a Ruby script that can get all defined nodes and all classes assigned to those nodes. I would prefer to not have to compile a catalog for each node. I tried looking through the puppet/util/rdoc material but it really didn't handle the node entries as far as I could tell and also didn't seem to have a way to get the info without printing it all out. Sorry missed this one - I do something vaguely similar for the Puppet Rundeck integration - have a look at the code at: https://github.com/jamtur01/puppet-rundeck Others may be able to chime in with better ideas. James -- James Turnbull Puppet Labs 1-503-734-8571 To schedule a meeting with me: http://tungle.me/jamtur01 -- 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. -- 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.
Re: [Puppet Users] Re: Multiple nodes.pp files
On Thu, Nov 17, 2011 at 2:04 PM, Ramin K ramin.khat...@gmail.com wrote: Tech documentation is littered with examples that illustrate exactly one thing and call it day. 99% of the power of any system comes from learning to combine multiple functions. I chose that example because it illustrates regex, using regex in a node as well as case statements, adding classes based on case statements, setting a default in a case statement, and should have the OP considering that Puppet can do more then 1:1 mapping. Getting past the 1:1 mapping idea seems to take most traditional sysadmins or non CS types longer. Simply, demonstrating possibilities was more important than least keystrokes. Also my example avoids first match problems. Yours does as well assuming it was clear that the first statement *had* to be first. That is probably the number #2 mistake of documentation, illustrating a concept without exploring the assumptions of the example. Ramin Don't know about the OP, but it made me feel like an idiot. Been using Puppet for years and never even considered using regex in my node files. It would make life so much simpler for some things. Evan -- 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] puppet catalog command ? Deprecated or am I a version behind ?
http://linux.die.net/man/8/puppet-catalog This command is not recognized by my puppet 2.6.12-1.el5 client “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” Bill Waterson (Calvin Hobbes) -- 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] Multi-Dimensional Arrays and Templates?
I'm trying to figure out if I can pass multiple variables from puppet, into a template, and have them iterate out. I'm using puppet to configure Varnish and I want to pass it 3 pieces of information repeatedly: The domain name, what the backend should be, and if it should force SSL. Can I just do something like: varnish::config { something : sites = [ [one.domain.com, apache, false], [two.domain.com, apache, false], [secure.domain.com, lighttpd, true] ] } And if that works, how do I iterate through that in the template? Thanks -Jon PS. Or is there a better way to go about this that I'm missing? -- Jon [[User:ShakataGaNai]] / KJ6FNQ http://snowulf.com/ http://www.linkedin.com/in/shakataganai http://twitter.com/shakataganai -- 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.
Re: [Puppet Users] Puppet Windows: Should I use dedicated environment ?
On Sun, Nov 20, 2011 at 8:05 PM, Mohamed Lrhazi lrh...@gmail.com wrote: I stated tweaking my puppet modules and site.pp to support the new OS.. things like: if ( $operatingsystem == windows ) { Exec { path = C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Ruby187\\bin } } else { And now am thinking, would be better to just have an independent environment for all my Windows clients? what would be the draw backs of that? Thanks a lot, Mohamed. I use multiple environments for separating development and production systems. The only really draw back I encounter is the need to make the same change twice for certain things that are shared between both environments. I ma sure there is wa way around that, but it has not become enough of an issue to make me find it. evan -- 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.
Re: [Solved] [Puppet Users] Puppet throws error when evaluating block after statement
We found, that we had some hidden, invisible characters in that line. Neither vim nor nano showed those characters. Problem is solved by removing and retyping the affected lines. Kind regards, Martin Not a completely uncommon issue for some reason. I have encountered it a few times myself. evan -- 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] Puppet and OVO/ITO/OML
At $WORK we currently use HP Operations Manager (aka ITO aka OVO aka OML...) to monitor our infrastructure. Because adding new nodes and configuring them can be time consuming and painful I'd like to know: Is anyone using the same product and how much / what exactly do you do with puppet? We currently install the agent software on Linux and Unix with puppet off an NFS share using an exec resource. This tends to be a lot more stable than doing the remote installation the product itself offers. Puppet can now also do the patching of the agents. I also started to write some custom types which will hopefully automate things a bit more. If you want to try them they are available here: https://github.com/stschulte/puppet-hpom So are you using HP OM and what does puppet do in that area? -Stefan pgpi1BA9u1p6R.pgp Description: PGP signature
Re: [Puppet Users] Puppet Windows: Should I use dedicated environment ?
Another way to handle this is to have class-level logic: class something { if ( $operatingsystem == windows ) { include something::windows } if ( $operatingsystem == redhat ) { include something::redhat } } Then put your resources in something::windows, something::redhat, etc. You may duplicate some code this way, but when the OS'es are very different you'll ultimately save coding time and increase readability by avoiding resource-level logic. On Mon, Nov 21, 2011 at 10:11 AM, Evan Hisey ehi...@gmail.com wrote: On Sun, Nov 20, 2011 at 8:05 PM, Mohamed Lrhazi lrh...@gmail.com wrote: I stated tweaking my puppet modules and site.pp to support the new OS.. things like: if ( $operatingsystem == windows ) { Exec { path = C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Ruby187\\bin } } else { And now am thinking, would be better to just have an independent environment for all my Windows clients? what would be the draw backs of that? Thanks a lot, Mohamed. I use multiple environments for separating development and production systems. The only really draw back I encounter is the need to make the same change twice for certain things that are shared between both environments. I ma sure there is wa way around that, but it has not become enough of an issue to make me find it. evan -- 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. -- 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.
Re: [Puppet Users] puppet catalog command ? Deprecated or am I a version behind ?
On Mon, Nov 21, 2011 at 9:58 AM, Dan White y...@comcast.net wrote: http://linux.die.net/man/8/puppet-catalog This command is not recognized by my puppet 2.6.12-1.el5 client You need puppet 2.7. Nan -- 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.
Re: [Puppet Users] Puppet Windows: Should I use dedicated environment ?
Thanks guys. We do use environments already, and we also do use this pattern for separating operating system specific details to sub classes... but we only had to deal with Red Hat/CentOS/Oracle Enterprise Linux, and Solaris I guess I was thinking that windows is so different that it should be totally separate :) Thanks. Mohamed. On Mon, Nov 21, 2011 at 1:26 PM, Aaron Grewell aaron.grew...@gmail.com wrote: Another way to handle this is to have class-level logic: class something { if ( $operatingsystem == windows ) { include something::windows } if ( $operatingsystem == redhat ) { include something::redhat } } Then put your resources in something::windows, something::redhat, etc. You may duplicate some code this way, but when the OS'es are very different you'll ultimately save coding time and increase readability by avoiding resource-level logic. On Mon, Nov 21, 2011 at 10:11 AM, Evan Hisey ehi...@gmail.com wrote: On Sun, Nov 20, 2011 at 8:05 PM, Mohamed Lrhazi lrh...@gmail.com wrote: I stated tweaking my puppet modules and site.pp to support the new OS.. things like: if ( $operatingsystem == windows ) { Exec { path = C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Ruby187\\bin } } else { And now am thinking, would be better to just have an independent environment for all my Windows clients? what would be the draw backs of that? Thanks a lot, Mohamed. I use multiple environments for separating development and production systems. The only really draw back I encounter is the need to make the same change twice for certain things that are shared between both environments. I ma sure there is wa way around that, but it has not become enough of an issue to make me find it. evan -- 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. -- 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. -- 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] Could not retrieve metadata
I am having the same problem now with puppet-2.7.6 on FreeBSD. That original post by Chris has no response since may. Developers, do you have any idea why that happenes? Thanks! -- Forwarded message -- From: Chris Phillips ch...@untrepid.com Date: May 10, 1:35 am Subject: Could not retrieve metadata - 2.6.7 / RHEL4 / remote site To: Puppet Users Hi, I've got a 2.6.7 server and client setup running pretty nicely in a single site on a few rhel5 and 6 boxes, and today branched out with a RHEL4 node on a remote site. This was installing 2.6.7 (and facter 1.5.8) from source due to the lack of el4 rpms (el5's from yum.puppetlabs.com on all other RHEL boxes so far), with oldish official ruby 1.8.1 el4 rpms. On this new node I'm getting about a 30-40% failure rate in terms of runs, with errors in retrieving metadata: Mon May 09 22:16:12 +0100 2011 /Stage[main]/Nss-ldap/File[/etc/nsswitch.conf] (err): Could not evaluate: Could not retrieve file metadata for puppet:///modules/nss-ldap/nsswitch.conf: at /etc/puppet/modules/nss-ldap/manifests/init.pp:37 This happens on various different modules, but always the same error, trying to get a file for a source reference. I'm aware there are a few new variables I've thrown in, but the WAN connectivity seems to be fine, no packet loss or anything, and also as these errors are reported on the server and client, it's not like it's actually losing connection with the puppet server. Does this intermittent error ring any bells? With tagmail reports telling us about this, it's not really ignorable for us. Thanks Chris -- 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: Could not retrieve metadata
Example: Nov 21 22:56:35 comp01 puppet-agent[46828]: (/Stage[main]/Bsd/File[/ etc/inetd.conf]) Could not evaluate: end of file reached Could not retrieve file metadata for puppet:///modules/bsd/etc/inetd.conf: end of file reached at /usr/local/etc/puppet/modules/bsd/manifests/init.pp: 80 This messages appear for random clients for random lines in init.pp. On Nov 21, 11:35 pm, Dmitry trtrmi...@gmail.com wrote: I am having the same problem now with puppet-2.7.6 on FreeBSD. That original post by Chris has no response since may. Developers, do you have any idea why that happenes? Thanks! -- Forwarded message -- From: Chris Phillips ch...@untrepid.com Date: May 10, 1:35 am Subject: Could not retrieve metadata - 2.6.7 / RHEL4 / remote site To: Puppet Users Hi, I've got a 2.6.7 server and client setup running pretty nicely in a single site on a few rhel5 and 6 boxes, and today branched out with a RHEL4 node on a remote site. This was installing 2.6.7 (and facter 1.5.8) from source due to the lack of el4 rpms (el5's from yum.puppetlabs.com on all other RHEL boxes so far), with oldish official ruby 1.8.1 el4 rpms. On this new node I'm getting about a 30-40% failure rate in terms of runs, with errors in retrieving metadata: Mon May 09 22:16:12 +0100 2011 /Stage[main]/Nss-ldap/File[/etc/nsswitch.conf] (err): Could not evaluate: Could not retrieve file metadata for puppet:///modules/nss-ldap/nsswitch.conf: at /etc/puppet/modules/nss-ldap/manifests/init.pp:37 This happens on various different modules, but always the same error, trying to get a file for a source reference. I'm aware there are a few new variables I've thrown in, but the WAN connectivity seems to be fine, no packet loss or anything, and also as these errors are reported on the server and client, it's not like it's actually losing connection with the puppet server. Does this intermittent error ring any bells? With tagmail reports telling us about this, it's not really ignorable for us. Thanks Chris -- 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.
Re: [Puppet Users] puppet users module
On Nov 18, 2011, at 8:50 AM, vasanth kumar wrote: Manifests – must be stored in manifests/, and if you create manifests/init.pp then that file will be loaded if you import the module name directly, e.g. import “mymodule”. All other manifests must have the module name included in the import statement, e.g., import “mymod/mymanifest”. import is not necessary for modules. Just call the class ;-) -- Jo Rhett Net Consonance : consonant endings by net philanthropy, open source and other randomness -- 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.
Re: [Puppet Users] Puppet Windows: Should I use dedicated environment ?
I wouldn't expect a lot of class overlap, so it might be simpler to do it that way, but it also means a completely different directory tree. It's going to come down to the personal taste of the admins I expect. On Mon, Nov 21, 2011 at 11:31 AM, Mohamed Lrhazi lrh...@gmail.com wrote: Thanks guys. We do use environments already, and we also do use this pattern for separating operating system specific details to sub classes... but we only had to deal with Red Hat/CentOS/Oracle Enterprise Linux, and Solaris I guess I was thinking that windows is so different that it should be totally separate :) Thanks. Mohamed. On Mon, Nov 21, 2011 at 1:26 PM, Aaron Grewell aaron.grew...@gmail.com wrote: Another way to handle this is to have class-level logic: class something { if ( $operatingsystem == windows ) { include something::windows } if ( $operatingsystem == redhat ) { include something::redhat } } Then put your resources in something::windows, something::redhat, etc. You may duplicate some code this way, but when the OS'es are very different you'll ultimately save coding time and increase readability by avoiding resource-level logic. On Mon, Nov 21, 2011 at 10:11 AM, Evan Hisey ehi...@gmail.com wrote: On Sun, Nov 20, 2011 at 8:05 PM, Mohamed Lrhazi lrh...@gmail.com wrote: I stated tweaking my puppet modules and site.pp to support the new OS.. things like: if ( $operatingsystem == windows ) { Exec { path = C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Ruby187\\bin } } else { And now am thinking, would be better to just have an independent environment for all my Windows clients? what would be the draw backs of that? Thanks a lot, Mohamed. I use multiple environments for separating development and production systems. The only really draw back I encounter is the need to make the same change twice for certain things that are shared between both environments. I ma sure there is wa way around that, but it has not become enough of an issue to make me find it. evan -- 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. -- 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. -- 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. -- 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.
Re: [Puppet Users] puppet catalog command ? Deprecated or am I a version behind ?
You can get the RPMs from yum.puppetlabs.com On Nov 21, 2011, at 11:26 AM, Dan White wrote: OK. When can I expect it in EPEL ? I'm on RHEL systems and I need to be able to yum install them. “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” Bill Waterson (Calvin Hobbes) - Nan Liu n...@puppetlabs.com wrote: On Mon, Nov 21, 2011 at 9:58 AM, Dan White y...@comcast.net wrote: http://linux.die.net/man/8/puppet-catalog This command is not recognized by my puppet 2.6.12-1.el5 client You need puppet 2.7. Nan -- 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. -- Jo Rhett Net Consonance : consonant endings by net philanthropy, open source and other randomness -- 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: Multiple nodes.pp files
On Nov 21, 8:05 am, Alexander Fortin alexander.for...@gmail.com wrote: On 11/21/11 11:13 AM, Luke Bigum wrote: Yes, big difference. The 'import' function will literally add the contents of a manifest file into where your import statement is, it's like a 'include woof.h' in C/C++ or source /etc/sysconfig/woof in Bash. It should really never be used anywhere outside of site.pp to add classes and functions but rather with Puppet's class autoloading functionality. [CUT] I think it's related. I'm using 2.7.3 with puppet apply only and I've noticed that if you declare a variable in the importing manifest (say, init.pp), it will not be callable from the imported manifest. So: init.pp: $myvariable = blabla myresource { $myvariable : ensure = present } import secondmanifest.pp # secondmanifest.pp: mysersource { /etc/$myvariable: ensure = present } doesn't work. What if you spell it like so: mysersource { /etc/$::myvariable: ensure = present } ? I would expect either way to work in Puppet 2.6, but 2.7 is more strict about name scoping. And that does highlight an important point about the 'import' function: it is *not* thoroughly analogous to the C preprocessor's #include directive. It's a better analog than the 'include' function is, but it doesn't operate at the source code level. I better analog is Python's 'import' statement (and Puppet's module structure is also reminiscent of Python's -- hmm). John -- 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] Installing puppet agent on Windows XP
Trying to get Puppet 2.7.6/Facter 1.6.2 running on Windows XP SP3. Followed the install instructions carefully, got no errors. facter and puppet both hang no matter what I try. The only things that don't hang are: facter operatingsystem (or any other individual facter query) facter --version facter --debug hangs, as does puppet --version or any other puppet command, including 'puppet config print all'. Anyone have success getting puppet running on XP? -- 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.
Re: [Puppet Users] Re: puppet agent 2.7 on windows
On Sun, Nov 20, 2011 at 4:17 PM, Josh Cooper j...@puppetlabs.com wrote: Hi Ravi, On Sun, Nov 20, 2011 at 11:07 AM, Ravi rajan.s.r...@gmail.com wrote: Thanks for your reply. Tried this and was able to get the config file. But i now have a strange problem - The agent starts up and in the log file i see the following error - Sun Nov 20 18:39:45 + 2011 /File[C:/ProgramData/PuppetLabs/puppet/ var/facts]/ensure (err): change from directory to file failed: Could not set 'file on ensure: Permission denied - C:/ProgramData/PuppetLabs/ puppet/var/facts I've run across this a few times, but haven't filed a bug yet. When running puppet agent --genconfig (or config print all), puppet generates 3 fact related settings that prevent the agent from being able to start. I don't think this is specific to Windows, but haven't spent time to narrow it down. Just comment out the property that ends with var/facts and try again. You'll need to do this for 2 other fact related properties, then you should be good. I filed this as http://projects.puppetlabs.com/issues/10991 Thanks, Josh -- Josh Cooper Developer, Puppet Labs -- 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.
Re: [Puppet Users] Re: Is it possible to get a list of all nodes in your manifests and all classes assigned to those nodes programatically in Ruby?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thanks for the suggestions guys but I'm giving this one up as too annoying to bother. The issue was to detect the nodes that hadn't checked in but were defined in the manifest. Getting the information out of the YAML is pretty easy, yes. Thanks! Trevor On 11/21/2011 12:10 PM, Brian Gallew wrote: This is (almost) trivial. First, create a fact that turns /var/lib/puppet/state/classes.txt into an array. Then extract that fact from the storedconfigs DB programmatically. Admittedly, this won't get all defined nodes, as that is somewhat meaningless since nodes can be default or regular exceptions. Instead, this gets all nodes that have run Puppet at least once. On Nov 20, 2011, at 6:04 PM, James Turnbull wrote: Trevor Vaughan wrote: Sorry but...bump? On 11/18/2011 02:20 PM, Trevor Vaughan wrote: Sorry if this is a double post, my e-mail glitched on me. Anyway, I'm trying to write a Ruby script that can get all defined nodes and all classes assigned to those nodes. I would prefer to not have to compile a catalog for each node. I tried looking through the puppet/util/rdoc material but it really didn't handle the node entries as far as I could tell and also didn't seem to have a way to get the info without printing it all out. Sorry missed this one - I do something vaguely similar for the Puppet Rundeck integration - have a look at the code at: https://github.com/jamtur01/puppet-rundeck Others may be able to chime in with better ideas. James -- James Turnbull Puppet Labs 1-503-734-8571 To schedule a meeting with me: http://tungle.me/jamtur01 -- 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. - -- Trevor Vaughan Vice President, Onyx Point, Inc. email: tvaug...@onyxpoint.com phone: 410-541-ONYX (6699) pgp: 0x6C701E94 - -- This account not approved for unencrypted sensitive information -- -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQEcBAEBAgAGBQJOyvARAAoJECNCGV1OLcypxvYH/03J2v+V+ReyewLkA5wynTq+ J9NbiXjwqKK7RZOlB+LFrIbR8/OBP46zRLSI0iujfwua3vwQromA9wga59e9XvuL vFsKiKmwxArzcrafuTNnIk47jyV6vvYvxq7roIqcU0kQIj9rECEJSkktNI/gy8PK DMiIMqNSz6jGw+ZUAhWJMQtvzLZ73BiFl61WKFH0NEAM1uBIidp4hfPQ9Bn2OVPJ TLfGlN2/nuFVUFU6SgDICFsaXKuM6Cc4CnUH1o+UJH6SKXXZBtnuXZDncmwsA4ez BG+fP3rfS4q3EzZYrl05zFh4frsLyo5PQDYKTZyALPDY9QmZvkHQ62IloFLYcdY= =8sEZ -END PGP SIGNATURE- -- 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. attachment: tvaughan.vcf
Re: [Puppet Users] Installing puppet agent on Windows XP
On 2011-11-21 12:50 , Jeff Sussna wrote: Trying to get Puppet 2.7.6/Facter 1.6.2 running on Windows XP SP3. Followed the install instructions carefully, got no errors. facter and puppet both hang no matter what I try. The only things that don't hang are: facter operatingsystem (or any other individual facter query) facter --version facter --debug hangs, as does puppet --version or any other puppet command, including 'puppet config print all'. Anyone have success getting puppet running on XP? Right now, Puppet Facter are only supported on Server 2003 Server 2008, since those are the only platforms we tested against when working on the Windows support. If come up with patches to get past the hangs on XP we'd love to see them. Which install instructions were you following? If it didn't clearly call out which platforms are currently supported, we'll need to update the instructions. -- Jacob Helwig http://about.me/jhelwig signature.asc Description: OpenPGP digital signature
Re: [Puppet Users] Re: Is it possible to get a list of all nodes in your manifests and all classes assigned to those nodes programatically in Ruby?
I rely on Puppet dashboard to tell me which nodes haven't checked in for a while... :) - Gonzalo On Tue, Nov 22, 2011 at 11:43 AM, Trevor Vaughan tvaug...@onyxpoint.comwrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thanks for the suggestions guys but I'm giving this one up as too annoying to bother. The issue was to detect the nodes that hadn't checked in but were defined in the manifest. Getting the information out of the YAML is pretty easy, yes. Thanks! Trevor On 11/21/2011 12:10 PM, Brian Gallew wrote: This is (almost) trivial. First, create a fact that turns /var/lib/puppet/state/classes.txt into an array. Then extract that fact from the storedconfigs DB programmatically. Admittedly, this won't get all defined nodes, as that is somewhat meaningless since nodes can be default or regular exceptions. Instead, this gets all nodes that have run Puppet at least once. On Nov 20, 2011, at 6:04 PM, James Turnbull wrote: Trevor Vaughan wrote: Sorry but...bump? On 11/18/2011 02:20 PM, Trevor Vaughan wrote: Sorry if this is a double post, my e-mail glitched on me. Anyway, I'm trying to write a Ruby script that can get all defined nodes and all classes assigned to those nodes. I would prefer to not have to compile a catalog for each node. I tried looking through the puppet/util/rdoc material but it really didn't handle the node entries as far as I could tell and also didn't seem to have a way to get the info without printing it all out. Sorry missed this one - I do something vaguely similar for the Puppet Rundeck integration - have a look at the code at: https://github.com/jamtur01/puppet-rundeck Others may be able to chime in with better ideas. James -- James Turnbull Puppet Labs 1-503-734-8571 To schedule a meeting with me: http://tungle.me/jamtur01 -- 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. - -- Trevor Vaughan Vice President, Onyx Point, Inc. email: tvaug...@onyxpoint.com phone: 410-541-ONYX (6699) pgp: 0x6C701E94 - -- This account not approved for unencrypted sensitive information -- -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQEcBAEBAgAGBQJOyvARAAoJECNCGV1OLcypxvYH/03J2v+V+ReyewLkA5wynTq+ J9NbiXjwqKK7RZOlB+LFrIbR8/OBP46zRLSI0iujfwua3vwQromA9wga59e9XvuL vFsKiKmwxArzcrafuTNnIk47jyV6vvYvxq7roIqcU0kQIj9rECEJSkktNI/gy8PK DMiIMqNSz6jGw+ZUAhWJMQtvzLZ73BiFl61WKFH0NEAM1uBIidp4hfPQ9Bn2OVPJ TLfGlN2/nuFVUFU6SgDICFsaXKuM6Cc4CnUH1o+UJH6SKXXZBtnuXZDncmwsA4ez BG+fP3rfS4q3EzZYrl05zFh4frsLyo5PQDYKTZyALPDY9QmZvkHQ62IloFLYcdY= =8sEZ -END PGP SIGNATURE- -- 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. -- 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.
Re: [Puppet Users] Installing puppet agent on Windows XP
On Mon, Nov 21, 2011 at 5:31 PM, Jacob Helwig ja...@puppetlabs.com wrote: On 2011-11-21 12:50 , Jeff Sussna wrote: Trying to get Puppet 2.7.6/Facter 1.6.2 running on Windows XP SP3. [...] Anyone have success getting puppet running on XP? Right now, Puppet Facter are only supported on Server 2003 Server 2008, since those are the only platforms we tested against when working on the Windows support. I would imagine that you could get it to work with Cygwin (under cygrunsrv) on any Windows platform ... the SSH server there is already quite reasonable, and Cygwin has a pre-built Ruby (among other similar scripting languages); I've had the pleasure of setting up distributed build environments through such mechanisms, so I'd not think puppet would be that much of a stretch. I could be wrong, though... -- 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] struggling with vcsrepo, git, latest
I am working with 2.7.3, latest vcsrepo from github. Trying to get a git workarea kept up to date (latest). The call: vcsrepo { puppetm:git:co: ensure = latest, provider = git, path = $srcdir, source = g...@github.com:/xxx.git, owner = puppet, group = puppet, identity = $puppetm::puppethomedir/.ssh/ $puppetm::pkeyname, } I added some debugging (the warnings) to git.rb to try and figure out what is going on... but am stumped: warning: git with identity fetch--tagsorigin warning: git with identity rev-parseHEAD warning: git with identity branch-a warning: git with identity fetchorigin warning: git with identity fetch--tagsorigin warning: git with identity rev-parseorigin/HEAD warning: get_revision ff9625bad45d398573bd664a5fdf7ab2cfa4c185 warning: git with identity fetch--tagsorigin warning: git with identity branch-a warning: git with identity fetchorigin warning: git with identity fetch--tagsorigin warning: git with identity rev-parseorigin/HEAD warning: get_revision ff9625bad45d398573bd664a5fdf7ab2cfa4c185 notice: /Stage[main]/Puppetm/Puppetm::Checkout[puppetm:cloudops]/ Vcsrepo[puppetm:git:co]/ensure: Updating to latest 'ff9625bad45d398573bd664a5fdf7ab2cfa4c185' revision warning: git with identity branch-a warning: git with identity tag-l warning: git with identity branch-a warning: remote_branch remotes/origin/HEAD - origin/masterremotes/ origin/devremotes/origin/masterremotes/origin/mvn_projremotes/origin/ tectonic_move warning: git with identity checkout- bff9625bad45d398573bd664a5fdf7ab2cfa4c185--trackorigin/ ff9625bad45d398573bd664a5fdf7ab2cfa4c185 err: /Stage[main]/Puppetm/Puppetm::Checkout[puppetm:cloudops]/ Vcsrepo[puppetm:git:co]/ensure: change from present to latest failed: Execution of '/usr/bin/git checkout -b ff9625bad45d398573bd664a5fdf7ab2cfa4c185 --track origin/ ff9625bad45d398573bd664a5fdf7ab2cfa4c185' returned 128: fatal: git checkout: updating paths is incompatible with switching branches. Did you intend to checkout 'origin/ ff9625bad45d398573bd664a5fdf7ab2cfa4c185' which can not be resolved as commit? basically - it looks like it properly figured out the latest commit SHA - but then goes and does a git checkout -b SHAxxx --track origin/ SHAxxx but of course there is no remote branch named origin/SHAxxx standard git setup (I think): -bash-4.1$ git branch -a * master remotes/origin/HEAD - origin/master remotes/origin/dev remotes/origin/master remotes/origin/mvn_proj I have tried setting revision = HEAD - but that results in no updates - possibly since it thinks that means the local HEAD rather than the remote. ideas? -- 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] Puppet IRC logs
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all I finally got around to fixing the IRC logs up a little and adding them to their own site: http://www.puppetlogs.com/ The site contains search-able IRC logs for #puppet and #puppet-dev going back to late 2007 or so. It's maintained by me (not Puppet Labs) so best to contact me for issues rather than bother anyone else. Regards James - -- Author of: * Pro Puppet (http://tinyurl.com/ppuppet) * Pro Linux System Administration (http://tinyurl.com/linuxadmin) * Pro Nagios 2.0 (http://tinyurl.com/pronagios) * Hardening Linux (http://tinyurl.com/hardeninglinux) -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJOy0LNAAoJECFa/lDkFHAyOs8H/3lfiK5W0bTurrJcIEeFaSGT QxcxNzx/P9F6dbCnzjuHLIo1MnjVNMiYCIv7SvK6tYhH50PDrLOw/IeZvH9sijDy dEs9s+HsySjHjM4afTNpax5gx+Mm3mEZNXJt5MpABD0Z7xxRHUzw6ZwtTeJ/rccn 6WaOD5akWGAoTV9OH6/K2OWhO7pwy931drt2C1oJQik9mPnyzmFlyeqXxYq8Oh0s wRZ+jG2FTNxp8Kk6ZuR24mdT6ks3mxTa7WP2Dv2ucpMuqmgN4tycKt50iBudEXEO Q1EuOR6G8+tbEb+8Ijkr4GIi5nCp/7CswG2Uq84yLUQ3OPEH4aZIFLaeBzmp5KY= =Hcfb -END PGP SIGNATURE- -- 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] FOSDEM 2012: Configuration Systems Management DevRoom
Call for Papers - FOSDEM 2012 **Call for talks for the Configuration Systems Management DevRoom at FOSDEM 2012** Configuration Management DevRoom - http://fosdem.puppetlabs.com FOSDEM 2012 - http://fosdem.org/2012/ 4th 5th of February (date TBD) 2012, 09:00 to 17:00, Brussels, Belgium Contact: fos...@puppetlabs.com We will be holding a Configuration Management DevRoom at FOSDEM 2012 and are requesting abstracts for structured presentations now. Important information, dates: ? Submission deadline for abstracts: 2011-12-31 ? Notification of accepted speakers: 2012-01-05 ? Final schedule: 2011-01-10 **About this DevRoom** Configuration and Systems Management is in a renaissance. There is huge interest in automation, monitoring, performance management, configuration management, DevOps and the cloud. We're seeking people who are working in the field, interested in the field, or just interested in learning more about how to manage infrastructure better, cheaper and faster. We invite you to submit talks on these topics: * Configuration and Systems Management theory principles * Configuration and Systems Management tools - with an emphasis on real world use cases * Tools, techniques and case studies * The Cloud * Audit, Compliance and Security * DevOps NOTE: Puppet Labs is helping organize this room but we're looking for talks on more than Puppet! We're looking for talks on the cutting edge of systems tools and configuration management. This is your opportunity to show off your implementation, your tool or what your environment shine! Regards Nigel Kersten James Turnbull -- 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.
Re: [Puppet Users] struggling with vcsrepo, git, latest
On 2011-11-21 22:00 , jwag wrote: I am working with 2.7.3, latest vcsrepo from github. Trying to get a git workarea kept up to date (latest). The call: vcsrepo { puppetm:git:co: ensure = latest, provider = git, path = $srcdir, source = g...@github.com:/xxx.git, owner = puppet, group = puppet, identity = $puppetm::puppethomedir/.ssh/ $puppetm::pkeyname, } I added some debugging (the warnings) to git.rb to try and figure out what is going on... but am stumped: warning: git with identity fetch--tagsorigin warning: git with identity rev-parseHEAD warning: git with identity branch-a warning: git with identity fetchorigin warning: git with identity fetch--tagsorigin warning: git with identity rev-parseorigin/HEAD warning: get_revision ff9625bad45d398573bd664a5fdf7ab2cfa4c185 warning: git with identity fetch--tagsorigin warning: git with identity branch-a warning: git with identity fetchorigin warning: git with identity fetch--tagsorigin warning: git with identity rev-parseorigin/HEAD warning: get_revision ff9625bad45d398573bd664a5fdf7ab2cfa4c185 notice: /Stage[main]/Puppetm/Puppetm::Checkout[puppetm:cloudops]/ Vcsrepo[puppetm:git:co]/ensure: Updating to latest 'ff9625bad45d398573bd664a5fdf7ab2cfa4c185' revision warning: git with identity branch-a warning: git with identity tag-l warning: git with identity branch-a warning: remote_branch remotes/origin/HEAD - origin/masterremotes/ origin/devremotes/origin/masterremotes/origin/mvn_projremotes/origin/ tectonic_move warning: git with identity checkout- bff9625bad45d398573bd664a5fdf7ab2cfa4c185--trackorigin/ ff9625bad45d398573bd664a5fdf7ab2cfa4c185 err: /Stage[main]/Puppetm/Puppetm::Checkout[puppetm:cloudops]/ Vcsrepo[puppetm:git:co]/ensure: change from present to latest failed: Execution of '/usr/bin/git checkout -b ff9625bad45d398573bd664a5fdf7ab2cfa4c185 --track origin/ ff9625bad45d398573bd664a5fdf7ab2cfa4c185' returned 128: fatal: git checkout: updating paths is incompatible with switching branches. Did you intend to checkout 'origin/ ff9625bad45d398573bd664a5fdf7ab2cfa4c185' which can not be resolved as commit? basically - it looks like it properly figured out the latest commit SHA - but then goes and does a git checkout -b SHAxxx --track origin/ SHAxxx but of course there is no remote branch named origin/SHAxxx standard git setup (I think): -bash-4.1$ git branch -a * master remotes/origin/HEAD - origin/master remotes/origin/dev remotes/origin/master remotes/origin/mvn_proj I have tried setting revision = HEAD - but that results in no updates - possibly since it thinks that means the local HEAD rather than the remote. ideas? Unfortunately, last I checked the vcsrepo type was just broken when it comes to what it does with Git repos. I started trying to clean it up in my spare time[0], but don't have anything actually ready to merge back into the main repo yet. [0] https://github.com/jhelwig/puppet-vcsrepo/tree/rework-git-provider -- Jacob Helwig http://about.me/jhelwig signature.asc Description: OpenPGP digital signature