[Puppet Users] Duplicate definition on the same line and in the same file ?

2009-12-01 Thread Kim Gert Nielsen
Hi,

I'm trying to add libapache2-mod-php5 as a dependency in my php5 module here is 
what I get 

info: Loading facts in raidcontroller
info: Loading facts in raidcontroller
debug: Format s not supported for Puppet::Resource::Catalog; has not 
implemented method 'from_s'
err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Duplicate definition: Package[libapache2-mod-php5] is already defined in file 
/etc/puppet/modules/php5/manifests/init.pp at line 18; cannot redefine at 
/etc/puppet/modules/php5/manifests/init.pp:18 on node webserver1.example.com
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run

I do not have defined Package[libapache2-mod-php5] anywhere else in any file 
(According to grep -ir)

The class looks like this:

class php5::debian {

  file { /etc/php5/apache2/php.ini:
   owner = root,
   group = root,
   mode = 644,
   source = [
   
puppet:///php5/$operatingsystem/$lsbdistcodename/$fqdn/php.ini,
   
puppet:///php5/$operatingsystem/$lsbdistcodename/$hostname/php.ini,
   puppet:///php5/$operatingsystem/php.ini.$hostname,
   puppet:///php5/php.ini.$hostname,
   puppet:///php5/php.ini,
   ], notify = Exec[force-reload-apache2],
   }

  define enablemodule($ensure='present') {

 package { ['libapache2-mod-php5']: ensure = installed }

  case $ensure {
   present: {
package { [$name]: ensure = installed }
   }
  }
  }

  define enablecli($ensure='present') {

  case $ensure {
   present: {
package { [php5-cli]: ensure = installed }

file { /etc/php5/cli/php.ini:
owner = root,
group = root,
mode = 644,
source = [
   
puppet:///php5/$operatingsystem/$lsbdistcodename/$fqdn/php.ini.cli,
   
puppet:///php5/$operatingsystem/$lsbdistcodename/$hostname/php.ini.cli,
   
puppet:///php5/$operatingsystem/php.ini.$hostname,
   puppet:///php5/php.ini.cli.$hostname,
   puppet:///php5/php.ini.cli,
]
   }
   }
  }
  }
}


can any one explain this behavior ?

/Kim

--

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




Re: [Puppet Users] Duplicate definition on the same line and in the same file ?

2009-12-01 Thread David Schmitt
Kim Gert Nielsen wrote:
 Hi,
 
 I'm trying to add libapache2-mod-php5 as a dependency in my php5 module here 
 is what I get 
 
 info: Loading facts in raidcontroller
 info: Loading facts in raidcontroller
 debug: Format s not supported for Puppet::Resource::Catalog; has not 
 implemented method 'from_s'
 err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
 Duplicate definition: Package[libapache2-mod-php5] is already defined in file 
 /etc/puppet/modules/php5/manifests/init.pp at line 18; cannot redefine at 
 /etc/puppet/modules/php5/manifests/init.pp:18 on node webserver1.example.com
 warning: Not using cache on failed catalog
 err: Could not retrieve catalog; skipping run
 
 I do not have defined Package[libapache2-mod-php5] anywhere else in any file 
 (According to grep -ir)
   define enablemodule($ensure='present') {
 
  package { ['libapache2-mod-php5']: ensure = installed }
 
   case $ensure {
present: {
 package { [$name]: ensure = installed }
}
   }
   }


If you use this define twice,  eg enablemodule{[a,b]:}, then the 
Package[libapache2-mod-php5] will be defined twice and the compilation 
will fail with the error you're using.

to solve this, create a little class containing this package and include 
the class instead of defining the resource directly.


Regards, DavidS

--

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




Re: [Puppet Users] Downloaded plugin does not get loaded after puppetd gets restarted.

2009-12-01 Thread Luke Kanies
On Nov 28, 2009, at 9:57 AM, Robert wrote:

 Hi

 When I run puppetd for the first time, it syncs ownpkg.rb from
 puppetmasterd just fine, and then it autoloads it.

 notice: /File[/var/puppet/lib/puppet/provider/ownpkg.rb]/content:
 content changed '{md5}efd758a6094c813f8480423b01d823ac' to '{md5}
 b0f1f52803738bace6724ef5bfe5318a'
 Finishing transaction -971820348 with 1 changes
 Loading downloaded plugin /var/puppet/lib/puppet/provider/ownpkg.rb

 Then I start puppetd again and because the file's hash did not change
 it's not going to be retransmitted, and therefore it's not going to be
 autoloaded.
 So later on when I try to intall a package with provider = ownpkg,
 it's going to fail:

 err: Could not run Puppet configuration client: Invalid package
 provider 'ownkpg' at /etc/puppet/manifests/classes/squid.pp:7

 Any ideas how can i make it load it all the time?

I thought I already answered this somewhere else, but maybe not.

Basically, you have the wrong path for your provider - use provider/ 
package/ownpkg.rb, so Puppet will autoload it.

-- 
Every great advance in natural knowledge has involved the absolute
rejection of authority. --Thomas H. Huxley
-
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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




Re: [Puppet Users] Duplicate definition on the same line and in the same file ?

2009-12-01 Thread Peter Meier
 can any one explain this behavior ?

You define a package resource in your define. Everytime you manage a  
resource with this define also an instance of the package resource is  
managed, so you only need to manage two resources with this define and  
you end up with a duplicate definition.

As puppet tries to apply the same package resource definition twice  
you end up with a duplicate definition on the same line.

Solution: manage your package resource in its very own class and  
include this class into the define. This apply in general to every  
other managed resource in defines which are unique amongst the whole  
system. Which means that you don't differentiate it with an own  
deviated name, containing for examle $name of the define.

For an example have a look at:  
http://git.puppet.immerda.ch/?p=module-git.git;a=blob;f=manifests/clone.pp;h=1d6a298f985aa6b79851e31b4b63403d7b2f7a9b;hb=7b1f9a68e95cd9dc877145eda08c18e233603bb8

We include the class git, which will manage the package-resource git,  
hence we can reference to it in the deviated exec for this define.

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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




Re: [Puppet Users] manitest - a simple tool to help your puppet development and testing

2009-12-01 Thread Nigel Kersten
On Sun, Nov 29, 2009 at 6:18 AM, Ohad Levy ohadl...@gmail.com wrote:
 If it happened to you before that someone broke your manifest because of
 simple change (e.g. didnt test it on all hosts/classes external nodes ...
 combinations) this tool might be useful for you.

No-one else tried this out? It's really quite cool.

Ohad, I noticed you have /etc/puppet/manifests/site.pp hard-wired
there. We actually serve our manifests out of a different location, so
I had to do a minor tweak to get that working.

It's a shame we can't impersonate architectures though... I'd love to
be able to simulate catalog runs of a Mac client on a Linux continuous
build server.




 the idea is very simple, just try to compile the manifest based on
 customized facts, classes, environments and external nodes parameters (if
 you use it) .
 You need to run this script only were you develop your manifests (e.g. your
 puppetmaster), there is no need to try out a puppet run on each and every
 system type that you have.

 You might also find it useful to run this script in some sort of a cron or
 via a repo hook, to find out any broken manifests running around..

 This script was originally written by a colleague of mine (Paul Kelly),
 however, I've adjusted it to hopefully common usage.

 Its brand new, so any comments / improvements (which I'm sure there are
 plenty) are welcomed.

 Hopefully you'll find it useful,
 Ohad

 http://github.com/ohadlevy/manitest

 --

 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To post to this group, send email to puppet-us...@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.




-- 
nigel

--

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




Re: [Puppet Users] manitest - a simple tool to help your puppet development and testing

2009-12-01 Thread Frank Sweetser
On 12/01/2009 01:47 PM, Nigel Kersten wrote:
 On Sun, Nov 29, 2009 at 6:18 AM, Ohad Levyohadl...@gmail.com  wrote:
 If it happened to you before that someone broke your manifest because of
 simple change (e.g. didnt test it on all hosts/classes external nodes ...
 combinations) this tool might be useful for you.

 No-one else tried this out? It's really quite cool.

I immediately added it to my todo list, but unfortunately I'm low on round 
tuits right now...

 Ohad, I noticed you have /etc/puppet/manifests/site.pp hard-wired
 there. We actually serve our manifests out of a different location, so
 I had to do a minor tweak to get that working.

 It's a shame we can't impersonate architectures though... I'd love to
 be able to simulate catalog runs of a Mac client on a Linux continuous
 build server.

Well, all of that architecture stuff keys off of facter, right?  How hard 
would it be to serialize the output of 'facter -p' and feed it to the puppet 
run that does the core of the testing work?

-- 
Frank Sweetser fs at wpi.edu  |  For every problem, there is a solution that
WPI Senior Network Engineer   |  is simple, elegant, and wrong. - HL Mencken
 GPG fingerprint = 6174 1257 129E 0D21 D8D4  E8A3 8E39 29E3 E2E8 8CEC

--

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




Re: [Puppet Users] manitest - a simple tool to help your puppet development and testing

2009-12-01 Thread Scott Smith
Nigel Kersten wrote:
 It's a shame we can't impersonate architectures though... I'd love to
 be able to simulate catalog runs of a Mac client on a Linux continuous
 build server.
 

I wonder if you could with something like this...

http://fedoraproject.org/wiki/Projects/Mock

-scott

--

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




[Puppet Users] puppet ldap schema update

2009-12-01 Thread Jonathan Mills
I recently had to update the puppet ldap schema file to make it work with Red 
Hat Directory Server.  In the process, I updated the OIDs to use the real PEN 
assigned to ReductiveLabs/Puppet by IANA.

I thought I'd share that with everyone.  Please see attached.


--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@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.




98puppet.ldif
Description: Binary data


Re: [Puppet Users] manitest - a simple tool to help your puppet development and testing

2009-12-01 Thread Nicolas Szalay
Tried it out and did a bunch of debugging with ohad. Works really fine, I 
planned to check all manifests but I still not decided how to do it on a 
continous basis. I have to take a look at hudson.

Nicolas.

- Mail Original -
De: Nigel Kersten nig...@google.com
À: puppet-users@googlegroups.com
Envoyé: Mardi 1 Décembre 2009 19:47:38 GMT +01:00 Amsterdam / Berlin / Berne / 
Rome / Stockholm / Vienne
Objet: Re: [Puppet Users] manitest - a simple tool to help your puppet  
development and testing

On Sun, Nov 29, 2009 at 6:18 AM, Ohad Levy ohadl...@gmail.com wrote:
 If it happened to you before that someone broke your manifest because of
 simple change (e.g. didnt test it on all hosts/classes external nodes ...
 combinations) this tool might be useful for you.

No-one else tried this out? It's really quite cool.

Ohad, I noticed you have /etc/puppet/manifests/site.pp hard-wired
there. We actually serve our manifests out of a different location, so
I had to do a minor tweak to get that working.

It's a shame we can't impersonate architectures though... I'd love to
be able to simulate catalog runs of a Mac client on a Linux continuous
build server.




 the idea is very simple, just try to compile the manifest based on
 customized facts, classes, environments and external nodes parameters (if
 you use it) .
 You need to run this script only were you develop your manifests (e.g. your
 puppetmaster), there is no need to try out a puppet run on each and every
 system type that you have.

 You might also find it useful to run this script in some sort of a cron or
 via a repo hook, to find out any broken manifests running around..

 This script was originally written by a colleague of mine (Paul Kelly),
 however, I've adjusted it to hopefully common usage.

 Its brand new, so any comments / improvements (which I'm sure there are
 plenty) are welcomed.

 Hopefully you'll find it useful,
 Ohad

 http://github.com/ohadlevy/manitest

 --

 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To post to this group, send email to puppet-us...@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.




-- 
nigel

--

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


--

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




Re: [Puppet Users] How to read client certificate's CN

2009-12-01 Thread Miguel Armas
2009/12/1 Ohad Levy ohadl...@gmail.com:
 Hi,

 Why not use cobbler external nodes feature to avoid all of this all together

Because right now only some nodes will use cobbler, I already have
250 hosts and I don't want to change all my setup

 sounds to me that you should provision your nodes when they have a purpose
 if they don't have one, they should keep getting the default node.

They get the default node, I just need to identify them using a unique
name because I create entries in my monitoring system (and some other
things that should be unique in exported resources)

Basically I need this to setup a public remote installation system
based on gPXE+Cobbler+Puppet. When a server runs gPXE it will boot
remotelly from my server, I will provision the OS using Cobbler, it
will install and setup Puppet, but when I run puppet, all clients use
the default node and I have no way to distinguish them.

 if its not possible with cobbler, you might take a look at
 http://theforeman.org

Hmmm... interesting is it a OS provisioning system tied to Puppet?

 as far for your question, I think you need a custom fact.

That's what I thought, but it's ugly. I'm reading the private_key file
from /var/lib/puppet/state/{state,localconfig}.yaml and it works the
first time, but if I run puppetd later with a different --fqdn it
doesn't change in those files. And I think it's very uglly to read the
--fqdn from ps ax | grep puppetd

Salu2!
-- 
Miguel Armas k...@canarytek.com
CanaryTek Consultoria y Sistemas SL
ModularIT http://www.modularit.org/

--

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




Re: [Puppet Users] How to read client certificate's CN

2009-12-01 Thread Nigel Kersten
On Tue, Dec 1, 2009 at 12:23 PM, Miguel Armas k...@canarytek.com wrote:
 2009/12/1 Ohad Levy ohadl...@gmail.com:
 Hi,

 Why not use cobbler external nodes feature to avoid all of this all together

 Because right now only some nodes will use cobbler, I already have
250 hosts and I don't want to change all my setup

 sounds to me that you should provision your nodes when they have a purpose
 if they don't have one, they should keep getting the default node.

 They get the default node, I just need to identify them using a unique
 name because I create entries in my monitoring system (and some other
 things that should be unique in exported resources)

 Basically I need this to setup a public remote installation system
 based on gPXE+Cobbler+Puppet. When a server runs gPXE it will boot
 remotelly from my server, I will provision the OS using Cobbler, it
 will install and setup Puppet, but when I run puppet, all clients use
 the default node and I have no way to distinguish them.

 if its not possible with cobbler, you might take a look at
 http://theforeman.org

 Hmmm... interesting is it a OS provisioning system tied to Puppet?

 as far for your question, I think you need a custom fact.

 That's what I thought, but it's ugly. I'm reading the private_key file
 from /var/lib/puppet/state/{state,localconfig}.yaml and it works the
 first time, but if I run puppetd later with a different --fqdn it
 doesn't change in those files. And I think it's very uglly to read the
 --fqdn from ps ax | grep puppetd

We have a fact that essentially just does 'puppetd --configprint
certname' called 'puppet_certname'.

I'd like to not have to do this, but forgot about this bit of hackery
until you started this thread.




 Salu2!
 --
 Miguel Armas k...@canarytek.com
 CanaryTek Consultoria y Sistemas SL
 ModularIT http://www.modularit.org/

 --

 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To post to this group, send email to puppet-us...@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.






-- 
nigel

--

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




Re: [Puppet Users] puppet ldap schema update

2009-12-01 Thread James Turnbull
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jonathan Mills wrote:
 I recently had to update the puppet ldap schema file to make it work with Red 
 Hat Directory Server.  In the process, I updated the OIDs to use the real PEN 
 assigned to ReductiveLabs/Puppet by IANA.
 
 I thought I'd share that with everyone.  Please see attached.
 

Jonathan

Thanks for this.

Can you please update #2677 with your ldif and explain the issue with
RHDS in there?

Regards

James Turnbull

- --
Author of:
* Pro Linux System Administration (http://tinyurl.com/linuxadmin)
* Pulling Strings with Puppet (http://tinyurl.com/pupbook)
* Pro Nagios 2.0 (http://tinyurl.com/pronagios)
* Hardening Linux (http://tinyurl.com/hardeninglinux)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJLFX/KAAoJECFa/lDkFHAybMgH/0KrJvcv4laQsBjKVRGg6FSv
p82qL133fshXHoLnVfeys4OcUDqiONrq9QZQjBKQ4gQPgeDa6JN0RK5HMLPwvNz+
0ONiecxMdlg6X7WbiZYeBRbLnXZlqHUWXg3dl43jZRVb/M+ZwbYJ6K3htb0Eu/2E
nNKakfvanrmNjuNBkL1L0yLBjwBrQFvl5S4NVED6cl5ryaJ9Rc6j48BeO/ksdskJ
+7kBfjMy8DQ26lRYKQjPzaLui+zKJUGWvIJeYZN2ktIdIdy5UNMKYJtLwRbyJmuE
zE+WwyaWyWwRqYQFinY17q+xHJTcYSUQlgRuZ4ATNmV1Kr0GDRmO0f2XMey6ABc=
=3HY9
-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-us...@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] Want to add AIX lpars as Puppet targets (clients)

2009-12-01 Thread JoeZ_aix
Can anyone point out some AIX specific downloads for Puppet AIX -
rpms, source, etc - also any docs???
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-us...@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] puppetmaster SQL failing

2009-12-01 Thread Eric Gerlach
Hi all,

Just upgraded from 0.24.8 to 0.25.1.  I've run into the following problem.
After a while, my puppetmaster fails with this type of error:

info: Expiring the node cache of gold.fs.uwaterloo.ca
info: Not using expired node for gold.fs.uwaterloo.ca from cache; expired at 
Tue Dec 01 16:07:47 -0500 2009
debug: Using cached facts for gold.fs.uwaterloo.ca
info: Caching node for gold.fs.uwaterloo.ca
info: Expiring the node cache of monitor.fs.uwaterloo.ca
debug: Scope(Class[network]): Retrieving template network/interfaces.erb
debug: template[/srv/puppet/modules/network/templates/interfaces.erb]: Bound 
template variables for /srv/puppet/modules/network/templates/interfaces.erb in 
0.00 seconds
debug: template[/srv/puppet/modules/network/templates/interfaces.erb]: 
Interpolated template /srv/puppet/modules/network/templates/interfaces.erb in 
0.00 seconds
debug: Scope(Class[postfix]): Retrieving template postfix/main.cf.erb
debug: template[/srv/puppet/modules/postfix/templates/main.cf.erb]: Bound 
template variables for /srv/puppet/modules/postfix/templates/main.cf.erb in 
0.00 seconds
debug: template[/srv/puppet/modules/postfix/templates/main.cf.erb]: 
Interpolated template /srv/puppet/modules/postfix/templates/main.cf.erb in 0.00 
seconds
err: Puppet::Parser::Compiler failed with error 
ActiveRecord::MissingAttributeError: missing attribute: restype on node 
gold.fs.uwaterloo.ca
err: Mysql::Error: Lost connection to MySQL server during query: SELECT * FROM 
`fact_names` WHERE (`fact_names`.`name` = 'kernelrelease')  LIMIT 1
err: Puppet::Parser::Compiler failed with error 
ActiveRecord::MissingAttributeError: missing attribute: restype on node 
gold.fs.uwaterloo.ca

And then never sends out a catalog again.  Any ideas?

Cheers,

-- 
Eric Gerlach, Network Administrator
Federation of Students
University of Waterloo
p: (519) 888-4567 x36329
e: egerl...@feds.uwaterloo.ca

--

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




Re: [Puppet Users] puppetmaster SQL failing

2009-12-01 Thread Eric Gerlach
In case it helps, it seems to happen when two clients are trying to talk to the
puppetmaster simultaneously.  I can't confirm that conclusively, but that seems
to be the case.

Cheers,

Eric

On Tue, Dec 01, 2009 at 04:25:49PM -0500, Eric Gerlach wrote:
 Hi all,
 
 Just upgraded from 0.24.8 to 0.25.1.  I've run into the following problem.
 After a while, my puppetmaster fails with this type of error:
 
 info: Expiring the node cache of gold.fs.uwaterloo.ca
 info: Not using expired node for gold.fs.uwaterloo.ca from cache; expired at 
 Tue Dec 01 16:07:47 -0500 2009
 debug: Using cached facts for gold.fs.uwaterloo.ca
 info: Caching node for gold.fs.uwaterloo.ca
 info: Expiring the node cache of monitor.fs.uwaterloo.ca
 debug: Scope(Class[network]): Retrieving template network/interfaces.erb
 debug: template[/srv/puppet/modules/network/templates/interfaces.erb]: Bound 
 template variables for /srv/puppet/modules/network/templates/interfaces.erb 
 in 0.00 seconds
 debug: template[/srv/puppet/modules/network/templates/interfaces.erb]: 
 Interpolated template /srv/puppet/modules/network/templates/interfaces.erb in 
 0.00 seconds
 debug: Scope(Class[postfix]): Retrieving template postfix/main.cf.erb
 debug: template[/srv/puppet/modules/postfix/templates/main.cf.erb]: Bound 
 template variables for /srv/puppet/modules/postfix/templates/main.cf.erb in 
 0.00 seconds
 debug: template[/srv/puppet/modules/postfix/templates/main.cf.erb]: 
 Interpolated template /srv/puppet/modules/postfix/templates/main.cf.erb in 
 0.00 seconds
 err: Puppet::Parser::Compiler failed with error 
 ActiveRecord::MissingAttributeError: missing attribute: restype on node 
 gold.fs.uwaterloo.ca
 err: Mysql::Error: Lost connection to MySQL server during query: SELECT * 
 FROM `fact_names` WHERE (`fact_names`.`name` = 'kernelrelease')  LIMIT 1
 err: Puppet::Parser::Compiler failed with error 
 ActiveRecord::MissingAttributeError: missing attribute: restype on node 
 gold.fs.uwaterloo.ca
 
 And then never sends out a catalog again.  Any ideas?
 
 Cheers,
 
 -- 
 Eric Gerlach, Network Administrator
 Federation of Students
 University of Waterloo
 p: (519) 888-4567 x36329
 e: egerl...@feds.uwaterloo.ca
 
 --
 
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To post to this group, send email to puppet-us...@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.
 
 

-- 
Eric Gerlach, Network Administrator
Federation of Students
University of Waterloo
p: (519) 888-4567 x36329
e: egerl...@feds.uwaterloo.ca

--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@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] Module Organization page: missing piece

2009-12-01 Thread Andrew Schulman
At http://reductivelabs.com/trac/puppet/wiki/ModuleOrganisation, the
Configuration section says There are only two items that can be configured for
modules: and then only lists #1.  There's no #2!

It appears that James Turnbull added the configuration section at r39:
http://reductivelabs.com/trac/puppet/wiki/ModuleOrganisation?action=diffversion=39old_version=38
, and that whatever #2 is, it was never added to the page.

James, do you recall what #2 is?  I could take a crack at adding an explanation
to the page, if I know what it is...

Thanks,
Andrew.

--

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




Re: [Puppet Users] Module Organization page: missing piece

2009-12-01 Thread James Turnbull
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andrew Schulman wrote:
 At http://reductivelabs.com/trac/puppet/wiki/ModuleOrganisation, the
 Configuration section says There are only two items that can be configured 
 for
 modules: and then only lists #1.  There's no #2!
 
 It appears that James Turnbull added the configuration section at r39:
 http://reductivelabs.com/trac/puppet/wiki/ModuleOrganisation?action=diffversion=39old_version=38
 , and that whatever #2 is, it was never added to the page.
 
 James, do you recall what #2 is?  I could take a crack at adding an 
 explanation
 to the page, if I know what it is...
 

Hmmm I think that issue predates r39 which was a restructure (but
might still be my fault at some point). :)

I've fixed it I think.

Cheers

James

- --
Author of:
* Pro Linux System Administration (http://tinyurl.com/linuxadmin)
* Pulling Strings with Puppet (http://tinyurl.com/pupbook)
* Pro Nagios 2.0 (http://tinyurl.com/pronagios)
* Hardening Linux (http://tinyurl.com/hardeninglinux)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEVAwUBSxW6riFa/lDkFHAyAQLLnQf+PSsCzg52Bl7PCGBP2IvDGubG5WDEKOm4
0YJHBigMjYVQdT361qm3KnhEsMLMm9O7QVqgSQQtgMwA3UtMBqz0HMTNILzJ0XZV
l4aZytXRMzaT9GU3pCs9giDjIku97o2RHhbhGb/oNHKvtGhHcYIkMEVHTNT0op1j
FdhOOjFc1rduEt4LPyiXYHjlP4yZukH9P8YlQw/+Y+BYo2HIVPfIw7KpbRvHMloj
48vneH3WWYLQb/jAr5QDOqZtcbzlBBGqIK+d6KqYvsYtvkT17w7xg3Cnl+aHwMTk
zOpuSFqKE3OHwFEqaYeosfytgawDxo93Jwm6loQ41UoO6KuobnoDRw==
=JyzT
-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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




Re: [Puppet Users] Module Organization page: missing piece

2009-12-01 Thread Eric Sorenson
There are two #1s. Looks like a Restructured text error where it started over 
with the numbered ol
after one too many carriage returns.

On Dec 1, 2009, at 4:42 PM, Andrew Schulman wrote:

 At http://reductivelabs.com/trac/puppet/wiki/ModuleOrganisation, the
 Configuration section says There are only two items that can be configured 
 for
 modules: and then only lists #1.  There's no #2!
 
 It appears that James Turnbull added the configuration section at r39:
 http://reductivelabs.com/trac/puppet/wiki/ModuleOrganisation?action=diffversion=39old_version=38
 , and that whatever #2 is, it was never added to the page.
 
 James, do you recall what #2 is?  I could take a crack at adding an 
 explanation
 to the page, if I know what it is...
 
 Thanks,
 Andrew.
 
 --
 
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To post to this group, send email to puppet-us...@googlegroups.com.
 To unsubscribe from this group, send email to 
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/puppet-users?hl=en.
 
 

--

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




Re: [Puppet Users] puppetmaster SQL failing

2009-12-01 Thread Ohad Levy
Which version of rails are you using? I kind of remember an issue with 2.1
and multiple connections

Ohad

On Wed, Dec 2, 2009 at 5:25 AM, Eric Gerlach egerl...@feds.uwaterloo.cawrote:

 Hi all,

 Just upgraded from 0.24.8 to 0.25.1.  I've run into the following problem.
 After a while, my puppetmaster fails with this type of error:

 info: Expiring the node cache of gold.fs.uwaterloo.ca
 info: Not using expired node for gold.fs.uwaterloo.ca from cache; expired
 at Tue Dec 01 16:07:47 -0500 2009
 debug: Using cached facts for gold.fs.uwaterloo.ca
 info: Caching node for gold.fs.uwaterloo.ca
 info: Expiring the node cache of monitor.fs.uwaterloo.ca
 debug: Scope(Class[network]): Retrieving template network/interfaces.erb
 debug: template[/srv/puppet/modules/network/templates/interfaces.erb]:
 Bound template variables for
 /srv/puppet/modules/network/templates/interfaces.erb in 0.00 seconds
 debug: template[/srv/puppet/modules/network/templates/interfaces.erb]:
 Interpolated template /srv/puppet/modules/network/templates/interfaces.erb
 in 0.00 seconds
 debug: Scope(Class[postfix]): Retrieving template postfix/main.cf.erb
 debug: template[/srv/puppet/modules/postfix/templates/main.cf.erb]: Bound
 template variables for /srv/puppet/modules/postfix/templates/main.cf.erb in
 0.00 seconds
 debug: template[/srv/puppet/modules/postfix/templates/main.cf.erb]:
 Interpolated template /srv/puppet/modules/postfix/templates/main.cf.erb in
 0.00 seconds
 err: Puppet::Parser::Compiler failed with error
 ActiveRecord::MissingAttributeError: missing attribute: restype on node
 gold.fs.uwaterloo.ca
 err: Mysql::Error: Lost connection to MySQL server during query: SELECT *
 FROM `fact_names` WHERE (`fact_names`.`name` = 'kernelrelease')  LIMIT 1
 err: Puppet::Parser::Compiler failed with error
 ActiveRecord::MissingAttributeError: missing attribute: restype on node
 gold.fs.uwaterloo.ca

 And then never sends out a catalog again.  Any ideas?

 Cheers,

 --
 Eric Gerlach, Network Administrator
 Federation of Students
 University of Waterloo
 p: (519) 888-4567 x36329
 e: egerl...@feds.uwaterloo.ca

 --

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




--

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




Re: [Puppet Users] Module Organization page: missing piece

2009-12-01 Thread Andrew Schulman
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Andrew Schulman wrote:
  At http://reductivelabs.com/trac/puppet/wiki/ModuleOrganisation, the
  Configuration section says There are only two items that can be configured 
  for
  modules: and then only lists #1.  There's no #2!
  
  It appears that James Turnbull added the configuration section at r39:
  http://reductivelabs.com/trac/puppet/wiki/ModuleOrganisation?action=diffversion=39old_version=38
  , and that whatever #2 is, it was never added to the page.
  
  James, do you recall what #2 is?  I could take a crack at adding an 
  explanation
  to the page, if I know what it is...
  
 
 Hmmm I think that issue predates r39 which was a restructure (but
 might still be my fault at some point). :)
 
 I've fixed it I think.

Thanks.  Just wondering-- and it did look odd :)
Andrew.

--

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




Re: [Puppet Users] manitest - a simple tool to help your puppet development and testing

2009-12-01 Thread Ohad Levy
On Wed, Dec 2, 2009 at 2:47 AM, Nigel Kersten nig...@google.com wrote:

 Ohad, I noticed you have /etc/puppet/manifests/site.pp hard-wired
 there. We actually serve our manifests out of a different location, so
 I had to do a minor tweak to get that working.

I'll see what I can do about that ;)


 It's a shame we can't impersonate architectures though... I'd love to
 be able to simulate catalog runs of a Mac client on a Linux continuous
 build server.

Well, the answer for this is - it depends :)
the main problem here is not to override the facts (which must do anyway),
but things that the puppet provider will force, e.g. an example error that
you *might* get if you try it on another operating system (in this example a
Solaris manifest on a Linux host)

 debug: Puppet::Type::Host::ProviderParsed: file /etc/inet/hosts does not
exist
 Could not find a default provider for host

nevertheless, it might work for your environment, but as you can see in this
case, it generates a false alarm.

Cheers,
Ohad

--

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




Re: [Puppet Users] manitest - a simple tool to help your puppet development and testing

2009-12-01 Thread Ohad Levy
Hi Scott,

I don't see how this can help us, see explanation from previous email :)
Ohad

On Wed, Dec 2, 2009 at 3:04 AM, Scott Smith sc...@ohlol.net wrote:

 Nigel Kersten wrote:
  It's a shame we can't impersonate architectures though... I'd love to
  be able to simulate catalog runs of a Mac client on a Linux continuous
  build server.
 

 I wonder if you could with something like this...

 http://fedoraproject.org/wiki/Projects/Mock

 -scott

 --

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




--

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




Re: [Puppet Users] manitest - a simple tool to help your puppet development and testing

2009-12-01 Thread Ohad Levy
We are working internally to come up with some regressions, if it turns out
to usable I'll be more than happy to share.
If you get to a stage hudson is working - let us know :)

Ohad

On Wed, Dec 2, 2009 at 4:17 AM, Nicolas Szalay nsza...@qualigaz.com wrote:

 Tried it out and did a bunch of debugging with ohad. Works really fine, I
 planned to check all manifests but I still not decided how to do it on a
 continous basis. I have to take a look at hudson.

 Nicolas.

 - Mail Original -
 De: Nigel Kersten nig...@google.com
 À: puppet-users@googlegroups.com
 Envoyé: Mardi 1 Décembre 2009 19:47:38 GMT +01:00 Amsterdam / Berlin /
 Berne / Rome / Stockholm / Vienne
 Objet: Re: [Puppet Users] manitest - a simple tool to help your puppet
  development and testing

 On Sun, Nov 29, 2009 at 6:18 AM, Ohad Levy ohadl...@gmail.com wrote:
  If it happened to you before that someone broke your manifest because of
  simple change (e.g. didnt test it on all hosts/classes external nodes ...
  combinations) this tool might be useful for you.

 No-one else tried this out? It's really quite cool.

 Ohad, I noticed you have /etc/puppet/manifests/site.pp hard-wired
 there. We actually serve our manifests out of a different location, so
 I had to do a minor tweak to get that working.

 It's a shame we can't impersonate architectures though... I'd love to
 be able to simulate catalog runs of a Mac client on a Linux continuous
 build server.



 
  the idea is very simple, just try to compile the manifest based on
  customized facts, classes, environments and external nodes parameters (if
  you use it) .
  You need to run this script only were you develop your manifests (e.g.
 your
  puppetmaster), there is no need to try out a puppet run on each and every
  system type that you have.
 
  You might also find it useful to run this script in some sort of a cron
 or
  via a repo hook, to find out any broken manifests running around..
 
  This script was originally written by a colleague of mine (Paul Kelly),
  however, I've adjusted it to hopefully common usage.
 
  Its brand new, so any comments / improvements (which I'm sure there are
  plenty) are welcomed.
 
  Hopefully you'll find it useful,
  Ohad
 
  http://github.com/ohadlevy/manitest
 
  --
 
  You received this message because you are subscribed to the Google Groups
  Puppet Users group.
  To post to this group, send email to puppet-us...@googlegroups.com.
  To unsubscribe from this group, send email to
  puppet-users+unsubscr...@googlegroups.compuppet-users%2bunsubscr...@googlegroups.com
 .
  For more options, visit this group at
  http://groups.google.com/group/puppet-users?hl=en.
 



 --
 nigel

 --

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


 --

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




--

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




Re: [Puppet Users] manitest - a simple tool to help your puppet development and testing

2009-12-01 Thread Nigel Kersten
On Tue, Dec 1, 2009 at 5:46 PM, Ohad Levy ohadl...@gmail.com wrote:


 On Wed, Dec 2, 2009 at 2:47 AM, Nigel Kersten nig...@google.com wrote:

 Ohad, I noticed you have /etc/puppet/manifests/site.pp hard-wired
 there. We actually serve our manifests out of a different location, so
 I had to do a minor tweak to get that working.

 I'll see what I can do about that ;)

 It's a shame we can't impersonate architectures though... I'd love to
 be able to simulate catalog runs of a Mac client on a Linux continuous
 build server.

 Well, the answer for this is - it depends :)
 the main problem here is not to override the facts (which must do anyway),
 but things that the puppet provider will force, e.g. an example error that
 you *might* get if you try it on another operating system (in this example a
 Solaris manifest on a Linux host)

  debug: Puppet::Type::Host::ProviderParsed: file /etc/inet/hosts does not
 exist
  Could not find a default provider for host

 nevertheless, it might work for your environment, but as you can see in this
 case, it generates a false alarm.

Yep. It's the provider forcing stuff that is the problem. I was going
to start digging in to work out what's a real alarm and what isn't.

How are you using this Ohad? Are you running it on your servers?

I'm thinking of moving one of my test servers to collect the cached
node info for all my clients and continuously run manitest against the
development code for my environments, perhaps triggered by changelist
submissions to my VCS.



 Cheers,
 Ohad

 --

 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To post to this group, send email to puppet-us...@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.




-- 
nigel

--

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




Re: [Puppet Users] manitest - a simple tool to help your puppet development and testing

2009-12-01 Thread Ohad Levy
On Wed, Dec 2, 2009 at 9:51 AM, Nigel Kersten nig...@google.com wrote:

 Yep. It's the provider forcing stuff that is the problem. I was going
 to start digging in to work out what's a real alarm and what isn't.

 How are you using this Ohad? Are you running it on your servers?

 Currently we've created a list of common node types with various classes
and parameters - which will be executed based on a repo hook.
another usage is that a person which is developing a manifest, will run this
test on a few basic node file, to filter out any programming error - similar
to the way some puppet use --parseonly.

I'm considering running it in some sort repo hook when committing, but not
sure how good of an idea it would be.


 I'm thinking of moving one of my test servers to collect the cached
 node info for all my clients and continuously run manitest against the
 development code for my environments, perhaps triggered by changelist
 submissions to my VCS.

 That's probably a good idea (but), usually the problem I have is not on
existing node setup, rather that someone will add one more class to its host
manifest and then everything breaks..

I'm happy you find it useful!
cheers,
Ohad

--

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




Re: [Puppet Users] Re: how do i override/redefine a resource that is declared in another class?

2009-12-01 Thread mark inaba
thanks so much to peter meier and silviu paragina for their assistance.
i didn't realize i needed the capital S in Service and the slightly different
format in changing the value of the service resource than when first
creating it.
i wanted to test it to make sure it worked, and it did!

thanks so much again :)

-mark



On Fri, Nov 27, 2009 at 5:16 PM, Silviu Paragina sil...@paragina.ro wrote:

 On 26.11.2009 16:48, mark wrote:

 back on my own account again, updating:
 hi! thanks for the advice
 i think i don't understand the nature of 'include'. in my mind include
 is something that is invisible to the actual engine that does
 things..it's a shorthand

 that replaces 'include X' with the contents of X and then the software
 goes to work on the final result and humans don't have to look at
 hugely long files.


 no, not by far.
 Include has the meaning, make sure that the rules in the specified class are
 also applied. Multiple includes of the same class from different places will
 apply the class only once.
 Require (=0.25, hope this is what is called never actually used it : ) is
 similar, with the sole exception that it makes sure that the definitions in
 the specified class are applied before the definitions in your class.
 Also note that there is no particular order in which your definitions are
 applied. When you use before it just means that the current resource will be
 applied before the other resource, but 1000 other resources could be applied
 in between.(same goes for require)


 so when i see a file that says

 class A {

 blah

 }

 include A



 it seems like it's redundant...so i'm thinking in the puppet
 world..does include have some stronger meaning like and execute the
 code?



 You should think at it more of a description, not code. (like you would in
 any other descriptive language)


 here is the specifics of my multilayer include world:

 --

 my attempt to trace the lineage of the resource i'm bumping into

 in my manifest/node file:

 node chquoteq02.tradearca.com {

 ...

 include base::setup

 ...

 i'd like to TURN ON SERVICE netfs for this node



 }

 --

 in /etc/puppet/modules-base/trunk/base/manifests/init.pp:



 class base::setup {

 ...

     include services::setup

 ...

 }

 --

 in /etc/puppet/modules-base/trunk/services/manifests/init.pp:



 class services::setup {

 ...

             include services::base

 ...

 }



 class services::base {

 ...

         service { netfs:

         ... TURNS OFF SERVICE

         }

 ...

 }







 so give this, i tried this (but it didn't work) in my manifest/node
 file:

 class myoverrideclass inherits  services::base {

         service { netfs:

                 enable  =  true,

                 ensure  =  running,

                 hasstatus =  true,

         }

 }


 Service with S not s. When the first letter is uppercase the statement
 alters an already existing definition, when it's lower case it's a new
 definition. Here:
 http://reductivelabs.com/trac/puppet/wiki/LanguageTutorial#classes .




   include base::setup

   include myoverrideclass



 i ran: puppetd -ov --no-daemonize


 I prefer puppetd --test (faster to write and not too verbose)

 on the client server and got:

 err: Could not retrieve catalog: Puppet::Parser::AST::Resource failed
 with error ArgumentError: Duplicate definition: Service[netfs] is
 already defined in file /etc/puppet/modules-base/trunk/services/
 manifests/init.pp at line 385; cannot redefine at /etc/puppet/
 manifests/nodes/chquoteq02.tradearca.com.node:491 on node
 chquoteq02.tradearca.com



 i even tried moving the 'include base::setup' to be above the
 'myoverrideclass' definition but still the same problem...

 On Nov 25, 2:17 pm, Peter Meierpeter.me...@immerda.ch  wrote:


 Hi



 i've been fiddling around with the inherits form...but..i can't seem
 to get any headway out of it.


 What is your problem with inheritance? Maybe we can give you a way out
  and  following example shows you that it is the way to go:

 $ cat foo.pp
 class a {
 file{'/tmp/a': ensure =  file}
 file{'/tmp/b': ensure =  file}

 }

 class b inherits a {
   File['/tmp/b']{ensure =  absent }

 }

 include a
 include b
 $ puppet foo.pp
 notice: //a/File[/tmp/a]/ensure: created
 $

 you can include the inherited class anywhere you'd like to. So for
  example simply write disable classes for the services you don't want  to
 manage on certain nodes and then include these in your node.

 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-us...@googlegroups.com.
 To unsubscribe from this group, send email to
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/puppet-users?hl=en.




 

Re: [Puppet Users] manitest - a simple tool to help your puppet development and testing

2009-12-01 Thread Luke Kanies
On Nov 29, 2009, at 6:18 AM, Ohad Levy wrote:

 If it happened to you before that someone broke your manifest  
 because of simple change (e.g. didnt test it on all hosts/classes  
 external nodes ... combinations) this tool might be useful for you.

 the idea is very simple, just try to compile the manifest based on  
 customized facts, classes, environments and external nodes  
 parameters (if you use it) .
 You need to run this script only were you develop your manifests  
 (e.g. your puppetmaster), there is no need to try out a puppet run  
 on each and every system type that you have.

 You might also find it useful to run this script in some sort of a  
 cron or via a repo hook, to find out any broken manifests running  
 around..

 This script was originally written by a colleague of mine (Paul  
 Kelly), however, I've adjusted it to hopefully common usage.

 Its brand new, so any comments / improvements (which I'm sure there  
 are plenty) are welcomed.


This is definitely very cool.

It seems a bit limited because it actually runs the whole  
configuration, but I like it.  It should definitely be straightforward  
to extend it to use a given host's Facts.

You might also be able to get some inspiration on how to use the  
internal APIs by looking at puppet-test, which covers most of these  
bits using the internal APIs.

-- 
I wanna hang a map of the world in my house. Then I'm gonna put pins
into all the locations that I've traveled to. But first, I'm gonna
have to travel to the top two corners of the map so it won't fall
down. -- Mitch Hedberg
-
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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




Re: [Puppet Users] manitest - a simple tool to help your puppet development and testing

2009-12-01 Thread James Turnbull
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Luke Kanies wrote:
 It seems a bit limited because it actually runs the whole  
 configuration, but I like it.  It should definitely be straightforward  
 to extend it to use a given host's Facts.
 
 You might also be able to get some inspiration on how to use the  
 internal APIs by looking at puppet-test, which covers most of these  
 bits using the internal APIs.
 

For the benefit of people who might not know the puppet-test script
is in the ext directory of the source package or via:

http://github.com/reductivelabs/puppet/blob/master/ext/puppet-test

Regards

James Turnbull

- --
Author of:
* Pro Linux System Administration (http://tinyurl.com/linuxadmin)
* Pulling Strings with Puppet (http://tinyurl.com/pupbook)
* Pro Nagios 2.0 (http://tinyurl.com/pronagios)
* Hardening Linux (http://tinyurl.com/hardeninglinux)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEVAwUBSxYMgSFa/lDkFHAyAQLM9AgA3BLEP1mbHciREtQx44cd/WxTjJRfOMLJ
lBNKmFGdUSXiPisIvChtz+oZDPOOU7Gt3wUQCp4y031Lc/Jhx3zWRkT5Jy4zFwbf
xuSaX/UMY11VuYA9k7NtFMediVY/nHrUU50RqiNm6I94a7XpkJwUxY99c2qXVKZJ
ctc5axMfCa95svl9k202eU+OvH+9dccuKJbjLw7OKz9lkF6rkNpQDyfC384r2Xbg
epBsIGJ2vfXk8pOdSbfr3iJ21bCGujGxgYJj+/mXpcAt1FAV0dj9irA877xZGd8n
Dq8S2DvaQImN++Kv/FaQ8brLbKTODfrox3u+9aPrm/MTYHXzcJis1A==
=vpIC
-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-us...@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.