[Puppet Users] Re: puppetshow with puppetmaster 0.24.6

2009-01-08 Thread Rodney Quillo

Hi Luke,

I've tried to check the gems in my Ubuntu Hardy.
The trace also provided below, it seems Puppetshow is using older
gems?

Thanks again,
Rodney


$ gem list

actionmailer (2.2.2)
actionpack (2.2.2)
activerecord (2.2.2)
activeresource (2.2.2)
activesupport (2.2.2)
hobo (0.8.5)
hobofields (0.8.5)
hobosupport (0.8.5)
mislav-will_paginate (2.3.6)
rails (2.2.2)
rake (0.8.3)


$ rake production db:migrate --trace
(in /ebs1/puppetshow)
** Invoke production (first_time)
** Execute production
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
uninitialized constant ActiveSupport::Dependencies
/ebs1/puppetshow/vendor/rails/activerecord/lib/../../activesupport/lib/
active_support/dependencies.rb:266:in `load_missing_constant'
/ebs1/puppetshow/vendor/rails/activerecord/lib/../../activesupport/lib/
active_support/dependencies.rb:453:in `const_missing'
/var/lib/gems/1.8/gems/hobofields-0.8.5/lib/hobo_fields.rb:3
/usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
/usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `require'
/ebs1/puppetshow/vendor/rails/activerecord/lib/../../activesupport/lib/
active_support/dependencies.rb:496:in `require'
/ebs1/puppetshow/vendor/rails/activerecord/lib/../../activesupport/lib/
active_support/dependencies.rb:342:in `new_constants_in'
/ebs1/puppetshow/vendor/rails/activerecord/lib/../../activesupport/lib/
active_support/dependencies.rb:496:in `require'
/var/lib/gems/1.8/gems/hobofields-0.8.5/lib/hobofields.rb:1
/usr/lib/ruby/1.8/rubygems/custom_require.rb:32:in
`gem_original_require'
/usr/lib/ruby/1.8/rubygems/custom_require.rb:32:in `require'
/ebs1/puppetshow/vendor/rails/activerecord/lib/../../activesupport/lib/
active_support/dependencies.rb:496:in `require'
/ebs1/puppetshow/vendor/rails/activerecord/lib/../../activesupport/lib/
active_support/dependencies.rb:342:in `new_constants_in'
/ebs1/puppetshow/vendor/rails/activerecord/lib/../../activesupport/lib/
active_support/dependencies.rb:496:in `require'
/ebs1/puppetshow/vendor/plugins/hobo/init.rb:3:in `evaluate_init_rb'
/ebs1/puppetshow/config/../vendor/rails/railties/lib/rails/plugin.rb:
79:in `evaluate_init_rb'
/ebs1/puppetshow/vendor/rails/activerecord/lib/../../activesupport/lib/
active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
/ebs1/puppetshow/config/../vendor/rails/railties/lib/rails/plugin.rb:
75:in `evaluate_init_rb'
/ebs1/puppetshow/config/../vendor/rails/railties/lib/rails/plugin.rb:
39:in `load'
/ebs1/puppetshow/config/../vendor/rails/railties/lib/rails/plugin/
loader.rb:33:in `load_plugins'
/ebs1/puppetshow/config/../vendor/rails/railties/lib/rails/plugin/
loader.rb:32:in `each'
/ebs1/puppetshow/config/../vendor/rails/railties/lib/rails/plugin/
loader.rb:32:in `load_plugins'
/ebs1/puppetshow/config/../vendor/rails/railties/lib/initializer.rb:
189:in `load_plugins'
/ebs1/puppetshow/config/../vendor/rails/railties/lib/initializer.rb:
105:in `process'
/ebs1/puppetshow/config/../vendor/rails/railties/lib/initializer.rb:
49:in `send'
/ebs1/puppetshow/config/../vendor/rails/railties/lib/initializer.rb:
49:in `run'
/ebs1/puppetshow/config/environment.rb:42
/ebs1/puppetshow/vendor/rails/railties/lib/tasks/misc.rake:3:in
`require'
/ebs1/puppetshow/vendor/rails/railties/lib/tasks/misc.rake:3
/usr/lib/ruby/1.8/rake.rb:546:in `call'
/usr/lib/ruby/1.8/rake.rb:546:in `execute'
/usr/lib/ruby/1.8/rake.rb:541:in `each'
/usr/lib/ruby/1.8/rake.rb:541:in `execute'
/usr/lib/ruby/1.8/rake.rb:508:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/rake.rb:501:in `synchronize'
/usr/lib/ruby/1.8/rake.rb:501:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/rake.rb:518:in `invoke_prerequisites'
/usr/lib/ruby/1.8/rake.rb:1183:in `each'
/usr/lib/ruby/1.8/rake.rb:1183:in `send'
/usr/lib/ruby/1.8/rake.rb:1183:in `each'
/usr/lib/ruby/1.8/rake.rb:515:in `invoke_prerequisites'
/usr/lib/ruby/1.8/rake.rb:507:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/rake.rb:501:in `synchronize'
/usr/lib/ruby/1.8/rake.rb:501:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/rake.rb:494:in `invoke'
/usr/lib/ruby/1.8/rake.rb:1931:in `invoke_task'
/usr/lib/ruby/1.8/rake.rb:1909:in `top_level'
/usr/lib/ruby/1.8/rake.rb:1909:in `each'
/usr/lib/ruby/1.8/rake.rb:1909:in `top_level'
/usr/lib/ruby/1.8/rake.rb:1948:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1903:in `top_level'
/usr/lib/ruby/1.8/rake.rb:1881:in `run'
/usr/lib/ruby/1.8/rake.rb:1948:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1878:in `run'
/usr/bin/rake:28

On Jan 8, 2:49 pm, Luke Kanies  wrote:
> On Jan 7, 2009, at 9:16 PM, Rodney Quillo wrote:
>
>
>
> > Hi,
>
> > I'm using Puppetmaster version 0.24.6 with rails v2.0.2
> > Followed the wiki instruction for puppetshow  and storedconfiguration
> > enabled.
> > clone the repo for puppetshow to a directory.
>
> > When I execute on the puppet server:
> > $ rake production db:migrate
>
> > I got the following errors:
>
> > rake aborted!
> > uninitial

[Puppet Users] Re: realizing virtual packages with different provider (gem)

2009-01-08 Thread gary

Hello Joshua,

Thank you very much. I finally got around to trying this out and it
works nicely! But for some reason the unless grep didn't work. I had
it test for the installed gem directory:

define rubygems::install ( $ensure = 'true', $version ) {
  exec { "gem-$name":
command => "/usr/local/bin/gem install $name --version $version",
onlyif => "test -f /usr/local/bin/gem",
unless => "test -d  /usr/local/lib/ruby/gems/1.8/gems/${name}-$
{version}",
  }
}




On Dec 26 2008, 11:05 pm, "Joshua Timberman"
 wrote:
> Argh. Thats what I get pre-coffee. I'd also check the syntax and add
> the missing brace in the exec:
>
>
>
> >    unless => "gemlist --local rails | grep '${name}.*${version}'
>      }
> > }
>
> --
> Joshua Timbermanhttp://twitter.com/jtimberman
--~--~-~--~~~---~--~~
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: Conflicting gem / rpm names

2009-01-08 Thread gary

Hello Tim,

I ran into the same issue and Joshua suggested using an exec. It works
great. I may also change all my gem installs to use this since the
package provider also tries to install again if there's multiple
versions. Like with

capistrano (2.5.3, 2.1.0). <- can't tell 2.1.0 is installed.

http://groups.google.com/group/puppet-users/browse_thread/thread/6d4429c33bbdbb1d/cdc8c00b50b51eb9#cdc8c00b50b51eb9

I also found an old bug for this same issue. And another one about not
being able to provide arguments to gem install.

http://projects.reductivelabs.com/issues/show/1398
http://projects.reductivelabs.com/issues/show/1597

Gary

On Jan 1, 1:13 am, "Tim Harper"  wrote:
> Well, apparently nobody knows an easy solution.I
> ended up create my own ruby-enterprise-mysql rpm package, and all my
> troubles went away.  (though this is still an issue I'd like to know
> the answer to).Tim class="gmail_quote">On Tue, Dec 30, 2008 at 8:36 AM, Tim Harper 
>  wrote:
> class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc
> solid;padding-left:1ex;">I'm running in to an issue where I want to
> install agemnamed "mysql" and an rpm named "mysql".  Puppet
> complains about this when I've got bot directives in there, saying
> Package['mysql'] is already defined.
>
> I've tried using the alias command to alias them as mysql-rpm, and
> mysql-gem.  Puppet still complained about Package['mysql'] being
> defined twice.  Also tried this:
> package { "mysql-gem": name => "mysql", provider =>gem...
> package { "mysql-rpm": name => "mysql", provider => yum ...
> This also complained.  Does anyone suggestions on how to overcome
> this?  Can I use a suffix of somekind specific to the package
> attributes (like arch or version) to help puppet distinguish between
> the two.. or do I need to write my own "gem" type definition?
>
> Thanks!
> Tim
> 
--~--~-~--~~~---~--~~
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: facter variables not being used

2009-01-08 Thread Peter Meier

Hi

> This may not be the right place, but i hope it is :)

puppet-users might be the place to ask. I'm cc-ing the list.

> [...]
> any ideas?

use replace => false in the file definition and you don't have to  
distinguish with a fact:

http://reductivelabs.com/trac/puppet/wiki/TypeReference#file

"replace

Whether or not to replace a file that is sourced but exists. This is  
useful for using file sources purely for initialization. Valid values  
are true (also called yes), false (also called no)."

cheers 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
-~--~~~~--~~--~--~---



[Puppet Users] creating types with parameters from a hash (or array)

2009-01-08 Thread descala

Hello,

I want to create many symbolic links as provided by an external_nodes
script.

I started with a simple manifest to create a type for each element in
an array:

$files = [ '/tmp/one', '/tmp/two' ]
file { $files:
  ensure => '/tmp/common_target',
}

but, of course, this creates symlinks to the same file. I need
symlinks to diferent files. my question is: what about parameters? the
next example does not work, it just uses the last target for all
files:

$files = [ '/tmp/one', '/tmp/two' ]
$targets = [ '/tmp/target1', '/tmp/target2' ]
file { $files:
  ensure => $targets,
}

my external_nodes yaml looks like this:

parameters:
  symlinks:
/tmp/one:
   ensure: target1
/tmp/two:
   ensure: target2
classes:
- foo_class

and my dream manifest is:

file {$symlinks}

is it a new feature? if it is new I want to develop it, but need some
hints ...

thanks!
--~--~-~--~~~---~--~~
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: puppetshow with puppetmaster 0.24.6

2009-01-08 Thread Stasheck

Maybe a bit off-topic, but since when storedconfig works with Rails
2.x? I'm asking because 
http://reductivelabs.com/trac/puppet/wiki/UsingStoredConfiguration
explicitly says that only Rails 1.x is supported.

/BR
Stanislaw

On Jan 8, 9:59 am, Rodney Quillo  wrote:
> Hi Luke,
>
> I've tried to check the gems in my Ubuntu Hardy.
> The trace also provided below, it seems Puppetshow is using older
> gems?
>
> Thanks again,
> Rodney
>
> $ gem list
>
> actionmailer (2.2.2)
> actionpack (2.2.2)
> activerecord (2.2.2)
> activeresource (2.2.2)
> activesupport (2.2.2)
> hobo (0.8.5)
> hobofields (0.8.5)
> hobosupport (0.8.5)
> mislav-will_paginate (2.3.6)
> rails (2.2.2)
> rake (0.8.3)
>
> $ rake production db:migrate --trace
> (in /ebs1/puppetshow)
> ** Invoke production (first_time)
> ** Execute production
> ** Invoke db:migrate (first_time)
> ** Invoke environment (first_time)
> ** Execute environment
> rake aborted!
> uninitialized constant ActiveSupport::Dependencies
> /ebs1/puppetshow/vendor/rails/activerecord/lib/../../activesupport/lib/
> active_support/dependencies.rb:266:in `load_missing_constant'
> /ebs1/puppetshow/vendor/rails/activerecord/lib/../../activesupport/lib/
> active_support/dependencies.rb:453:in `const_missing'
> /var/lib/gems/1.8/gems/hobofields-0.8.5/lib/hobo_fields.rb:3
> /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in
> `gem_original_require'
> /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `require'
> /ebs1/puppetshow/vendor/rails/activerecord/lib/../../activesupport/lib/
> active_support/dependencies.rb:496:in `require'
> /ebs1/puppetshow/vendor/rails/activerecord/lib/../../activesupport/lib/
> active_support/dependencies.rb:342:in `new_constants_in'
> /ebs1/puppetshow/vendor/rails/activerecord/lib/../../activesupport/lib/
> active_support/dependencies.rb:496:in `require'
> /var/lib/gems/1.8/gems/hobofields-0.8.5/lib/hobofields.rb:1
> /usr/lib/ruby/1.8/rubygems/custom_require.rb:32:in
> `gem_original_require'
> /usr/lib/ruby/1.8/rubygems/custom_require.rb:32:in `require'
> /ebs1/puppetshow/vendor/rails/activerecord/lib/../../activesupport/lib/
> active_support/dependencies.rb:496:in `require'
> /ebs1/puppetshow/vendor/rails/activerecord/lib/../../activesupport/lib/
> active_support/dependencies.rb:342:in `new_constants_in'
> /ebs1/puppetshow/vendor/rails/activerecord/lib/../../activesupport/lib/
> active_support/dependencies.rb:496:in `require'
> /ebs1/puppetshow/vendor/plugins/hobo/init.rb:3:in `evaluate_init_rb'
> /ebs1/puppetshow/config/../vendor/rails/railties/lib/rails/plugin.rb:
> 79:in `evaluate_init_rb'
> /ebs1/puppetshow/vendor/rails/activerecord/lib/../../activesupport/lib/
> active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
> /ebs1/puppetshow/config/../vendor/rails/railties/lib/rails/plugin.rb:
> 75:in `evaluate_init_rb'
> /ebs1/puppetshow/config/../vendor/rails/railties/lib/rails/plugin.rb:
> 39:in `load'
> /ebs1/puppetshow/config/../vendor/rails/railties/lib/rails/plugin/
> loader.rb:33:in `load_plugins'
> /ebs1/puppetshow/config/../vendor/rails/railties/lib/rails/plugin/
> loader.rb:32:in `each'
> /ebs1/puppetshow/config/../vendor/rails/railties/lib/rails/plugin/
> loader.rb:32:in `load_plugins'
> /ebs1/puppetshow/config/../vendor/rails/railties/lib/initializer.rb:
> 189:in `load_plugins'
> /ebs1/puppetshow/config/../vendor/rails/railties/lib/initializer.rb:
> 105:in `process'
> /ebs1/puppetshow/config/../vendor/rails/railties/lib/initializer.rb:
> 49:in `send'
> /ebs1/puppetshow/config/../vendor/rails/railties/lib/initializer.rb:
> 49:in `run'
> /ebs1/puppetshow/config/environment.rb:42
> /ebs1/puppetshow/vendor/rails/railties/lib/tasks/misc.rake:3:in
> `require'
> /ebs1/puppetshow/vendor/rails/railties/lib/tasks/misc.rake:3
> /usr/lib/ruby/1.8/rake.rb:546:in `call'
> /usr/lib/ruby/1.8/rake.rb:546:in `execute'
> /usr/lib/ruby/1.8/rake.rb:541:in `each'
> /usr/lib/ruby/1.8/rake.rb:541:in `execute'
> /usr/lib/ruby/1.8/rake.rb:508:in `invoke_with_call_chain'
> /usr/lib/ruby/1.8/rake.rb:501:in `synchronize'
> /usr/lib/ruby/1.8/rake.rb:501:in `invoke_with_call_chain'
> /usr/lib/ruby/1.8/rake.rb:518:in `invoke_prerequisites'
> /usr/lib/ruby/1.8/rake.rb:1183:in `each'
> /usr/lib/ruby/1.8/rake.rb:1183:in `send'
> /usr/lib/ruby/1.8/rake.rb:1183:in `each'
> /usr/lib/ruby/1.8/rake.rb:515:in `invoke_prerequisites'
> /usr/lib/ruby/1.8/rake.rb:507:in `invoke_with_call_chain'
> /usr/lib/ruby/1.8/rake.rb:501:in `synchronize'
> /usr/lib/ruby/1.8/rake.rb:501:in `invoke_with_call_chain'
> /usr/lib/ruby/1.8/rake.rb:494:in `invoke'
> /usr/lib/ruby/1.8/rake.rb:1931:in `invoke_task'
> /usr/lib/ruby/1.8/rake.rb:1909:in `top_level'
> /usr/lib/ruby/1.8/rake.rb:1909:in `each'
> /usr/lib/ruby/1.8/rake.rb:1909:in `top_level'
> /usr/lib/ruby/1.8/rake.rb:1948:in `standard_exception_handling'
> /usr/lib/ruby/1.8/rake.rb:1903:in `top_level'
> /usr/lib/ruby/1.8/rake.rb:1881:in `run'
> /usr/lib/ruby/1.8/rake.rb:1948:in `standard_exception_handling'
> /usr/lib/ruby/1.8/rake.rb:18

[Puppet Users] Puppet client hangs if LDAP server is not accessible

2009-01-08 Thread Kenneth Holter

Hi.


I've noticed that on servers that are both puppet and LDAP clients,
the puppet client will hang if the LDAP server is not reachable. Does
anyone know what the reason for this is?

Regards,
Kenneth Holter

--~--~-~--~~~---~--~~
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: puppetd --noop not "nooping" at all

2009-01-08 Thread ant

> Can you open an issue with the description of the problem and attach any
> logs and config files to help reproduce the behavior.

Hi Andrew

The issue is now logged with the steps to reproduce as:
http://projects.reductivelabs.com/issues/show/1855

Thanks
-ant
--~--~-~--~~~---~--~~
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: puppetshow with puppetmaster 0.24.6

2009-01-08 Thread Rodney Quillo


I've run puppet server with storedconfig enable with no problem.
The mysql db were populated with puppet information successfully.

I'm not sure why the doc says it requires Rails 1.x also, or it is
puppetshow that is not updated to for Rails 2.x?

Rodney


On Jan 8, 8:28 pm, Stasheck  wrote:
> Maybe a bit off-topic, but since when storedconfig works with Rails
> 2.x? I'm asking 
> becausehttp://reductivelabs.com/trac/puppet/wiki/UsingStoredConfiguration
> explicitly says that only Rails 1.x is supported.
>
> /BR
> Stanislaw
>
> On Jan 8, 9:59 am, Rodney Quillo  wrote:
>
> > Hi Luke,
>
> > I've tried to check the gems in my Ubuntu Hardy.
> > The trace also provided below, it seems Puppetshow is using older
> > gems?
>
> > Thanks again,
> > Rodney
>
> > $ gem list
>
> > actionmailer (2.2.2)
> > actionpack (2.2.2)
> > activerecord (2.2.2)
> > activeresource (2.2.2)
> > activesupport (2.2.2)
> > hobo (0.8.5)
> > hobofields (0.8.5)
> > hobosupport (0.8.5)
> > mislav-will_paginate (2.3.6)
> > rails (2.2.2)
> > rake (0.8.3)
>
> > $ rake production db:migrate --trace
> > (in /ebs1/puppetshow)
> > ** Invoke production (first_time)
> > ** Execute production
> > ** Invoke db:migrate (first_time)
> > ** Invoke environment (first_time)
> > ** Execute environment
> > rake aborted!
> > uninitialized constant ActiveSupport::Dependencies
> > /ebs1/puppetshow/vendor/rails/activerecord/lib/../../activesupport/lib/
> > active_support/dependencies.rb:266:in `load_missing_constant'
> > /ebs1/puppetshow/vendor/rails/activerecord/lib/../../activesupport/lib/
> > active_support/dependencies.rb:453:in `const_missing'
> > /var/lib/gems/1.8/gems/hobofields-0.8.5/lib/hobo_fields.rb:3
> > /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in
> > `gem_original_require'
> > /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `require'
> > /ebs1/puppetshow/vendor/rails/activerecord/lib/../../activesupport/lib/
> > active_support/dependencies.rb:496:in `require'
> > /ebs1/puppetshow/vendor/rails/activerecord/lib/../../activesupport/lib/
> > active_support/dependencies.rb:342:in `new_constants_in'
> > /ebs1/puppetshow/vendor/rails/activerecord/lib/../../activesupport/lib/
> > active_support/dependencies.rb:496:in `require'
> > /var/lib/gems/1.8/gems/hobofields-0.8.5/lib/hobofields.rb:1
> > /usr/lib/ruby/1.8/rubygems/custom_require.rb:32:in
> > `gem_original_require'
> > /usr/lib/ruby/1.8/rubygems/custom_require.rb:32:in `require'
> > /ebs1/puppetshow/vendor/rails/activerecord/lib/../../activesupport/lib/
> > active_support/dependencies.rb:496:in `require'
> > /ebs1/puppetshow/vendor/rails/activerecord/lib/../../activesupport/lib/
> > active_support/dependencies.rb:342:in `new_constants_in'
> > /ebs1/puppetshow/vendor/rails/activerecord/lib/../../activesupport/lib/
> > active_support/dependencies.rb:496:in `require'
> > /ebs1/puppetshow/vendor/plugins/hobo/init.rb:3:in `evaluate_init_rb'
> > /ebs1/puppetshow/config/../vendor/rails/railties/lib/rails/plugin.rb:
> > 79:in `evaluate_init_rb'
> > /ebs1/puppetshow/vendor/rails/activerecord/lib/../../activesupport/lib/
> > active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
> > /ebs1/puppetshow/config/../vendor/rails/railties/lib/rails/plugin.rb:
> > 75:in `evaluate_init_rb'
> > /ebs1/puppetshow/config/../vendor/rails/railties/lib/rails/plugin.rb:
> > 39:in `load'
> > /ebs1/puppetshow/config/../vendor/rails/railties/lib/rails/plugin/
> > loader.rb:33:in `load_plugins'
> > /ebs1/puppetshow/config/../vendor/rails/railties/lib/rails/plugin/
> > loader.rb:32:in `each'
> > /ebs1/puppetshow/config/../vendor/rails/railties/lib/rails/plugin/
> > loader.rb:32:in `load_plugins'
> > /ebs1/puppetshow/config/../vendor/rails/railties/lib/initializer.rb:
> > 189:in `load_plugins'
> > /ebs1/puppetshow/config/../vendor/rails/railties/lib/initializer.rb:
> > 105:in `process'
> > /ebs1/puppetshow/config/../vendor/rails/railties/lib/initializer.rb:
> > 49:in `send'
> > /ebs1/puppetshow/config/../vendor/rails/railties/lib/initializer.rb:
> > 49:in `run'
> > /ebs1/puppetshow/config/environment.rb:42
> > /ebs1/puppetshow/vendor/rails/railties/lib/tasks/misc.rake:3:in
> > `require'
> > /ebs1/puppetshow/vendor/rails/railties/lib/tasks/misc.rake:3
> > /usr/lib/ruby/1.8/rake.rb:546:in `call'
> > /usr/lib/ruby/1.8/rake.rb:546:in `execute'
> > /usr/lib/ruby/1.8/rake.rb:541:in `each'
> > /usr/lib/ruby/1.8/rake.rb:541:in `execute'
> > /usr/lib/ruby/1.8/rake.rb:508:in `invoke_with_call_chain'
> > /usr/lib/ruby/1.8/rake.rb:501:in `synchronize'
> > /usr/lib/ruby/1.8/rake.rb:501:in `invoke_with_call_chain'
> > /usr/lib/ruby/1.8/rake.rb:518:in `invoke_prerequisites'
> > /usr/lib/ruby/1.8/rake.rb:1183:in `each'
> > /usr/lib/ruby/1.8/rake.rb:1183:in `send'
> > /usr/lib/ruby/1.8/rake.rb:1183:in `each'
> > /usr/lib/ruby/1.8/rake.rb:515:in `invoke_prerequisites'
> > /usr/lib/ruby/1.8/rake.rb:507:in `invoke_with_call_chain'
> > /usr/lib/ruby/1.8/rake.rb:501:in `synchronize'
> > /usr/lib/ruby/1.8/rake.rb:501:in `invoke_with

[Puppet Users] Re: some ideas for facts

2009-01-08 Thread Helmut Lichtenberg

James Turnbull schrieb am 07. Jan 2009 um 22:03:03 CET:
> windowsrefund wrote:
> > I've got a check defined in nagios that allows me to determine if a
> > puppet client has not updated itself in awhile
> > 
> > /usr/lib/nagios/plugins/check_file_age -f /var/lib/puppet/state/
> > state.yaml -w 3600 -c 4000
> 
> Have you seen the puppetlast script?  It's in the ext/ directory of the
> Puppet package.  That might be useful too.

This script runs only on the puppetmaster (at least for Debian Lenny, it's
part of the puppetmaster-package) and it displays a list of hosts and when the
last run was.

I would also prefer a by-host check like the OP. Is anything wrong with the
proposed check_file_age?

Helmut

-- 
-
Helmut LichtenbergTel.: 05034/871-128
Institut für Nutztiergenetik (FLI) 31535 Neustadt Germany
-

--~--~-~--~~~---~--~~
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: some ideas for facts

2009-01-08 Thread AJ Christensen

How about check_puppet.rb in ext/ ? This one runs on the clients =)

Regards,

AJ


On 9/01/09 3:16 AM, "Helmut Lichtenberg" 
wrote:

> 
> James Turnbull schrieb am 07. Jan 2009 um 22:03:03 CET:
>> windowsrefund wrote:
>>> I've got a check defined in nagios that allows me to determine if a
>>> puppet client has not updated itself in awhile
>>> 
>>> /usr/lib/nagios/plugins/check_file_age -f /var/lib/puppet/state/
>>> state.yaml -w 3600 -c 4000
>> 
>> Have you seen the puppetlast script?  It's in the ext/ directory of the
>> Puppet package.  That might be useful too.
> 
> This script runs only on the puppetmaster (at least for Debian Lenny, it's
> part of the puppetmaster-package) and it displays a list of hosts and when the
> last run was.
> 
> I would also prefer a by-host check like the OP. Is anything wrong with the
> proposed check_file_age?
> 
> Helmut



--~--~-~--~~~---~--~~
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 client hangs if LDAP server is not accessible

2009-01-08 Thread Luke Kanies

On Jan 8, 2009, at 7:18 AM, Kenneth Holter wrote:

>
> Hi.
>
>
> I've noticed that on servers that are both puppet and LDAP clients,
> the puppet client will hang if the LDAP server is not reachable. Does
> anyone know what the reason for this is?


I'd expect everything on the server to hang in that case; Puppet, like  
most applications, does things like get usernames for directory  
listings, and if that process hangs, then Puppet hangs.

-- 
Real freedom lies in wildness, not in civilization.
 -- Charles Lindbergh
-
Luke Kanies | http://reductivelabs.com | http://madstop.com


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: puppetshow with puppetmaster 0.24.6

2009-01-08 Thread Luke Kanies

On Jan 8, 2009, at 6:28 AM, Stasheck wrote:

> Maybe a bit off-topic, but since when storedconfig works with Rails
> 2.x? I'm asking because 
> http://reductivelabs.com/trac/puppet/wiki/UsingStoredConfiguration
> explicitly says that only Rails 1.x is supported.


Those docs are out of date.  I'll fix them.  StoreConfigs works fine  
with 2.x, although possibly not with the absolute latest stuff.

-- 
To succeed in the world it is not enough to be stupid, you must also
be well-mannered. -- Voltaire
-
Luke Kanies | http://reductivelabs.com | http://madstop.com


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Executing a command once after an action.

2009-01-08 Thread Nico De Ranter


Hi,

I'm certain there must be an easy way to do this but I just can't figure
out how.

I'm looking for a way to execute a script *once* after a certain
operation (e.g. installing a package or a certain file) has occured.  I
can make the exec 'require' the file or package but then it runs every
time puppetd gets executed after the file or package gets installed. 

How can I do this?

Thanks in advance,

Nico

-- 
 With kind regards,

Nico De Ranter
Senior System Administrator

Sony Techsoft Centre
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
 
Phone: +32 (0)2 700 8641
Fax: +32 (0)2 700 8622
E-mail: nico.deran...@eu.sony.com
Internet: www.sony-europe.com
 
Sony Technology and Software Centre Europe
A division of Sony Service Centre (Europe) N.V.
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium
VAT BE 0413.825.160 · RPR Brussels
Fortis Bank Londerzeel 293-0376800-10 GEBA-BE-BB


--~--~-~--~~~---~--~~
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: Executing a command once after an action.

2009-01-08 Thread Jeffrey Hulten

Instead of requiring the file, subscribe to it. Also, to only run when
the package changes set refreshonly to true.

file { "/test" :
 source => "puppet:///test/testfile" }

exec { "run once on test file" :
 cmd => "/bin/echo running",
 refreshonly => true,
 subscribe => File["/test"],
}

On Thu, Jan 8, 2009 at 8:53 AM, Nico De Ranter  wrote:
>
>
> Hi,
>
> I'm certain there must be an easy way to do this but I just can't figure
> out how.
>
> I'm looking for a way to execute a script *once* after a certain
> operation (e.g. installing a package or a certain file) has occured.  I
> can make the exec 'require' the file or package but then it runs every
> time puppetd gets executed after the file or package gets installed.
>
> How can I do this?
>
> Thanks in advance,
>
> Nico
>
> --
>  With kind regards,
>
> Nico De Ranter
> Senior System Administrator
>
> Sony Techsoft Centre
> The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
>
> Phone: +32 (0)2 700 8641
> Fax: +32 (0)2 700 8622
> E-mail: nico.deran...@eu.sony.com
> Internet: www.sony-europe.com
>
> Sony Technology and Software Centre Europe
> A division of Sony Service Centre (Europe) N.V.
> Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium
> VAT BE 0413.825.160 · RPR Brussels
> Fortis Bank Londerzeel 293-0376800-10 GEBA-BE-BB
>
>
> >
>

--~--~-~--~~~---~--~~
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: problem with tag()?

2009-01-08 Thread Jeffrey Hulten
Another issue potentially in 0.25.5...

If I set a tag in an inherited node it is not present on directives
(files, etc.) run down the chain...

node foo {
 tag(tagme)
}

node bar inherits foo {
 rundefine { "no tag here" }
}

But it appears if you tag the node directly

node foo {}

node bar inherits foo {
 tag(tagme)
 rundefine { "tag is okay here" }
}

Am I misunderstanding how tags work or is this a bug?

On Wed, Jan 7, 2009 at 10:44 PM, Luke Kanies  wrote:
>
> On Jan 6, 2009, at 5:49 AM, Grzegorz Marszałek wrote:
>
>>
>> Hello
>>
>> When I run this with puppet 0.24.7 (puppet --debug test2.pp):
>>
>> File { backup => false }
>>
>> define cfile {
>>   tag("$name")
>>   file { "/tmp/cfile_$name": content => "test" }
>>   file { "/tmp/dfile_$name": content => "test" }
>> }
>> @cfile { "s1":  }
>> @cfile { "s2":  }
>> @cfile { "s3":  }
>> Cfile <| tag=="s1"  |>
>>
>> nothing happens, while this works as expected (only cfile with "s1"
>> tag is realized):
>>
>> File { backup => false }
>>
>> define cfile {
>>   tag("$name")
>>   file { "/tmp/cfile_$name": content => "test" }
>>   file { "/tmp/dfile_$name": content => "test" }
>> }
>> @cfile { "s1":  tag=>"s1" }
>> @cfile { "s2":  tag=>"s2" }
>> @cfile { "s3":  tag=>"s3" }
>> Cfile <| tag=="s1"  |>
>>
>> So, how exactly tag function is working? After reading documentation I
>> assume that it should do the trick and first example should work.
>
> I don't really understand your question; these two snippets seem
> identical.
>
> You're saying, though, that even the s1 cfile isn't showing up on your
> client?
>
> I'm not actually positive of the state of tagging in the language
> ATM.  Try it with 'tags => $name' on the resource; I don't think the
> resource tags and language tags have been entirely unified, depending
> on the release.
>
> And if you're running 0.24.7 (or are willing to test on it and it
> still fails), please file a bug if one hasn't been filed.
>
> --
> I take my children everywhere, but they always find their way
> back home. --Robert Orben
> -
> Luke Kanies | http://reductivelabs.com | http://madstop.com
>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Puppet client hangs if LDAP server is not accessible

2009-01-08 Thread Adam Jacob

On Jan 8, 2009, at 5:18 AM, Kenneth Holter wrote:
> I've noticed that on servers that are both puppet and LDAP clients,
> the puppet client will hang if the LDAP server is not reachable. Does
> anyone know what the reason for this is?

You should start using nscd (or your platform equivilant,) which will  
at least allow your name service lookups to complete.  If you are  
using OpenLDAP, ensure that you have soft_bind set on the clients.

If you are using nss_ldap, I recommend looking at nss_ldapd 
(http://ch.tudelft.nl/~arthur/nss-ldapd/design.html 
) as a super nice replacement.

Regards,
Adam

--~--~-~--~~~---~--~~
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] Issue with a new fact

2009-01-08 Thread Jeff Leggett

So I wrote a new fact to determine  clients proxy.  Work's great when
I call it via facter as a single:

[jlegg...@lxp6d11m8v190 jleggett]$ facter etproxy
10.X.Y.Z:8080

But when I call facter alone (for full output of all facts) I see this
at beginning:


[jlegg...@lxp6d11m8v190 jleggett]$ facter
/opt/etrade/p6/lib/ruby/site_ruby/1.8/facter/util/loader.rb:72:
command not found: facter ipaddress
10.X.Y.Z:8080

(I call fatcer ipaddress in my new fact - is that the problem?)

Nothing here indicates I need to do something else:
http://reductivelabs.com/trac/puppet/wiki/AddingFacts ?

What'd I do wrong?
--~--~-~--~~~---~--~~
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: Testing puppet manifests

2009-01-08 Thread Ben Beuchler

> since many times, a given node has uses many different modules (which are
> managed by different people) we decided to tag our "stable" modules (e.g.
> associate it with a version) and generate an environment out of tested
> combination of the stable modules.

Would you be willing to describe this process in a bit more detail?

-Ben

--~--~-~--~~~---~--~~
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] Feature request runinterval + $random

2009-01-08 Thread Christopher

Hello...

I have an existing puppet setup that works very well except for one
thing.  Occasionally the puppetmaster is busy and the clients tend to
"bunch up".  Then on the next client run they tend to "bunch up" again
causing the puppetmaster to be slow down due to the high load which
causes more slow downs.  This example should show what is happending:

shell> grep ": Compiled catalog for " all.log | cut -d: -f 1-2 | uniq -c
   1 Jan  8 10:59
   8 Jan  8 11:00
  14 Jan  8 11:01
   2 Jan  8 11:02
   1 Jan  8 11:08
  15 Jan  8 11:10
  12 Jan  8 11:11
   1 Jan  8 11:20

The above shows an idle time followed by a rush of puppet clients
hitting the puppetmaster followed by another idle time.

This is probably worse when clients run a logrotate script with a client
restart from a cronjob. 

I would suggest something like the runinterval be $runinterval +
$(random number of seconds between 1 and 120) || $(random number of
seconds between 1 and $runinterval*0.1 )

That should help spread out the load on the server.




-- 
Christopher 


--~--~-~--~~~---~--~~
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: Feature request runinterval + $random

2009-01-08 Thread windowsrefund

I believe the client side 'splay' option takes care of this.

Best,
Adam

On Jan 8, 3:17 pm, Christopher  wrote:
> Hello...
>
> I have an existing puppet setup that works very well except for one
> thing.  Occasionally the puppetmaster is busy and the clients tend to
> "bunch up".  Then on the next client run they tend to "bunch up" again
> causing the puppetmaster to be slow down due to the high load which
> causes more slow downs.  This example should show what is happending:
>
> shell> grep ": Compiled catalog for " all.log | cut -d: -f 1-2 | uniq -c
>    1 Jan  8 10:59
>    8 Jan  8 11:00
>   14 Jan  8 11:01
>    2 Jan  8 11:02
>    1 Jan  8 11:08
>   15 Jan  8 11:10
>   12 Jan  8 11:11
>    1 Jan  8 11:20
>
> The above shows an idle time followed by a rush of puppet clients
> hitting the puppetmaster followed by another idle time.
>
> This is probably worse when clients run a logrotate script with a client
> restart from a cronjob.
>
> I would suggest something like the runinterval be $runinterval +
> $(random number of seconds between 1 and 120) || $(random number of
> seconds between 1 and $runinterval*0.1 )
>
> That should help spread out the load on the server.
>
> --
> Christopher 
--~--~-~--~~~---~--~~
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: Redundant Puppet Master Servers

2009-01-08 Thread Digant C Kasundra


> > How can the state files be shared between servers?
> 
> DRBD.

Considering a load-balanced environment, it seems this might not be optimal.  
Perhaps the puppetmaster need the ability to store the state information in a 
database.

-- 
Digant C Kasundra 
Technical Lead, ITS Unix Systems and Applications, Stanford University

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Issue with a new fact

2009-01-08 Thread James Turnbull

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jeff Leggett wrote:
> So I wrote a new fact to determine  clients proxy.  Work's great when
> I call it via facter as a single:
> 
> [jlegg...@lxp6d11m8v190 jleggett]$ facter etproxy
> 10.X.Y.Z:8080
> 
> But when I call facter alone (for full output of all facts) I see this
> at beginning:
> 
> 
> [jlegg...@lxp6d11m8v190 jleggett]$ facter
> /opt/etrade/p6/lib/ruby/site_ruby/1.8/facter/util/loader.rb:72:
> command not found: facter ipaddress
> 10.X.Y.Z:8080
> 
> (I call fatcer ipaddress in my new fact - is that the problem?)
> 
> Nothing here indicates I need to do something else:
> http://reductivelabs.com/trac/puppet/wiki/AddingFacts ?
> 
> What'd I do wrong?

Can you pastie your code?

Do you call facter ipaddress as a binary or use:

Facter.value(:ipaddress)

Regards

James Turnbull

- --
Author of:
* Pulling Strings with Puppet
(http://www.amazon.com/gp/product/1590599780/)
* Pro Nagios 2.0
(http://www.amazon.com/gp/product/1590596099/)
* Hardening Linux
(http://www.amazon.com/gp/product/159059/)

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJZm6e9hTGvAxC30ARAtT8AJwO6hah0YC0FWv3UbD7b+kos4Ku0gCeNsF7
/2fHE+dAc5PW+DWU6O+jhW4=
=hQBC
-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] Re: Facter and loops.

2009-01-08 Thread Jos Backus

On Thu, Jan 08, 2009 at 12:41:14AM -0600, Luke Kanies wrote:
> The problem here is that the block passed to 'setcode' isn't run until  
> later, at which point $6 is set to the last user's homedir.  Try this:
> 
> Facter.add("...") do
>homedir = $6 # dereference immediately
>setcode { homedir }
> end
> 
> This works because 'homedir' is local to each fact definition, whereas  
> $6 is global.  At least, it *should* work. :)
 
I figured the $6.dup would create a local copy. Guess it works differently for
globals, or I'm missing something obvious. I didn't actually look at what
setcode does, but that explains it.

> Yes, I know you already found a solution, but this is more a ruby  
> question than a Puppet/Facter question, and I figure it's worth  
> pointing out the correct solution.

Thanks Luke.

-- 
Jos Backus
jos at catnook.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Redundant Puppet Master Servers

2009-01-08 Thread Adam Jacob

On Jan 8, 2009, at 1:00 PM, Digant C Kasundra wrote:
>>> How can the state files be shared between servers?
>>
>> DRBD.
>
> Considering a load-balanced environment, it seems this might not be  
> optimal.  Perhaps the puppetmaster need the ability to store the  
> state information in a database.

A document database, a-la CouchDB, would be great here.

Adam

--~--~-~--~~~---~--~~
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: Redundant Puppet Master Servers

2009-01-08 Thread Aaron Lippold

Hi,

Has anyone done this across multiple site, let's say, 13 sites, with a
primary-primary, backup-backup at each site?

How far does DRDB and Heartbeat take you across sites?

A

On Thu, Jan 8, 2009 at 5:00 PM, Adam Jacob  wrote:
>
> On Jan 8, 2009, at 1:00 PM, Digant C Kasundra wrote:
 How can the state files be shared between servers?
>>>
>>> DRBD.
>>
>> Considering a load-balanced environment, it seems this might not be
>> optimal.  Perhaps the puppetmaster need the ability to store the
>> state information in a database.
>
> A document database, a-la CouchDB, would be great here.
>
> Adam
>
> >
>

--~--~-~--~~~---~--~~
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] modules per OS

2009-01-08 Thread chakkerz

Hello there

I've been advised to do modules instead of massive class files. Sounds
fine and based on http://reductivelabs.com/trac/puppet/wiki/ModuleOrganisation
i've got:
[r...@puppetbeta puppet]# pwd
/etc/puppet
[r...@puppetbeta puppet]# find
.
./puppet.conf
./fileserver.conf
./modules
./modules/cust
./modules/cust/plugins
./modules/cust/plugins/facter
./modules/cust/plugins/facter/deploy_sudoers.rb
./modules/cust/plugins/puppet
./modules/cust/plugins/puppet/type
./modules/cust/plugins/puppet/provider
./modules/sudoers_linux
./modules/sudoers_linux/depends
./modules/sudoers_linux/files
./modules/sudoers_linux/templates
./modules/sudoers_linux/manifests
./modules/sudoers_linux/manifests/init.pp
./manifests
./manifests/site.pp
./manifests/nodes.pp
./manifests/classes
./manifests/classes/solaris.classes
./manifests/classes/freebsd.classes
./manifests/classes/linux.classes
./manifests/classes/shared.classes

and thus my linux class looks like:

import "sudoers_linux"

class linux_default
{
include sudoers_linux
}

i tried 'import "*_linux" ' but it didn't like that. Now i understand
that ./modules/ is hardcoded (i could be wrong?) so how
can i put the linux modules into a linux area?

I realize i'm probably dense, and my example is a bit contrived, but i
don't want the mess cfengine has become so i want the OSs
separated... :)

Any thoughts appreciated

chakkerz

--~--~-~--~~~---~--~~
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: Feature request runinterval + $random

2009-01-08 Thread Ryan Dooley

Have you checked out the splay option?

Alternatively, I've since moved on from splay to use a cron job to run 
puppetd.  I have a meta package that pulls in puppet and drops in a root 
cron job entry based on the mac address of the host's primary interface 
during the post-install step of rpm.

Cheers,
Ryan

On 1/8/09 12:17 PM, Christopher wrote:
> Hello...
>
> I have an existing puppet setup that works very well except for one
> thing.  Occasionally the puppetmaster is busy and the clients tend to
> "bunch up".  Then on the next client run they tend to "bunch up" again
> causing the puppetmaster to be slow down due to the high load which
> causes more slow downs.  This example should show what is happending:
>
> shell>  grep ": Compiled catalog for " all.log | cut -d: -f 1-2 | uniq -c
> 1 Jan  8 10:59
> 8 Jan  8 11:00
>14 Jan  8 11:01
> 2 Jan  8 11:02
> 1 Jan  8 11:08
>15 Jan  8 11:10
>12 Jan  8 11:11
> 1 Jan  8 11:20
>
> The above shows an idle time followed by a rush of puppet clients
> hitting the puppetmaster followed by another idle time.
>
> This is probably worse when clients run a logrotate script with a client
> restart from a cronjob.
>
> I would suggest something like the runinterval be $runinterval +
> $(random number of seconds between 1 and 120) || $(random number of
> seconds between 1 and $runinterval*0.1 )
>
> That should help spread out the load on the server.
>
>
>
>


--~--~-~--~~~---~--~~
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: Feature request runinterval + $random

2009-01-08 Thread Ohad Levy
I also use cron, but I found using the IP address last bit as a more
effective way to "randomize" it.

more info here:
http://reductivelabs.com/trac/puppet/wiki/Recipes/cron

Cheers,
Ohad

On Fri, Jan 9, 2009 at 9:21 AM, Ryan Dooley  wrote:

>
> Have you checked out the splay option?
>
> Alternatively, I've since moved on from splay to use a cron job to run
> puppetd.  I have a meta package that pulls in puppet and drops in a root
> cron job entry based on the mac address of the host's primary interface
> during the post-install step of rpm.
>
> Cheers,
> Ryan
>
> On 1/8/09 12:17 PM, Christopher wrote:
> > Hello...
> >
> > I have an existing puppet setup that works very well except for one
> > thing.  Occasionally the puppetmaster is busy and the clients tend to
> > "bunch up".  Then on the next client run they tend to "bunch up" again
> > causing the puppetmaster to be slow down due to the high load which
> > causes more slow downs.  This example should show what is happending:
> >
> > shell>  grep ": Compiled catalog for " all.log | cut -d: -f 1-2 | uniq -c
> > 1 Jan  8 10:59
> > 8 Jan  8 11:00
> >14 Jan  8 11:01
> > 2 Jan  8 11:02
> > 1 Jan  8 11:08
> >15 Jan  8 11:10
> >12 Jan  8 11:11
> > 1 Jan  8 11:20
> >
> > The above shows an idle time followed by a rush of puppet clients
> > hitting the puppetmaster followed by another idle time.
> >
> > This is probably worse when clients run a logrotate script with a client
> > restart from a cronjob.
> >
> > I would suggest something like the runinterval be $runinterval +
> > $(random number of seconds between 1 and 120) || $(random number of
> > seconds between 1 and $runinterval*0.1 )
> >
> > That should help spread out the load on the server.
> >
> >
> >
> >
>
>
> >
>

--~--~-~--~~~---~--~~
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: Testing puppet manifests

2009-01-08 Thread Ohad Levy
Ok - I'll try to make it as simple as I can...

***Modules***

We define 3 types of modules (its just our internal definition):
1. host type - this module is the only class that the node would have and
its it primary function of the host (e.g. you can't use more than one  host
type module in one node)
2. service modules - modules which are usually shared between different host
type modules (e.g. ssh, apache etc), one special module here is the
host-base which every host-type module inherits
3. site modules, these are site specific modules which only apply to a
certain location.

***Version Control***

we use tagging extensively - e.g. when a module is ready for testing, it is
being tagged, if everything is ready, its tagged again is production.

Tagging associate a version to the module - e.g. ssh_1.5

everyone can checkin stuff into the head, but unless they are not tagged,
they would only impact machines which are in the development environment

*** environments ***

environments can be defined per location, application or a mix of the two

for example, the environment global-puppetmasters would include the module
ssh_1.5, apache_1.0 

this allows each environment to use a different pretested state of each
module.

a configuration example:

  module_dir { "/etc/puppet/env/global_puppetmaster":}

# Stable service modules #
  modules { "PP-host-base": module => "host-base", site =>
"global_puppetmaster", type => "services", version => "0.12"}
  modules { "PP-sudo":  module => "sudo",  site =>
"global_puppetmaster", type => "services", version => "0.1" }
  modules { "PP-ssh":   module => "ssh",   site =>
"global_puppetmaster", type => "services", version => "0.1" }
  modules { "PP-sendmail":  module => "sendmail",  site =>
"global_puppetmaster", type => "services", version => "0.14"}
  modules { "PP-ldap":  module => "ldap",  site =>
"global_puppetmaster", type => "services", version => "0.11"}
  modules { "PP-redhat":module => "redhat",site =>
"global_puppetmaster", type => "services", version => "0.12"}
  modules { "PP-autofs":module => "autofs",site =>
"global_puppetmaster", type => "services", version => "0.1" }
  modules { "PP-apache2":   module => "apache2",   site =>
"global_puppetmaster", type => "services", version => "0.1" }
  modules { "PP-subversion":module => "subversion",site =>
"global_puppetmaster", type => "services", version => "0.11"}
  modules { "PP-syslog-ng": module => "syslog-ng", site =>
"global_puppetmaster", type => "services", version => "0.11"}
  modules { "PP-monit": module => "monit", site =>
"global_puppetmaster", type => "services", version => "0.1" }
  modules { "PP-munin": module => "munin", site =>
"global_puppetmaster", type => "services", version => "0.1" }
  stable host types modules #
  modules { "PP-puppetmaster": site => "global_puppetmaster", module
=> "host-puppetmaster", version => "0.21" }
}

using this syntax it creates all the necessary  environment modules which
are basically links to the version of the "stable/testing" module.

all of this code is available freely at
http://github.com/ohadlevy/puppet-multipuppetmaster

cheers,
Ohad


On Fri, Jan 9, 2009 at 2:43 AM, Ben Beuchler  wrote:

>
> > since many times, a given node has uses many different modules (which are
> > managed by different people) we decided to tag our "stable" modules (e.g.
> > associate it with a version) and generate an environment out of tested
> > combination of the stable modules.
>
> Would you be willing to describe this process in a bit more detail?
>
> -Ben
>
> >
>

--~--~-~--~~~---~--~~
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: Issue with a new fact

2009-01-08 Thread Jeff Leggett

That may be the problem - I call it by:

ipaddr = `facter ipaddress`.chomp

On Jan 8, 4:22 pm, James Turnbull  wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
>
>
>
>
> Jeff Leggett wrote:
> > So I wrote a new fact to determine  clients proxy.  Work's great when
> > I call it via facter as a single:
>
> > [jlegg...@lxp6d11m8v190 jleggett]$ facter etproxy
> > 10.X.Y.Z:8080
>
> > But when I call facter alone (for full output of all facts) I see this
> > at beginning:
>
> > [jlegg...@lxp6d11m8v190 jleggett]$ facter
> > /opt/etrade/p6/lib/ruby/site_ruby/1.8/facter/util/loader.rb:72:
> > command not found: facter ipaddress
> > 10.X.Y.Z:8080
>
> > (I call fatcer ipaddress in my new fact - is that the problem?)
>
> > Nothing here indicates I need to do something else:
> >http://reductivelabs.com/trac/puppet/wiki/AddingFacts?
>
> > What'd I do wrong?
>
> Can you pastie your code?
>
> Do you call facter ipaddress as a binary or use:
>
> Facter.value(:ipaddress)
>
> Regards
>
> James Turnbull
>
> - --
> Author of:
> * Pulling Strings with Puppet
> (http://www.amazon.com/gp/product/1590599780/)
> * Pro Nagios 2.0
> (http://www.amazon.com/gp/product/1590596099/)
> * Hardening Linux
> (http://www.amazon.com/gp/product/159059/)
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.7 (Darwin)
> Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org
>
> iD8DBQFJZm6e9hTGvAxC30ARAtT8AJwO6hah0YC0FWv3UbD7b+kos4Ku0gCeNsF7
> /2fHE+dAc5PW+DWU6O+jhW4=
> =hQBC
> -END PGP SIGNATURE-- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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: Feature request runinterval + $random

2009-01-08 Thread Matt McLeod

I've also gone for cron, but I really randomize it by running
puppetd from a wrapper script:

#!/bin/bash

RANDOM=$$$(date +%s)
d=$[ ( $RANDOM % 900 ) + 1 ]

sleep $d
/opt/sysadmin/bin/puppetd -t

I know it's not absolutely 100% random, but it's random enough
for this.  The risk of course is that you could still get clumps
but I've found that four puppetmasters running with mongrel+apache
are enough to not get anywhere near overloaded with ~200 nodes.

I use the 'sleep' command rather than --splay because --splay
wasn't working for me this time last year.  Don't recall what the
problem was any more, but this works pretty well.

Matt

Ohad Levy wrote:
> I also use cron, but I found using the IP address last bit as a more
> effective way to "randomize" it.
> 
> more info here:
> http://reductivelabs.com/trac/puppet/wiki/Recipes/cron
> 
> Cheers,
> Ohad
> 
> On Fri, Jan 9, 2009 at 9:21 AM, Ryan Dooley  wrote:
> 
> >
> > Have you checked out the splay option?
> >
> > Alternatively, I've since moved on from splay to use a cron job to run
> > puppetd.  I have a meta package that pulls in puppet and drops in a root
> > cron job entry based on the mac address of the host's primary interface
> > during the post-install step of rpm.
> >
> > Cheers,
> > Ryan
> >
> > On 1/8/09 12:17 PM, Christopher wrote:
> > > Hello...
> > >
> > > I have an existing puppet setup that works very well except for one
> > > thing.  Occasionally the puppetmaster is busy and the clients tend to
> > > "bunch up".  Then on the next client run they tend to "bunch up" again
> > > causing the puppetmaster to be slow down due to the high load which
> > > causes more slow downs.  This example should show what is happending:
> > >
> > > shell>  grep ": Compiled catalog for " all.log | cut -d: -f 1-2 | uniq -c
> > > 1 Jan  8 10:59
> > > 8 Jan  8 11:00
> > >14 Jan  8 11:01
> > > 2 Jan  8 11:02
> > > 1 Jan  8 11:08
> > >15 Jan  8 11:10
> > >12 Jan  8 11:11
> > > 1 Jan  8 11:20
> > >
> > > The above shows an idle time followed by a rush of puppet clients
> > > hitting the puppetmaster followed by another idle time.
> > >
> > > This is probably worse when clients run a logrotate script with a client
> > > restart from a cronjob.
> > >
> > > I would suggest something like the runinterval be $runinterval +
> > > $(random number of seconds between 1 and 120) || $(random number of
> > > seconds between 1 and $runinterval*0.1 )
> > >
> > > That should help spread out the load on the server.
> > >
> > >
> > >
> > >
> >
> >
> > >
> >
> 
> > 

-- 
* Matt McLeod | mail: m...@boggle.org | blog: http://abortrephrase.com/ *
 --- People can do the work, so machines have time to think ---

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---