[Puppet Users] Managing filesystem quotas

2009-10-28 Thread Stephen Nelson-Smith

I wish to impose a quota on a samba share.

I've created a mount, using puppet, enabling usrquota.  I've then run
quotacheck manually, and edquota manually to set up the quota.

I suppose I could have puppet deliver the aquota.user file, but I don'
think that doesn't really enable me to rebuild the machine without
manual intervention.  What would be really awesome would be a quota
type that drives quotacheck and edquota - is there much demand for
this?

Have any of you implemented quotas using puppet?  What did you do?

S.

-- 
Stephen Nelson-Smith
Technical Director
Atalanta Systems Ltd
www.atalanta-systems.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: Passenger Woes

2009-10-21 Thread Stephen Nelson-Smith

On Tue, Oct 20, 2009 at 9:36 PM, Matt  wrote:
>
> I'd really bite the bullet Stephen and give passenger 2.2.2 a try.

OK - tried passenger 2.2.2 - same behaviour.

I'm going to blow everything away and start again from scratch and see
if I get the same results.

S.
-- 
Stephen Nelson-Smith
Technical Director
Atalanta Systems Ltd
www.atalanta-systems.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: Passenger Woes

2009-10-20 Thread Stephen Nelson-Smith

Hi,

On Tue, Oct 20, 2009 at 9:25 AM, Matt  wrote:
>
> Stephen FWIW, I has issues getting it to work with passenger 2.2.5 and
> settled on version 2.2.2 installed using the gem install passenger
> -version 2.2.2

I'm still on 2.2.5.  I've been able to exchange SSL certs, but now if
I run puppet on a client I get this:

# puppetd --test
err: Could not retrieve catalog from remote server: Error 400 on
SERVER: Bad Request
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run

In the access log I see a GET
/production/catalog/machine. but this is a 400.

I see nothing in the error log, even on debug level.

Everything under /etc/puppet is owned by puppet.

Interestingly from a different machine, puppetd --test gives me this:

err: Could not retrieve catalog from remote server: Error 403 on
SERVER: Forbidden
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run

>From a third (debian) machine I get this:

# puppetd --test --server=puppet
info: Retrieving plugins
err: Could not call fileserver.list: #
err: /File[/var/lib/puppet/lib]: Failed to generate additional
resources during transaction: HTTP-Error: 500 Internal Server Error
err: Could not call fileserver.describe: #
err: /File[/var/lib/puppet/lib]: Failed to retrieve current state of
resource: HTTP-Error: 500 Internal Server Error Could not describe
/plugins: HTTP-Error: 500 Internal Server Error
err: Could not call puppetmaster.getconfig: #
err: Could not retrieve catalog: HTTP-Error: 500 Internal Server Error
warning: Not using cache on failed catalog
ldap:~# puppet --version
0.24.5

So far I've spent two days on this, and haven't deployed a single
resource with puppet... :(

Any ideas?

S.
-- 
Stephen Nelson-Smith
Technical Director
Atalanta Systems Ltd
www.atalanta-systems.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: Passenger Woes

2009-10-20 Thread Stephen Nelson-Smith

Hi Julian,

On Mon, Oct 19, 2009 at 7:32 PM, Julian Simpson  wrote:
>
> Is there a file called rewindable_input.rb on the system? Looks like a
> missing gem or ruby path issue.

Thanks Julian - I think the problem is that rubygem-rack from EPEL is
an old version that doesn't contain rewindable_input.rb.  I've
installed it from the gem instead, and we appear to have a significant
improvement.  Maybe I'm warming to the idea of using gems :$

S.
-- 
Stephen Nelson-Smith
Technical Director
Atalanta Systems Ltd
www.atalanta-systems.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] Passenger Woes

2009-10-19 Thread Stephen Nelson-Smith

Hello,

I really didn't expect this to be difficult, but I've been struggling
with this all day :(

I'm running CentOS 5.3, with rubygems, rack and fastthread, from EPEL.

I'm running puppet-0.25.0-1 built from the spec file in the latest
stable tarball.

I'm using mod_passenger-2.2.5-2.el5 from Jeroen van Meeuwen (kanarip),
which is effectively EPEL too.

I'm using the config.ru file from
http://github.com/reductivelabs/puppet/blob/master/ext/rack/files/config.ru,
chowned to puppet and chmoded 644.

I've added:

[puppetmasterd]
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY

to my puppet.conf as directed in the README.

I've set up an apache vhost as follows:

PassengerHighPerformance on
PassengerMaxPoolSize 12
PassengerPoolIdleTime 1500
# PassengerMaxRequests 1000
PassengerStatThrottleRate 120
RackAutoDetect Off
RailsAutoDetect Off

Listen 8140

LoadModule ssl_module modules/mod_ssl.so

AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl.crl
SSLPassPhraseDialog  builtin
SSLSessionCache shmcb:/var/cache/mod_ssl/scache(512000)
SSLSessionCacheTimeout  300
SSLMutex default
SSLRandomSeed startup file:/dev/urandom  256
SSLRandomSeed connect builtin
SSLCryptoDevice builtin


SSLEngine on
SSLProtocol -ALL +SSLv3 +TLSv1
SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP

SSLCertificateFile  /var/lib/puppet/ssl/certs/puppet.pem
SSLCertificateKeyFile   /var/lib/puppet/ssl/private_keys/puppet.pem
SSLCertificateChainFile /var/lib/puppet/ssl/ca/ca_crt.pem
SSLCACertificateFile/var/lib/puppet/ssl/ca/ca_crt.pem

# If Apache complains about invalid signatures on the CRL, you
can try disabling
# CRL checking by commenting the next line, but this is not recommended.
SSLCARevocationFile /var/lib/puppet/ssl/ca/ca_crl.pem

SSLVerifyClient optional
SSLVerifyDepth  1
SSLOptions +StdEnvVars

DocumentRoot /etc/puppet/rack/public/
RackBaseURI /

Options None
AllowOverride None
Order allow,deny
allow from all



When I start apache, and browse to the puppet server on 8140 I get a
500 and see the following in the logs:

/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require': no such file to load -- rack/rewindable_input
(LoadError)
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
from 
/usr/lib/ruby/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/rack/request_handler.rb:27
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
from 
/usr/lib/ruby/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/rack/application_spawner.rb:34
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
from 
/usr/lib/ruby/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/spawn_manager.rb:157:in
`spawn_application'
from 
/usr/lib/ruby/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/spawn_manager.rb:287:in
`handle_spawn_application'
from 
/usr/lib/ruby/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/abstract_server.rb:352:in
`__send__'
from 
/usr/lib/ruby/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/abstract_server.rb:352:in
`main_loop'
from 
/usr/lib/ruby/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/abstract_server.rb:196:in
`start_synchronously'
from 
/usr/lib/ruby/gems/1.8/gems/passenger-2.2.5/bin/passenger-spawn-server:61
[ pid=5357 file=ext/apache2/Hooks.cpp:725 time=2009-10-19 23:09:10.957 ]:
  Unexpected error in mod_passenger: Cannot spawn application
'/etc/puppet/rack': The spawn server has exited unexpectedly.
  Backtrace:
 in 'virtual boost::shared_ptr
Passenger::ApplicationPoolServer::Client::get(const
Passenger::PoolOptions&)' (ApplicationPoolServer.h:471)
 in 'int Hooks::handleRequest(request_rec*)' (Hooks.cpp:521)

I'm baffled - I can't see what's wrong.  Please help! :)

TIA,

S.
-- 
Stephen Nelson-Smith
Technical Director
Atalanta Systems Ltd
www.atalanta-systems.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: Best Practices Rewrite - First Draft

2009-10-18 Thread Stephen Nelson-Smith

Hi,

> If anyone feels up to grabbing this document and running with it,
> please feel free.

Not sure if I accidentally half replied to this already

I'd be very happy to pick this up.  I'm just starting a new project -
bring some best practices to a somewhat chaotic and messy large
government Drupal infrastructure (and associated services) and am also
doing some puppet training, so gathering together collected wisdom,
adding my own experiences from 3 years of running puppet, and
maintaining the document seems like an ideal fit.

Is everyone ok with this?

S.
-- 
Stephen Nelson-Smith
Technical Director
Atalanta Systems Ltd
www.atalanta-systems.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] Cron every minute

2008-10-15 Thread Stephen Nelson-Smith

Can I just do:

cron { "my-job":
  command => "/my/command",
  minute => "*",
  ensure => "present",
}

S.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Fact load failure

2008-10-14 Thread Stephen Nelson-Smith

Hi,

> Extra 'end'? Not that I know Ruby at all well, but pasting the given
> code into Xemacs makes it complain about an invalid nest with the fifth
> 'end'. And if 'end' is the complement to 'if' and 'do', then there
> should only be four.

There's only four on the puppetmaster.  Not quite sure how I managed
to get five pasted into the email.  But well spotted!

S.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Fact load failure

2008-10-14 Thread Stephen Nelson-Smith

Hi,

I've created this fact:

require 'facter'

if FileTest.exists?("/etc/ha.d")
  if `service heartbeat status` =~ /running/
cib = `cibadmin -Q`.grep(/epoch/).to_s
  epoch = cib.scan(/[0-9]+/).first
  Facter.add("cib_epoch") do
setcode do
  epoch.to_i + 1
end
  end
end
  end
end

I've tested it as directed in the wiki:

# facter cib_epoch
1

I've put it in /etc/puppet/facts, and run puppet on a cluster node.

I get:

# puppetd --test --debug
info: Loading fact cib_epoch
/usr/lib/ruby/site_ruby/1.8/puppet/network/client/master.rb:420:in
`load': /var/puppet/facts/cib_epoch.rb:17: syntax error (SyntaxError)
from /usr/lib/ruby/site_ruby/1.8/puppet/network/client/master.rb:420:in
`loaddir'
from /usr/lib/ruby/1.8/timeout.rb:56:in `timeout'
from /usr/lib/ruby/site_ruby/1.8/puppet/network/client/master.rb:419:in
`loaddir'
from /usr/lib/ruby/site_ruby/1.8/puppet/network/client/master.rb:415:in
`each'
from /usr/lib/ruby/site_ruby/1.8/puppet/network/client/master.rb:415:in
`loaddir'
from /usr/lib/ruby/site_ruby/1.8/puppet/network/client/master.rb:431:in
`loadfacts'
from /usr/lib/ruby/site_ruby/1.8/puppet/network/client/master.rb:430:in
`each'
from /usr/lib/ruby/site_ruby/1.8/puppet/network/client/master.rb:430:in
`loadfacts'
 ... 7 levels...
from /usr/lib/ruby/site_ruby/1.8/puppet/util/subclass_loader.rb:36:in
`client'
from /usr/lib/ruby/site_ruby/1.8/puppet/util/subclass_loader.rb:67:in
`send'
from /usr/lib/ruby/site_ruby/1.8/puppet/util/subclass_loader.rb:67:in
`method_missing'
from /usr/sbin/puppetd:322

Any ideas what's wrong?

S.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---