[Puppet Users] puppetmaster 100%cpu usage on 2.6 (not on 0.24)

2010-12-14 Thread Chris
Hi I recently upgraded my puppet masters (and clients) from 0.24.8 to 2.6.4 Previously, my most busy puppet master would hover around about 0.9 load average, after the upgrade, its load hovers around 5 I am running passenger and mysql based stored configs. Checking my running processes, ruby

Re: [Puppet Users] Custom Functions that runs on the Client?

2010-12-14 Thread Martijn Grendelman
Hi, On Mon, Dec 13, 2010 at 12:56 PM, Yushu Yao y...@lbl.gov mailto:y...@lbl.gov wrote: Another though: Can I do something like if $(return value of an Exec resource)==0 { } else {} I.e. I want to run an shell command first, and do something depend on the

Re: [Puppet Users] Running puppet as non-root user

2010-12-14 Thread Jesús Couto
Ok, so, not as strange and uncommon practice as I thought :-P So what do you do in your manifests? I mean, do you code the manifest so you never, ever get to any place Puppet is going to croak due to not being root (that would mean, probably, just exporting template and config files under your

[Puppet Users] Re: service - explicit stats command

2010-12-14 Thread luke.bigum
On Dec 14, 3:15 am, russell.fulton russell.ful...@gmail.com wrote: I now  have my service status command that does a kill -0 on all the pid and return 1 if all the processes are running.  I have this class/ service definition: Russell, That might be a typo in what you've written above but

Re: [Puppet Users] Puppet updating from relative directories or chroot

2010-12-14 Thread Felix Frank
On 12/14/2010 12:19 AM, Daniel Pittman wrote: On Tue, Dec 14, 2010 at 10:15, Patrick Mohr kc7...@gmail.com wrote: On Mon, Dec 13, 2010 at 2:39 PM, Daniel Pittman dan...@rimspace.net wrote: On Fri, Dec 3, 2010 at 22:41, Geoff geoffnew...@gmail.com wrote: I didn't respond earlier, as I imagine

[Puppet Users] Error after signing certificate step

2010-12-14 Thread Paul Willis
Hi I'm trying puppet for the first time and attempting to get it working in Amazon EC2 with Ubuntu 10.04 using the default puppet 0.25.4-2ubuntu4, I've read the 'Pulling Strings' book and tried following various tutorials found on the net to set up it but each time I get as far as signing the

Re: [Puppet Users] Error after signing certificate step

2010-12-14 Thread Patrick
On Dec 14, 2010, at 3:18 AM, Paul Willis wrote: Hi I'm trying puppet for the first time and attempting to get it working in Amazon EC2 with Ubuntu 10.04 using the default puppet 0.25.4-2ubuntu4, I've read the 'Pulling Strings' book and tried following various tutorials found on the net

Re: [Puppet Users] Custom Functions that runs on the Client?

2010-12-14 Thread Felix Frank
On 12/13/2010 07:59 PM, Yushu Yao wrote: Thanks Eric, I am trying to implement some function tests. E.g. in my catalog for node B there is LDAP client, however, I would like to do a test to see if the LDAP server is already up and running. And decide if I want to apply the LDAP Client or

[Puppet Users] SSL_connect SYSCALL returned=5

2010-12-14 Thread Kikanny
I keep getting the following error when I do a catalog run: err: Could not request certificate: SSL_connect SYSCALL returned=5 errno=0 state=SSLv2/v3 read server hello A No idea why its giving me this error. Any help would be appreciated. Thanks! -- You received this message because you are

[Puppet Users] Re: SSL_connect SYSCALL returned=5

2010-12-14 Thread Kikanny
I'm using webrick but I also have apache installed on the master because I need it for something else. Could it be because apache is also using ssl or something like that is causing the problem? On Dec 14, 8:17 am, Kikanny kika...@gmail.com wrote: I keep getting the following error when I do a

Re: [Puppet Users] Using one fact to make another fact

2010-12-14 Thread Peter Meier
Facter.add(username) do setcode do $username = Facter.hostname Facter.value(:hostname) $username.sub!(/notebook/, 'user') puts $username and no need to puts, facter expects $username to be returned. But beware that $username is a global variable and you should avoid that one,

[Puppet Users] Re: Puppet updating from relative directories or chroot

2010-12-14 Thread Geoff
Cheers all. I suspected it was going to be too hard. Thought no-one had seen the email as it was sent close to the weekend ;) On Dec 13, 11:19 pm, Daniel Pittman dan...@rimspace.net wrote: On Tue, Dec 14, 2010 at 10:15, Patrick Mohr kc7...@gmail.com wrote: On Mon, Dec 13, 2010 at 2:39 PM,

Re: [Puppet Users] Re: File not found during puppet fileserving

2010-12-14 Thread Nigel Kersten
Client nodes can set the environment, so long as the server doesn't. On Dec 14, 2010 3:21 AM, Iain Sutton iainsut...@gmail.com wrote: We have just stumbled across this having moved to external nodes using Foreman. Our dev environment is where we make quick changes to manifests (and nominally

[Puppet Users] PluginModule issue

2010-12-14 Thread Justin Ellis
Good Morning! I'm working on implementing the glassfish module from ModuleForge so that we can use a Resource Type in our manifests instead of execs, but am getting an odd error on the client. Glassfish[domain1]: Failed to retrieve current state of resource: No ability to determine if glassfish

[Puppet Users] Environment specified by external nodes ignored

2010-12-14 Thread Rameses Mss
My custom external nodes script sets the environment variable, but Puppet ignores it. For testing, I have a manifest that deploys this template to a file: environment = %= environment % The output from my external nodes script: --- classes: - devhost environment: development parameters:

[Puppet Users] Re: Environment specified by external nodes ignored

2010-12-14 Thread Rameses Mss
Oops, this is Puppet 0.25.5 on Ubuntu 10.04 LTS. On Tue, Dec 14, 2010 at 10:39 AM, Rameses Mss rmss60...@gmail.com wrote: My custom external nodes script sets the environment variable, but Puppet ignores it. For testing, I have a manifest that deploys this template to a file: environment =

[Puppet Users] n00b questions - verbosity of config????

2010-12-14 Thread Tim Watts
Hi, I'm learning puppet as that is what they use at my current work, though that could change... Question 1: Last place of work, we wrote our own perl based system which was extremely simple and concise to drive - eg to distribute a file, we would put it in:

Re: [Puppet Users] Environment specified by external nodes ignored

2010-12-14 Thread Nigel Kersten
On Tue, Dec 14, 2010 at 7:39 AM, Rameses Mss rmss60...@gmail.com wrote: My custom external nodes script sets the environment variable, but Puppet ignores it. For testing, I have a manifest that deploys this template to a file: environment = %= environment % The output from my external

Re: [Puppet Users] n00b questions - verbosity of config????

2010-12-14 Thread Rameses Mss
General suggestions: - Try not to fight Puppet. It's good but does require a certain way of thinking. Work with it and you'll get where you want to go. - Verbosity is not necessarily a bad thing in relatively static configuration files. Perlophiles usually hate verbosity, I know, but it has its

Re: [Puppet Users] Environment specified by external nodes ignored

2010-12-14 Thread Rameses Mss
On Tue, Dec 14, 2010 at 11:22 AM, Nigel Kersten ni...@puppetlabs.comwrote: On Tue, Dec 14, 2010 at 7:39 AM, Rameses Mss rmss60...@gmail.com wrote: My custom external nodes script sets the environment variable, but Puppet ignores it. For testing, I have a manifest that deploys this

Re: [Puppet Users] PluginModule issue

2010-12-14 Thread Felix Frank
On 12/14/2010 04:30 PM, Justin Ellis wrote: Good Morning! I'm working on implementing the glassfish module from ModuleForge so that we can use a Resource Type in our manifests instead of execs, but am getting an odd error on the client. Glassfish[domain1]: Failed to retrieve current state

Re: [Puppet Users] Environment specified by external nodes ignored

2010-12-14 Thread Ohad Levy
On Tue, Dec 14, 2010 at 6:39 PM, Rameses Mss rmss60...@gmail.com wrote: On Tue, Dec 14, 2010 at 11:22 AM, Nigel Kersten ni...@puppetlabs.comwrote: On Tue, Dec 14, 2010 at 7:39 AM, Rameses Mss rmss60...@gmail.com wrote: My custom external nodes script sets the environment variable, but

Re: [Puppet Users] Environment specified by external nodes ignored

2010-12-14 Thread Rameses Mss
On Tue, Dec 14, 2010 at 12:01 PM, Ohad Levy ohadl...@gmail.com wrote: On Tue, Dec 14, 2010 at 6:39 PM, Rameses Mss rmss60...@gmail.com wrote: On Tue, Dec 14, 2010 at 11:22 AM, Nigel Kersten ni...@puppetlabs.comwrote: On Tue, Dec 14, 2010 at 7:39 AM, Rameses Mss rmss60...@gmail.comwrote:

Re: [Puppet Users] n00b questions - verbosity of config????

2010-12-14 Thread psyber
On 12/14/2010 7:33 AM, Tim Watts wrote: Question 2 Related: In a simple case as per documentation: class syslog { file { /etc/syslog-ng/syslog-ng.conf: path = /etc/syslog-ng/syslog-ng.conf, ensure = file, mode = 644, owner = root,

Re: [Puppet Users] Environment specified by external nodes ignored

2010-12-14 Thread Nigel Kersten
On Tue, Dec 14, 2010 at 9:05 AM, Rameses Mss rmss60...@gmail.com wrote: On Tue, Dec 14, 2010 at 12:01 PM, Ohad Levy ohadl...@gmail.com wrote: On Tue, Dec 14, 2010 at 6:39 PM, Rameses Mss rmss60...@gmail.com wrote: On Tue, Dec 14, 2010 at 11:22 AM, Nigel Kersten ni...@puppetlabs.comwrote:

Re: [Puppet Users] Environment specified by external nodes ignored

2010-12-14 Thread Rameses Mss
On Tue, Dec 14, 2010 at 12:09 PM, Nigel Kersten ni...@puppetlabs.comwrote: On Tue, Dec 14, 2010 at 9:05 AM, Rameses Mss rmss60...@gmail.com wrote: On Tue, Dec 14, 2010 at 12:01 PM, Ohad Levy ohadl...@gmail.com wrote: On Tue, Dec 14, 2010 at 6:39 PM, Rameses Mss rmss60...@gmail.comwrote:

Re: [Puppet Users] n00b questions - verbosity of config????

2010-12-14 Thread Tim Watts
On 14/12/10 17:07, psyber wrote: On 12/14/2010 7:33 AM, Tim Watts wrote: Question 2 Related: In a simple case as per documentation: class syslog { file { /etc/syslog-ng/syslog-ng.conf: path = /etc/syslog-ng/syslog-ng.conf, ensure = file, mode = 644, owner = root,

Re: [Puppet Users] n00b questions - verbosity of config????

2010-12-14 Thread Felix Frank
OK - I did work out that the path is optional if the file block name is the same, I'm not in agreement with the abbreviated source line though - I like my files to be in the same basic tree as the target so I can find stuff and naming is fully deterministic - force of habit but I like that

Re: [Puppet Users] n00b questions - verbosity of config????

2010-12-14 Thread Tim Watts
Hi and thanks for the detailed reply :) On 14/12/10 16:38, Rameses Mss wrote: General suggestions: - Try not to fight Puppet. It's good but does require a certain way of thinking. Work with it and you'll get where you want to go. - Verbosity is not necessarily a bad thing in relatively static

Re: [Puppet Users] PluginModule issue

2010-12-14 Thread Stefan Schulte
On Tue, Dec 14, 2010 at 09:30:37AM -0600, Justin Ellis wrote: Good Morning! I'm working on implementing the glassfish module from ModuleForge so that we can use a Resource Type in our manifests instead of execs, but am getting an odd error on the client. Glassfish[domain1]: Failed to

Re: [Puppet Users] n00b questions - verbosity of config????

2010-12-14 Thread Tim Watts
On 14/12/10 17:54, Felix Frank wrote: OK - I did work out that the path is optional if the file block name is the same, I'm not in agreement with the abbreviated source line though - I like my files to be in the same basic tree as the target so I can find stuff and naming is fully deterministic

Re: [Puppet Users] n00b questions - verbosity of config????

2010-12-14 Thread Rameses Mss
On Tue, Dec 14, 2010 at 1:03 PM, Tim Watts t...@dionic.net wrote: Right. Now I'm not sure I see further down a solution unless it falls out of one of the environment or selector bits - I'll offer a standard problem and ask what the puppet way is if I may... OK - /etc/ssh/sshd_config - it's

Re: [Puppet Users] n00b questions - verbosity of config????

2010-12-14 Thread Peter Meier
OK - I think this should be a feature request. The logic would go: If installing a file on the target, create the path to the target root.root, mode 0755. Only the edge cases of other ownerships or different modes would need explicit configuration then. Uh, that sounds easier as it is,

[Puppet Users] Re: storeconfig / mysql

2010-12-14 Thread donavan
On Dec 12, 11:17 pm, walexey wale...@gmail.com wrote: Puppet (err): Could not retrieve catalog from remote server: Error 400 on SERVER: Mysql::Error: MySQL server has gone away how can i fix it? wbr, alw Would you happen to be running the puppet master(s) in mongrel? Yes, it

[Puppet Users] Difficulty Migrating to Mongrel

2010-12-14 Thread jkois
Hello, After running the puppetmaster on Webrick and struggling with clients dropping regularly, I have decided to migrate my install to Mongrel. I have followed the documentation posted on the Puppet wiki but continue to receive the following errors on the client: err: Could not call

Re: [Puppet Users] n00b questions - verbosity of config????

2010-12-14 Thread Tim Watts
On 14/12/10 18:53, Peter Meier wrote: OK - I think this should be a feature request. The logic would go: If installing a file on the target, create the path to the target root.root, mode 0755. Only the edge cases of other ownerships or different modes would need explicit configuration then.

Re: [Puppet Users] n00b questions - verbosity of config????

2010-12-14 Thread Peter Meier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Anyway as other people mentioned /files/ is rather deprecated and you should look into modules to organize your code. Does that stop me from keeping all my config files under a common tree? Not explicitly, but the idea of modules is to put code

[Puppet Users] Re: Hostname was not match with the server certificate

2010-12-14 Thread Dmytro Bablinyuk
Thank you very much! It worked! On Dec 14, 6:17 pm, Nan Liu n...@puppetlabs.com wrote: On Mon, Dec 13, 2010 at 11:16 PM, Dmytro Bablinyuk bablin...@gmail.com wrote: Hi Everybody, I have 2 machines, one that running puppetmasterd and another one that running client. Both run Ubuntu.

[Puppet Users] Re: Configure firewall with Puppet

2010-12-14 Thread Dmytro Bablinyuk
I have downloaded and deployed puppet-iptables (I have puppet 2.6.4) On both client and master config looks like this [main] logdir=/var/log/puppet vardir=/var/lib/puppet ssldir=/var/lib/puppet/ssl rundir=/var/run/puppet libdir=/var/lib/puppet/lib factpath=$vardir/lib/facter pluginsync=true

[Puppet Users] Re: service - explicit stats command

2010-12-14 Thread russell.fulton
That might be a typo in what you've written above but your script should be returning zero if everything is all right, not 1. 1 would indicate a problem and thus Puppet is trying to restart yourservice. Doh! -- no typo - that's the problem. I even have the docs that say it should be zero.

[Puppet Users] Re: Configure firewall with Puppet

2010-12-14 Thread Dmytro Bablinyuk
Thank you Ken, I have downloaded 1.2.0 iptables as you suggested. I copied ruby script r...@puppet-master:/etc/puppet/modules/type# ls -l total 32 -rw-rw-r-- 1 root root 31539 2010-10-30 03:37 iptables.rb Looks like I don't have other plugins, iptables is the only puppet plugin I have

[Puppet Users] Re: Configure firewall with Puppet

2010-12-14 Thread Dmytro Bablinyuk
You are life saver Ken! It's working r...@puppet-client-ubuntu:~# puppetd --waitforcert 60 --test info: Retrieving plugin notice: /File[/var/lib/puppet/lib/puppet]/ensure: created notice: /File[/var/lib/puppet/lib/puppet/test]/ensure: created notice:

[Puppet Users] Re: source /etc/profile

2010-12-14 Thread Ken Barber
Hi Adrian, I'm not sure but I imagine by just trying to 'source' the profile within the current puppet runtime the scope will be lost as it would be called within an exec? Obviously if you are not worried about running puppet multiple times you might be able to source it in your

[Puppet Users] Re: Configure firewall with Puppet

2010-12-14 Thread Ken Barber
Hi Dmytro, Your methodology for installing modules isn't quite right :-). Instead of trying to extract the iptables.rb file yourself you want to do something like: cd /etc/puppet/modules git clone git://github.com/bobsh/puppet-iptables.git iptables Which will give you a layout something

[Puppet Users] Re: Configure firewall with Puppet

2010-12-14 Thread Ken Barber
Hi Dmytro, So looking at what you have posted I can see a couple of things that trouble me: .. info: Retrieving plugin err: /File[/var/lib/puppet/lib]: Could not evaluate: Could not retrieve information from source(s) puppet://puppet/plugins .. Is this error always occurring? Are you

Re: [Puppet Users] puppetmaster 100%cpu usage on 2.6 (not on 0.24)

2010-12-14 Thread Nigel Kersten
On Tue, Dec 14, 2010 at 12:24 AM, Chris iwouldratherbesleeping...@gmail.com wrote: Hi I recently upgraded my puppet masters (and clients) from 0.24.8 to 2.6.4 Previously, my most busy puppet master would hover around about 0.9 load average, after the upgrade, its load hovers around 5 I

[Puppet Users] puppet dashboard group and class

2010-12-14 Thread Nicolas Aizier
Hi everyone, I'm actually kind of new in puppet but I'm doing good in progressing. I have read lot of docs and how to to understand the whole behaviour of puppet. Installed a puppet master server, deployed 15 clients to test it on some of our testing servers. Written modules to get exactly what

[Puppet Users] Re: Configure firewall with Puppet

2010-12-14 Thread Dmytro Bablinyuk
A quick question, If I run puppet more than one time it seems does not do anything, even if I change manifest file. r...@puppet-client-ubuntu:~# puppetd --waitforcert 60 --test info: Retrieving plugin info: Caching catalog for puppet-client-ubuntu info: Applying configuration version

[Puppet Users] Re: Configure firewall with Puppet

2010-12-14 Thread Dmytro Bablinyuk
I have found what the problem was I have now iptables {-2-: table = nat, chain = POSTROUTING, proto = udp, destination = 172.17.7.118, dport = 53, jump = MASQUERADE } It was quietly doing nothing if I remove from destination IP address. On Dec 15, 1:12 pm, Dmytro Bablinyuk

[Puppet Users] Re: Configure firewall with Puppet

2010-12-14 Thread Dmytro Bablinyuk
A quick question, I have modified iptables.rb to include some custom jump values. I have restarted puppetmasterd, but client still sees old jump values How do I make iptables.rb to recompile? Thank you Dmytro On Dec 15, 3:31 pm, Dmytro Bablinyuk bablin...@gmail.com wrote: I have found what the

Re: [Puppet Users] error in execution of script file

2010-12-14 Thread Patrick
On Dec 14, 2010, at 10:29 PM, sanjiv.singh wrote: exec {run_process: command = /usr/local/runprocess.sh, path = '/usr/bin:/bin:/usr/sbin:/sbin } Try putting just this in a file called test.pp. Then try this: puppet --verbose --debug test.pp -- You received this

[Puppet Users] having trouble with puppet 0.25.5 on openbsd 4.8 on amd64

2010-12-14 Thread Don Jackson
My manifest includes this snippet class app_client_openbsd { $app_client_pkgs_obsd = [ 'glib2-2.24.1p2', 'gtar-1.23p1' ] package { ${app_client_pkgs_obsd}: ensure = 'installed', source =

Re: [Puppet Users] having trouble with puppet 0.25.5 on openbsd 4.8 on amd64

2010-12-14 Thread Daniel Pittman
On Wed, Dec 15, 2010 at 17:45, Don Jackson puppet-us...@clark-communications.com wrote: My manifest includes this snippet class app_client_openbsd {   $app_client_pkgs_obsd = [ 'glib2-2.24.1p2', 'gtar-1.23p1' ]   package { ${app_client_pkgs_obsd}:     ensure = 'installed',     source =

[Puppet Users] Re: puppetmaster 100%cpu usage on 2.6 (not on 0.24)

2010-12-14 Thread Chris
Some useful info would be: OS OS version Ruby version Apache version/worker model Passenger version CentOS 5.2 ruby-1.8.5-5.el5_3.7 httpd-2.2.3-31.el5.centos.2 rubygem-passenger-2.2.11-2el5.ecn rubygem-rails-2.1.1-2.el5 rubygem-rack-1.1.0-1el5 -- You received this message because you

Re: [Puppet Users] having trouble with puppet 0.25.5 on openbsd 4.8 on amd64

2010-12-14 Thread Eric Sorenson
On Dec 14, 2010, at 11:04 PM, Daniel Pittman wrote: I think you will then run into the issue that $name can't be expanded at that point, though, which would require writing an extra define to make it available. :( I really thought that would work too and mocked it up but apparently it ain't

[Puppet Users] Re: puppet dashboard group and class

2010-12-14 Thread Christian
Hi Nicolas, i had exactly the same problem when i start using puppet dashboard some months ago. There is no documentation about it on the page and i would say that the names 'Classes' and 'Groups' are used unlucky. It turns out that classes acutally are the puppet modules (why the hell they dont