[Puppet Users] Re: Just what is puppet doing here?

2009-11-17 Thread Dan Bode
Hi Doug,

It looks like you want to create the link

 /opt/jboss/current = /opt/jboss/jboss-${jboss_version}

but

/opt/jboss/current

already exists and is a directory

can you show me

ls -l /opt/jboss/current

Is it possible that another resource creates this path as a dir? maybe thats
why it happens half of the time (depending on which gets applied first, the
link or dir)

can you also run

ls -l /opt/jboss/current;puppetd --test | grep /opt/jboss/current;ls -l
/opt/jboss/current

to get a more condensed view on how this resource is managed during the
entire run.

regards,

Dan

On Tue, Nov 17, 2009 at 2:10 AM, Douglas Garstang
doug.garst...@gmail.comwrote:


 What is puppet doing here?

 Nov 17 00:02:01 gumby yum: Installed: tf-starterkit-tfel0-1.0-1.tf.noarch
 Nov 17 00:02:01 gumby puppetd[720]:
 (//Node[gumby.fr.xxx.com
 ]/Starterkit::Setup[tfel0]/Package[tf-starterkit-tfel0]/ensure)
 created
 Nov 17 00:02:07 gumby yum: Installed: tf-jboss-server-4.2.3.GA-1.tf.noarch
 Nov 17 00:02:07 gumby puppetd[720]:
 (//Node[app_node]/jboss::server/Package[tf-jboss-server]/ensure)
 created
 Nov 17 00:02:07 gumby puppetd[720]:
 (//Node[app_node]/jboss::server/File[/opt/jboss/current]) Recursively
 backing up to filebucket
 Nov 17 00:02:43 gumby puppetd[720]:
 (//Node[app_node]/jboss::server/File[/opt/jboss/current]) Filebucketed
 /opt/jboss/current/server/tfel0/deploy/eazye.ear to main with sum 703
 b44a0459ed5f1569c0096ab435ea0
 Nov 17 00:02:43 gumby puppetd[720]:
 (//Node[app_node]/jboss::server/File[/opt/jboss/current]) Not removing
 directory; use 'force' to override
 Nov 17 00:02:43 gumby puppetd[720]:
 (//Node[app_node]/jboss::server/File[/opt/jboss/current]) Recursively
 backing up to filebucket
 Nov 17 00:03:18 gumby puppetd[720]:
 (//Node[app_node]/jboss::server/File[/opt/jboss/current]) Filebucketed
 /opt/jboss/current/server/tfel0/deploy/eazye.ear to main with sum 703
 b44a0459ed5f1569c0096ab435ea0
 Nov 17 00:03:18 gumby puppetd[720]:
 (//Node[app_node]/jboss::server/File[/opt/jboss/current]) Not removing
 directory; use 'force' to override
 Nov 17 00:03:18 gumby puppetd[720]:
 (//Node[app_node]/jboss::server/File[/opt/jboss/current]/ensure)
 change from directory to link failed: Could not remove existing file

 Why is it trying to remove a directory? (Which directory?). I didn't
 tell it to do that in the manifest. I do have this..

file {
/opt/jboss/current:
links = manage,
ensure = /opt/jboss/jboss-${jboss_version},
require = Package[tf-jboss-server];
}

 that should create a symlink. Puppet seems to encounter this problem
 approx 50% of the time, with the same input conditions (ie I blow away
 all rpms' and directories). Interesting how it toggles the result from
 the same inputs. The other half of the time, it works just fine,
 creates the symlink and doesn't barf.

 I did read this...
 http://projects.reductivelabs.com/issues/1825

 ... not really following the reductive labs doc on symlinks, I put a
 links = manage as luke suggested, in a File {} in my site.pp. Same
 problem.

 Also noticed that when this problem occurs, the symlink doesn't get
 created. Instead puppet creates a new directory called 'current'.

 What's up with this?

 Doug.

 


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



[Puppet Users] Re: Just what is puppet doing here?

2009-11-17 Thread Douglas Garstang

Hi Dan.

Thanks for the swift reply. I worked it out. It was a dependancy
problem. An RPM was being installed before hand and creating
/opt/jboss/current as a directory, which puppet didn't like. I guess
the error message is pretty unintuitive here.

I tell ya... the puppet dependancies do my head in. It's getting to
the point where I'm going to be afraid to touch any part of this
puppet code in the future for fear of breaking a dependancy. :(

Doug.

On Tue, Nov 17, 2009 at 12:34 AM, Dan Bode d...@reductivelabs.com wrote:
 Hi Doug,

 It looks like you want to create the link

  /opt/jboss/current = /opt/jboss/jboss-${jboss_version}

 but

 /opt/jboss/current

 already exists and is a directory

 can you show me

ls -l /opt/jboss/current

 Is it possible that another resource creates this path as a dir? maybe thats
 why it happens half of the time (depending on which gets applied first, the
 link or dir)

 can you also run

ls -l /opt/jboss/current;puppetd --test | grep /opt/jboss/current;ls -l
 /opt/jboss/current

 to get a more condensed view on how this resource is managed during the
 entire run.

 regards,

 Dan

 On Tue, Nov 17, 2009 at 2:10 AM, Douglas Garstang doug.garst...@gmail.com
 wrote:

 What is puppet doing here?

 Nov 17 00:02:01 gumby yum: Installed: tf-starterkit-tfel0-1.0-1.tf.noarch
 Nov 17 00:02:01 gumby puppetd[720]:

 (//Node[gumby.fr.xxx.com]/Starterkit::Setup[tfel0]/Package[tf-starterkit-tfel0]/ensure)
 created
 Nov 17 00:02:07 gumby yum: Installed: tf-jboss-server-4.2.3.GA-1.tf.noarch
 Nov 17 00:02:07 gumby puppetd[720]:
 (//Node[app_node]/jboss::server/Package[tf-jboss-server]/ensure)
 created
 Nov 17 00:02:07 gumby puppetd[720]:
 (//Node[app_node]/jboss::server/File[/opt/jboss/current]) Recursively
 backing up to filebucket
 Nov 17 00:02:43 gumby puppetd[720]:
 (//Node[app_node]/jboss::server/File[/opt/jboss/current]) Filebucketed
 /opt/jboss/current/server/tfel0/deploy/eazye.ear to main with sum 703
 b44a0459ed5f1569c0096ab435ea0
 Nov 17 00:02:43 gumby puppetd[720]:
 (//Node[app_node]/jboss::server/File[/opt/jboss/current]) Not removing
 directory; use 'force' to override
 Nov 17 00:02:43 gumby puppetd[720]:
 (//Node[app_node]/jboss::server/File[/opt/jboss/current]) Recursively
 backing up to filebucket
 Nov 17 00:03:18 gumby puppetd[720]:
 (//Node[app_node]/jboss::server/File[/opt/jboss/current]) Filebucketed
 /opt/jboss/current/server/tfel0/deploy/eazye.ear to main with sum 703
 b44a0459ed5f1569c0096ab435ea0
 Nov 17 00:03:18 gumby puppetd[720]:
 (//Node[app_node]/jboss::server/File[/opt/jboss/current]) Not removing
 directory; use 'force' to override
 Nov 17 00:03:18 gumby puppetd[720]:
 (//Node[app_node]/jboss::server/File[/opt/jboss/current]/ensure)
 change from directory to link failed: Could not remove existing file

 Why is it trying to remove a directory? (Which directory?). I didn't
 tell it to do that in the manifest. I do have this..

    file {
        /opt/jboss/current:
            links = manage,
            ensure = /opt/jboss/jboss-${jboss_version},
            require = Package[tf-jboss-server];
    }

 that should create a symlink. Puppet seems to encounter this problem
 approx 50% of the time, with the same input conditions (ie I blow away
 all rpms' and directories). Interesting how it toggles the result from
 the same inputs. The other half of the time, it works just fine,
 creates the symlink and doesn't barf.

 I did read this...
 http://projects.reductivelabs.com/issues/1825

 ... not really following the reductive labs doc on symlinks, I put a
 links = manage as luke suggested, in a File {} in my site.pp. Same
 problem.

 Also noticed that when this problem occurs, the symlink doesn't get
 created. Instead puppet creates a new directory called 'current'.

 What's up with this?

 Doug.




 




-- 
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garst...@gmail.com
Cell: +1-805-340-5627

--~--~-~--~~~---~--~~
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: new release of puppetsurvey

2009-11-17 Thread Matthew Macdonald-Wallace

Philip wrote:
 Thank you for the clue with the max integer Size. Yes i develop on a
 64bit System and had no problems converting. Will test it on 32Bit
 Systems and provide a Patch.

Hi,

If you need someone to test the patch, let me know as at the moment
puppetsurvey is picking up all the nodes I'm using but always gives
the following error:



An error occurred
Application error
Exception information:

Message: Failed to open file:
fopen(/var/lib/puppet/reports/nodeName/2147483647.yaml)
[function.fopen]: failed to open stream: No such file or directory
Stack trace:

#0 /var/www/html/puppetsurvey/application/models/PuppetHost.php(157):
Horde_Yaml::loadFile('/var/lib/puppet...')
#1 /var/www/html/puppetsurvey/application/models/PuppetHost.php(115):
Default_Model_PuppetHost-parsePuppetReports()
#2 /var/www/html/puppetsurvey/application/models/Report.php(55):
Default_Model_PuppetHost-__construct('nodeName...')
#3 /var/www/html/puppetsurvey/application/controllers/ReportController.php(59):
Default_Model_Report-__construct('nodeName...')
#4 /var/lib/php/ZendFramework-1.9.5/library/Zend/Controller/Action.php(133):
ReportController-init()
#5 
/var/lib/php/ZendFramework-1.9.5/library/Zend/Controller/Dispatcher/Standard.php(262):
Zend_Controller_Action-__construct(Object(Zend_Controller_Request_Http),
Object(Zend_Controller_Response_Http), Array)
#6 /var/lib/php/ZendFramework-1.9.5/library/Zend/Controller/Front.php(946):
Zend_Controller_Dispatcher_Standard-dispatch(Object(Zend_Controller_Request_Http),
Object(Zend_Controller_Response_Http))
#7 
/var/lib/php/ZendFramework-1.9.5/library/Zend/Application/Bootstrap/Bootstrap.php(77):
Zend_Controller_Front-dispatch()
#8 /var/lib/php/ZendFramework-1.9.5/library/Zend/Application.php(358):
Zend_Application_Bootstrap_Bootstrap-run()
#9 /var/www/html/puppetsurvey/public/index.php(26): Zend_Application-run()
#10 {main}

Request Parameters:

array (
  'controller' = 'report',
  'action' = 'index',
  'hostname' = 'nodeName',
  'module' = 'default',
)
==

(I've removed the actual node name and replaced it with nodeName in
the error above.)

It would be great if we could get this working.

Cheers,

M.

--~--~-~--~~~---~--~~
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: Marco...

2009-11-17 Thread Julian Simpson

It works for me.

J.

2009/11/17 Douglas Garstang doug.garst...@gmail.com:

  Polo?

 Am I the only one having problems with this mailing list? Repeated
 attempts to post often result in messages going to the bit bucket. Who
 knows if this message will make it.

 Doug.

 




-- 
Julian Simpson
Software Build and Deployment
http://www.build-doctor.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: Marco...

2009-11-17 Thread James Turnbull

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Julian Simpson wrote:
 It works for me.
 

And me - I've never had any issues specifically - and after Luke I
appear to be the 2nd top poster in the group. :)

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/

iQEVAwUBSwJ8YiFa/lDkFHAyAQJ/xAf/Y2kBa5vkuhXS1nto7u7Tg+G7CzY/O7dO
PZRWXesay4D6oqJbiWrKKTIs0CW+ir+hZ0w3x2Gv3itcRozRnG4Zfl2Z7Z62kgsU
hWGINUIyYeLJ4b7i9ylNlxzTL+rNdkuNieSf92g9ft1NoSgphyU8EqdoC+i2P19O
S1UVib3tOGRn6aVqy6co+bkk3C2w+0kM2wdrAKs2Frod2d0a0TXl+EA7skFKZye2
xen0Nb9fbq23sr9BC8yZm6SffIQiX7QajdBEwYNpedd4Izvy1bmOO3YjXqoMrBID
gl4/I3ycE6LjUuD0YNIcKapUuLpihf2YspB5uYcDP1QnwaF5ExTsew==
=7+2/
-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: new release of puppetsurvey

2009-11-17 Thread Matthew Macdonald-Wallace

Hi,

I changed line 147 in application/models/PuppetHosts.php and removed
the (int) reference - now it works!

The new line is as follows:

$reportdate = basename($file, '.yaml');

instead of:

   $reportdate = (int) basename($file, '.yaml');

Kind regards,

Matt


2009/11/17 Matthew Macdonald-Wallace mattmacw...@gmail.com:
 Philip wrote:
 Thank you for the clue with the max integer Size. Yes i develop on a
 64bit System and had no problems converting. Will test it on 32Bit
 Systems and provide a Patch.

 Hi,

 If you need someone to test the patch, let me know as at the moment
 puppetsurvey is picking up all the nodes I'm using but always gives
 the following error:

 

 An error occurred
 Application error
 Exception information:

 Message: Failed to open file:
 fopen(/var/lib/puppet/reports/nodeName/2147483647.yaml)
 [function.fopen]: failed to open stream: No such file or directory
 Stack trace:

 #0 /var/www/html/puppetsurvey/application/models/PuppetHost.php(157):
 Horde_Yaml::loadFile('/var/lib/puppet...')
 #1 /var/www/html/puppetsurvey/application/models/PuppetHost.php(115):
 Default_Model_PuppetHost-parsePuppetReports()
 #2 /var/www/html/puppetsurvey/application/models/Report.php(55):
 Default_Model_PuppetHost-__construct('nodeName...')
 #3 
 /var/www/html/puppetsurvey/application/controllers/ReportController.php(59):
 Default_Model_Report-__construct('nodeName...')
 #4 /var/lib/php/ZendFramework-1.9.5/library/Zend/Controller/Action.php(133):
 ReportController-init()
 #5 
 /var/lib/php/ZendFramework-1.9.5/library/Zend/Controller/Dispatcher/Standard.php(262):
 Zend_Controller_Action-__construct(Object(Zend_Controller_Request_Http),
 Object(Zend_Controller_Response_Http), Array)
 #6 /var/lib/php/ZendFramework-1.9.5/library/Zend/Controller/Front.php(946):
 Zend_Controller_Dispatcher_Standard-dispatch(Object(Zend_Controller_Request_Http),
 Object(Zend_Controller_Response_Http))
 #7 
 /var/lib/php/ZendFramework-1.9.5/library/Zend/Application/Bootstrap/Bootstrap.php(77):
 Zend_Controller_Front-dispatch()
 #8 /var/lib/php/ZendFramework-1.9.5/library/Zend/Application.php(358):
 Zend_Application_Bootstrap_Bootstrap-run()
 #9 /var/www/html/puppetsurvey/public/index.php(26): Zend_Application-run()
 #10 {main}

 Request Parameters:

 array (
  'controller' = 'report',
  'action' = 'index',
  'hostname' = 'nodeName',
  'module' = 'default',
 )
 ==

 (I've removed the actual node name and replaced it with nodeName in
 the error above.)

 It would be great if we could get this working.

 Cheers,

 M.


--~--~-~--~~~---~--~~
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: Cannot allocate memory

2009-11-17 Thread Mark Plaksin

Ohad Levy ohadl...@gmail.com writes:

 does puppet run at all? e.g. do you see anything on the console?
 if not, it might be an old facter 1.54 bug?

 if your puppetd process is using 1.5GB or ram, something is wrong or you are
 doing way to many file transfers (probably recursive ones).

We've also seen tidy use lots of RAM when there are tons of files to be
tidied.  This was with 0.24.x; I haven't tested with 0.25.x yet.


--~--~-~--~~~---~--~~
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: Marco...

2009-11-17 Thread Charles Johnson
Actually, most posters here are top posters. :)

Cheers--

Charles

On Tue, Nov 17, 2009 at 4:35 AM, James Turnbull ja...@lovedthanlost.netwrote:


 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Julian Simpson wrote:
  It works for me.
 

 And me - I've never had any issues specifically - and after Luke I
 appear to be the 2nd top poster in the group. :)

 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/

 iQEVAwUBSwJ8YiFa/lDkFHAyAQJ/xAf/Y2kBa5vkuhXS1nto7u7Tg+G7CzY/O7dO
 PZRWXesay4D6oqJbiWrKKTIs0CW+ir+hZ0w3x2Gv3itcRozRnG4Zfl2Z7Z62kgsU
 hWGINUIyYeLJ4b7i9ylNlxzTL+rNdkuNieSf92g9ft1NoSgphyU8EqdoC+i2P19O
 S1UVib3tOGRn6aVqy6co+bkk3C2w+0kM2wdrAKs2Frod2d0a0TXl+EA7skFKZye2
 xen0Nb9fbq23sr9BC8yZm6SffIQiX7QajdBEwYNpedd4Izvy1bmOO3YjXqoMrBID
 gl4/I3ycE6LjUuD0YNIcKapUuLpihf2YspB5uYcDP1QnwaF5ExTsew==
 =7+2/
 -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: Multiple manifest versions?

2009-11-17 Thread Carl Caum
I am reproducing the role of the puppetmaster, but I have more overall control 
and I'm pushing the work of compiling the catalogue off to the nodes. 

Currently I use a series of XML files until I'm ready to move them to a 
database.  My directory structure looks like this:

/configuration.xml
/os/OS/configuration.xml
/sites/SITECODE/configuration.xml
/sites/SITECODE/hosts/HOST/configuration.xml

When the puppeteer determines it's time to do a run on a host, it reads in what 
site code the host is in from a database.  It then takes the site code and 
passes it to the manifest generator function to parse the appropriate XML 
files.  As I read in a host, I convert the XML entries into a hash and merge 
them with right side precedence in the following order:

global-os-site-host

So a host only gets the appropriate data for that specific host, which 
maintains security levels.  Also, any global resource that's defined (virtual 
resource, resource defaults, variables) can be overwritten at the os, site and 
host levels.  I can also disable virtual resources and resource defaults at a 
lower level than the level it was defined in. This allows my actual puppet code 
to be more generic and contain far less data.  This way I feel safe with the 
code living on the hosts instead of the puppetmaster.  Of course this would 
never work in some industries like banking, but it works great for us.  It's 
going to allow us to role out changes and puppetize existing boxes much faster.


On Nov 17, 2009, at 12:16 AM, Ohad Levy wrote:

 that sounds interesting, how does it work? in  a way, you are reproducing the 
 role of the puppetmaser...
 
 
 On Tue, Nov 17, 2009 at 1:20 PM, Carl Caum carl.c...@gmail.com wrote:
 No, the manifest is generated per host on the fly.  So each manifest only has 
 access to the data for it specifically.  That's one advantage of my approach. 
  I maintain the security model of using puppetmasters, but I distribute the 
 work load to the nodes themselves.
 
 The manifest that's delivered to the host looks like this:
 
 variables
 resource defaults
 virtual resources
 node host {
classes
 }
 
 On Nov 16, 2009, at 10:58 PM, Ohad Levy wrote:
 
 Hi Carl,
 
 One thing that I didn't understand,  does it means that the nodes you have 
 get only their part of the manifest? or do they get all manifest and apply 
 the right parts?
 
 the main issue I have with your approach is that a lot of information is 
 available on the client side (even if there is no node specific information).
 
 as far for features for foreman, let me know what you had in mind...
 
 cheers,
 Ohad
 
 On Tue, Nov 17, 2009 at 12:30 PM, Carl Caum carl.c...@gmail.com wrote:
 I have series of module servers that serve modules to the host.  I don't use 
 puppetmasters though.  In a nutshell, I have a manifest server called the 
 'puppeteer' that generates manifests based on meta data stored in a 
 database.  Well, it will be in database soon.  For now it's in XML files.  
 The meta data contains everything from modules and what version of the 
 modules a host should have as well as things like variables, virtual 
 resources, resource defaults and classes.  When it's time for a host to do a 
 puppet run, the puppeteer generates a manifest and puts an entry in to a 
 queue for that host.  A service on the host, called 'puppetstring' polls the 
 queue every few seconds for work.  When there's an entry in the queue for 
 it, it pulls down its data (the manifest and modules it needs).  It syncs up 
 the modules and the appropriate version from the local module servers 
 (puppetcache servers) and executes the manifest.  
 
 This awards me much flexibility.  Basically my modules rarely contain data, 
 just structure.  The contents of files, and even entire resources themselves 
 can be controlled through a  web interface and be deployed on the host, site 
 or global level.  This also allows me to do automated rollouts where I have 
 a sequence of hosts do runs and based on their success or failure, I can 
 determine whether or not to move on to the next step.  This also allows me 
 to allow certain control over specific machines and resources to end users.  
 My database engineers can, for instance, control the contents of the 
 tnsnames.ora files on all Oracle clients through a web interface.  I can 
 also put logic in to my scheduling of runs based on external criteria.  For 
 instance, if the cluster has a lot of work to do for the next two hours, 
 don't do puppet runs every thirty minutes but instead every hour to reduce 
 the CPU load.  Or maybe don't do a run on a cluster node if more than 40% of 
 the cluster nodes are currently doing runs.  
 
 The web interface has yet to actually be built and I'm really sure whether 
 or not I should extend on The Foreman or role out my own, but that's another 
 topic.  
 
 I've promised several people a blog post on all this and one day I'll 
 deliver on that promise :)
 
 On Nov 16, 2009, at 

[Puppet Users] 'search list' of templates

2009-11-17 Thread Dick Davies

If I use the source attribute to file, I can pass in a list of files
that will be searched until one matches.

Is there a way to do something similar with templates?

(Use case: I'm trying to make a generic apache module, but every
webserver we run is totally different,
so rather than make a single one size fits all template I'd like to be
able to pass a per-vhost template in).

--~--~-~--~~~---~--~~
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: 'search list' of templates

2009-11-17 Thread Dan Bode
Hi Dick,

I saw an example of this in Edwin Shao's newly posted modules.

http://github.com/eshao/puppet/blob/master/manifests/macros.pp , look for
the definition named itpl

He is using a define to wrap if statements to select which template is used
based on availability. He also wrote a custom function to check which
template files exist on the server.

This answers your question, but I am not sure if this is the best approach.
Why cant you just create the .conf files in the classes that represent the
applications? (ie: class app1 , manages the resource
/etc/httpd/conf.d/app1.conf, etc..) Are you modifying httpd.conf based on
the applications that are installed (or trying to modify a single file based
on which classes are included?)

regards,

Dan






On Tue, Nov 17, 2009 at 10:15 AM, Dick Davies
rasput...@hellooperator.netwrote:


 If I use the source attribute to file, I can pass in a list of files
 that will be searched until one matches.

 Is there a way to do something similar with templates?

 (Use case: I'm trying to make a generic apache module, but every
 webserver we run is totally different,
 so rather than make a single one size fits all template I'd like to be
 able to pass a per-vhost template in).

 


--~--~-~--~~~---~--~~
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: Marco...

2009-11-17 Thread Rob McBroom

On Nov 17, 2009, at 3:29 AM, Douglas Garstang wrote:

 Am I the only one having problems with this mailing list? Repeated
 attempts to post often result in messages going to the bit bucket. Who
 knows if this message will make it.

I had a problem back in April where I could join the list, but I never received 
any of the e-mails. Eventually, I unsubscribed and Luke added me by hand. It 
started working again around that time, but it may have been coincidence.

-- 
Rob McBroom
http://www.skurfer.com/

Because it screws up the order in which people normally read text.

Original message:

 Why is it bad to top-post your reply?


--~--~-~--~~~---~--~~
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] Quick question on the exec resource

2009-11-17 Thread Jon Stanley
I haven't tried this yet, but I find puppet's file resource to be
*way* too slow for what I need to do, causing runs in excess of 5
minutes. There's a base directory structure (which is very small)
which I then put content into (and I think it's the checksumming of
this content, which is pointless because I have replace = no in the
file resource, that's taking all of the time).  There are some files
in that directory which are explicitly manged (a symlink and a
templated file).

The question is that if I use an exec resource to rsync out the
skeleton directory structure, and have a 'creates' in the exec
resource, can I then require that exec resource in the explicitly
managed files (i.e. if the exec resource doesn't do anything because
of the creates directive, is it considered successful by puppet?)

--

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




Re: [Puppet Users] Re: Installing Packages from puppet files

2009-11-17 Thread Chad Huneycutt
Creating your own repo obviously will come in handy, but here is
another option.  The problem is that the default package provider you
are using (probably yum) does not support the puppet protocol for
retrieving packages.  What I have done in a couple of cases is put the
package on a web server and just use the rpm provider to snag it
from there:

package { MySQL-server-community:
   provider = rpm,
   ensure = installed,
   source = http://myserver.com/rpms/MySQL-server-
community-5.1.40-0.rhel5.i386.rpm
}

On Mon, Nov 16, 2009 at 4:01 PM, jokeeffe jete.okee...@gmail.com wrote:

 yes, it does, starting on my repo now.

 thanks

 On Nov 15, 6:52 pm, Avi Miller avi.mil...@gmail.com wrote:
 Hi,

 jokeeffe wrote:
  Hi, I'm a puppet newbie. Is there a way to install an rpm from the
  files served by the puppet master? If so, what am I doing wrong (see
  below)? If this isn't possible, how should I be installing custom
  rpms?

 High-level explanation:

 You need to create a Yum repository for your custom RPMs (using the
 createrepo tool) on a accessible webserver somewhere on your network.
 You could put this on the puppet master itself if you want.

 You can then use the yumrepo puppet type to configure that repository on
 your puppet clients. Once you've done that, you can use the package type
 to install RPMs from that repository.

 You should use a requires parameter on your package type to ensure the
 yumrepo is configured first.

 Hope that makes sense,
 Avi
 --~--~-~--~~~---~--~~
 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
 -~--~~~~--~~--~--~---





-- 
Chad M. Huneycutt

--

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




Re: [Puppet Users] Re: Multiple manifest versions?

2009-11-17 Thread Scott Smith
Rob McBroom wrote:
 On Nov 16, 2009, at 10:20 PM, Scott Smith wrote:
 
 Yeah, I considered environments. I'd just rather not have to change my 
 puppetmasters' puppet.conf when I want to deploy a new manifest version 
 to them. It wouldn't be *difficult*; I'm just concerned with the 
 puppet.conf becoming unwieldy after a while.
 
 I use environments and never have to touch the puppet.conf on the clients. 
 All of the nodes are stored in LDAP with an attribute called environment. 
 The puppetmaster will use that in choosing which manifests to apply.
 

Usng environments as a version of a manifest will require adding an 
environment to *Puppetmaster* every time I bump the manifest version. 
Not the client, but Puppetmaster. :)

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




Re: [Puppet Users] Re: Cannot allocate memory

2009-11-17 Thread Dan Bode
Hi Douglas,

We are currently working on a patch related to memory consumption, and would
appreciate some information to see if this patch may resolve this issue.

Can I get a little more information about the characteristics that are
leading to this issue?

Is this just for a few machines or all?

Is this re creatable? Does it consistently happen every run for one machine,
or set of manifests?

do you have a lot of file resources? Are you using recurse=true?

Do you know what the total size for all files managed in this catalog is?

Is there anything special about this catalog? How many resources total would
you say are managed?

regards,

Dan

--

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




Re: [Puppet Users] Quick question on the exec resource

2009-11-17 Thread James Turnbull
2009/11/18 Jon Stanley jonstan...@gmail.com:
 I haven't tried this yet, but I find puppet's file resource to be
 *way* too slow for what I need to do, causing runs in excess of 5
 minutes. There's a base directory structure (which is very small)
 which I then put content into (and I think it's the checksumming of
 this content, which is pointless because I have replace = no in the
 file resource, that's taking all of the time).  There are some files
 in that directory which are explicitly manged (a symlink and a
 templated file).

What version are you using?  Have you tried 0.25.1?  I think you'll
find it's considerably faster.

 The question is that if I use an exec resource to rsync out the
 skeleton directory structure, and have a 'creates' in the exec
 resource, can I then require that exec resource in the explicitly
 managed files (i.e. if the exec resource doesn't do anything because
 of the creates directive, is it considered successful by puppet?)

Following the logic through I'd say yes.  The exec would only run if
the file created doesn't exist but should be skipped (and not fail)
if the file does exist.

Regards

James Turnbul
l

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

--

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




Re: [Puppet Users] Re: Multiple manifest versions?

2009-11-17 Thread Rob McBroom
On Nov 17, 2009, at 6:01 PM, Scott Smith wrote:

 Usng environments as a version of a manifest will require adding an 
 environment to *Puppetmaster* every time I bump the manifest version. 
 Not the client, but Puppetmaster. :)

Well, true. I just have 3 environments. The experimental for testing 
manifests after changes, the test which gets applied to all dev/test/staging 
boxes, and the prod that gets applied to production servers. They're all 
working copies of the same repo and are identical most of the time, except when 
testing something new.

Sounds like you want something more complicated.

-- 
Rob McBroom
http://www.skurfer.com/

Because it screws up the order in which people normally read text.

Original message:

 Why is it bad to top-post your reply?



--

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




Re: [Puppet Users] Re: Multiple manifest versions?

2009-11-17 Thread Ohad Levy
On Wed, Nov 18, 2009 at 7:01 AM, Scott Smith sc...@ohlol.net wrote:


 Usng environments as a version of a manifest will require adding an
 environment to *Puppetmaster* every time I bump the manifest version.
 Not the client, but Puppetmaster. :)


Generating it on the puppetmaster is not a big task, just a loop over the
environment names :) - at least thats what I do.

note that there is a bug with 0.24.x that if you change the modules in your
env and you use passenger, than you must restart your puppetmaster instances
(as it wont reload the manifests)

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