Re: [Puppet Users] Why agent report is so slow?

2012-09-17 Thread flex
Thank you, Daniel.
Then how can we make puppet not generate the reports? I try to add
'report=false', but seems no effect.

On Sat, Sep 15, 2012 at 2:46 AM, Daniel Pittman dan...@puppetlabs.comwrote:

 On Fri, Sep 14, 2012 at 3:16 AM, flex frostyn...@gmail.com wrote:
  Thanks, Daniel. We do have some recursive file copies and hundreds of
 other
  resources. So we'd better decrease the resources numbers?

 Well, that would be the only short term path to making report output
 faster - but, in general, if you are managing it you probably need to
 be managing it.  :)

 --
 Daniel Pittman
 ⎋ Puppet Labs Developer – http://puppetlabs.com
 ♲ Made with 100 percent post-consumer electrons

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



-- 
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: Where puppet store the source files?

2012-09-17 Thread itJunky
My main issue it Where i can find directory file_metadata?
If I learn it, i can edit auth.conf to it directory.

пятница, 14 сентября 2012 г., 18:24:43 UTC+4 пользователь Cosmin-Viorel 
Ilie написал:

 I think you need to edit the auth.conf file to allow the puppet client 
 access. 

 On Friday, September 14, 2012 5:12:49 PM UTC+3, itJunky wrote:

 I have a directive like this:

 file { /etc/sudoers:
 owner = root,
 group = root,
 mode = 440, 
 source = puppet:///modules/sudo/sudoers
 }

 When i try to get this file on puppet agent, i see error:
 err: /Stage[main]/Sudo/File[/etc/sudoers]: Could not evaluate: Error 403 
 on SERVER: Forbidden request: puppet-client(192.168.200.170) access to 
 /file_metadata/modules/sudo/sudoers [find] authenticated  at line 104 Could 
 not retrieve file metadata for puppet:///modules/sudo/sudoers: Error 403 on 
 SERVER: Forbidden request: puppet-client(192.168.200.170) access to 
 /file_metadata/modules/sudo/sudoers [find] authenticated  at line 104 at 
 /etc/puppet/manifests/site.pp:12

 In this error message i see a path /file_metadata/modules/sudo/sudoers! 
 Where i can find directory file_metadata?

 I trying to change any of directives like vardir, modulepath and much 
 more, but not anyone of path not work as /file_metadata/ =(



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



[Puppet Users] Re: Puppet ignoring ENC classes

2012-09-17 Thread Cosmin-Viorel Ilie


 Any ideas on what is wrong with this setup and why the puppet master is 
 not even executing the external_nodes or logging any errors ?

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



[Puppet Users] Re: Puppet ignoring ENC classes

2012-09-17 Thread Cosmin-Viorel Ilie
After some more trial and error i've managed to get this working if i 
disabled store configs, which is strange. Maybe i'm missing something but 
there is nothing in the documentation about not using store configs with 
ENC.

On Friday, September 14, 2012 12:43:48 PM UTC+3, Cosmin-Viorel Ilie wrote:

 Hi everyone,

 I've been bashing my head in the wall for several days now trying to find 
 out why puppet isn't loading the class from enc. I've setup the enc from 
 puppet-dashboard which returns:

 [root@v-test-mng-01 puppet-dashboard]# /usr/bin/env PUPPET_DASHBOARD_URL=
 http://v-test-mng-01:3000 /usr/share/puppet-dashboard/bin/external_node

 ---
 - name: v-test-tst-01.domain.net
   parameters: {}

   classes:
   - test
 - name: v-test-mng-01.domain.net
   parameters: {}

   classes: []


 however when i run  puppet agent --test --debug --no-daemonize -v on 
 v-test-tst-01 the class is not loaded. If a look in the 
 /var/lib/puppet/classes.txt on the agent i only see an entry for settings, 
 but not the test class. Permissions to the 
 /usr/share/puppet-dashboard/bin/external_node are [-rwxr-xr-x 1 puppet 
 puppet 1453 Sep 12 04:43 /usr/share/puppet-dashboard/bin/external_node]. 

 The test module is as fallows:

 test/manifests/init.pp
class test ($var='default') {
 notify {$var:}
  }


 The puppet config file is :

 [main]

 # The Puppet log directory.
 # The default value is '$vardir/log'.
 logdir = /var/log/puppet

 server= v-test-mng-01.domain.net
 # Where Puppet PID files are kept.
 # The default value is '$vardir/run'.
 rundir = /var/run/puppet

 # Where SSL certificates are kept.
 # The default value is '$confdir/ssl'.
 ssldir = $vardir/ssl
 autosign=true
 environment = production

 [agent]
 # The file in which puppetd stores a list of the classes
 # associated with the retrieved configuratiion.  Can be loaded in
 # the separate ``puppet`` executable using the ``--loadclasses``
 # option.
 # The default value is '$confdir/classes.txt'.
 classfile = $vardir/classes.txt

 # Where puppetd caches the local configuration.  An
 # extension indicating the cache format is added automatically.
 # The default value is '$confdir/localconfig'.
 localconfig = $vardir/localconfig
 report = true

 [master]
 node_terminus = exec
 external_nodes = /usr/bin/env PUPPET_DASHBOARD_URL=
 http://v-test-mng-01:3000 /usr/share/puppet-dashboard/bin/external_node
 
 ssl_client_header = SSL_CLIENT_S_D
 ssl_client_verify_header = SSL_CLIENT_VERIFY
 storeconfigs = true
 dbadapter = mysql
 dbname = puppet
 dbuser = puppet
 dbpassword = 
 dbserver = localhost
 dbsocket = /var/lib/mysql/mysql.sock
 reports = http,store,log
 reporturl = http://localhost:3000/reports/upload


 If i create the *site.pp *and add the node definition there everything 
 works fine. 

 The dashboard is on the same machine as the puppet master (v-test-mng-01 
 in my case).  If i run: *puppet master --configprint external_nodes*
 /usr/bin/env 
 PUPPET_DASHBOARD_URL=http://v-test-mng-01:3000/usr/share/puppet-dashboard/bin/external_node

 I'm using puppet 3.0 RC6 and dashboard 1.2.11 with Ruby 1.8.7 (2011-06-30 
 patchlevel 352) [x86_64-linux]


 I'm running out of ideas on how to get this working so any idea or help 
 would be appreciated.

 The output from the agent run is attached.



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/XKxcB8nxTdwJ.
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.



Re: [Puppet Users] AW: Issue with large directory content

2012-09-17 Thread Bernd Adamowicz


On 09/14/2012 03:09 PM, jcbollinger wrote:


 On Friday, September 14, 2012 6:14:37 AM UTC-5, badamowicz wrote:

 The other questions from all of you and finally Den's question, which
 was: Are you trying to set any permissions inside that directory
 elsewhere in the manifest? made me rethink everything and pointed
 me to the right place. A few lines down from where I thought the
 error was I used to have this:

   file { [
 ${codebase_ng::repository_mount}/${sonatype_work_dir}/nexus,
 ${codebase_ng::repository_mount}/${sonatype_work_dir}/nexus/conf]:
   require =
 File[${codebase_ng::repository_mount}/${sonatype_work_dir}],
   ensure  = directory,
   owner   = $nexus_user_id,
   group   = $nexus_group_id,
   mode= 0750,
   source  = puppet:///modules/codebase_ng/nexus/conf,
   recurse = true,
   purge   = false,
   }

 This file resource was just about having configuration files in
 place below '/repository/sonatype-work/nexus/conf'. But obviously
 the first entry in the file array which resolves to
 '/repository/sonatype-work/nexus' was the trigger for Puppet to
 start recursive scanning everything.

 So, the misconfiguration was on my side (nice pitfall), but I wonder
 if this is expected behaviour. Shouldn't recursion only be done on
 the last entry of the file array?



 No.  Why would you suppose that?  When you write a resource declaration
 of the form

 someresource { [ 'title1', 'title2']:
param1 = value1,
param2 = value2
 }

 it is shorthand for separate resource declarations, one for each title
 given, all having the specified parameters:

 someresource { 'title1':
param1 = value1,
param2 = value2
 }

 someresource { 'title2':
param1 = value1,
param2 = value2
 }

 The use of an array to specify multiple titles is perhaps a bit quirky
 in itself (though useful!), but I don't see why anyone would suppose
 that resources specified that way would be assigned different parameters
 from each other.

 There is nothing specific to the File resource type here, but even if
 there were, why would you expect Puppet to suppose that you only wanted
 recursion on one of the specified resources?  I don't see it.


 John


Yes, you're right. My idea was to have the 'source=' parameter only 
applied to the last entry in the array. This was simply an error in 
reasoning.

Thanks
Bernd

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



Re: [Puppet Users] Help me name a class in the new puppetdb module!

2012-09-17 Thread Stefan Goethals
Why not simply puppetdb::server for the ... well, puppetdb server and
puppetdb::client for... the client, as that is exactly what the
puppetmaster is to puppetdb?

Regards,

Stefan.

On Sat, Sep 15, 2012 at 4:03 PM, Ashley Penney apen...@gmail.com wrote:

 I kind of feel like the reason you're having a problem naming this is
 that it doesn't really belong in the puppetdb class but in the puppet
 module that sets up the server. :)

 That's how I did this, I have a puppetdb module that purely sets up
 puppetdb and then puppet::server::puppetdb to handle that other stuff.
  Failing that I guess I nominate the name puppetdb::puppetmaster
 despite the ugliness!

 On Fri, Sep 14, 2012 at 7:03 PM, Chris Price ch...@puppetlabs.com wrote:
  Anyone interested in helping me name a class in the forthcoming puppetdb
  module?
 
  There are 2 major parts to the module... the part that sets up puppetdb
  itself, and the part that sets up the puppet master to talk to puppetdb.
  I'm brainstorming names for the latter... a class that you would apply on
  your puppet master machine to tell it how to find and use puppetdb.
 
  Any suggestions?
 
  --
  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.

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



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



[Puppet Users] Re: Puppet ignoring ENC classes

2012-09-17 Thread Cosmin-Viorel Ilie


 So just in case you have the same problem:


 using : 
storeconfigs = true
dbadapter = mysql
dbname = puppet
dbuser = puppet
dbpassword = 
dbserver = localhost

causes puppet master to ignore the ENC setting, however if i use:

storeconfigs = true
storeconfigs_backend = puppetdb
and use puppetdb for storeconf everything works fine. I haven tried with 
different adapters but for mysql adapter it doesn't work.  It might be an 
environment setting based on the version of gems i use ... not sure at this 
point.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/h4htjjr1OWYJ.
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: Where puppet store the source files?

2012-09-17 Thread Martijn
I don't know where your Puppet gets that path from. I've never seen it 
before. Maybe the setting is specified in your config file. Run the 
following commands as the user that your puppetmaster uses:

puppet --configprint modulepath

This command will show in which directories Puppet looks for your modules. 
In your case, I'd expect /file_metadata to be in that list.

puppet --configprint config

This command will show where Puppet's config file is stored. Open that file 
and you can set your prefered modulepath like this example:

[main]
modulepath = 
/etc/puppetlabs/puppet/modules:/opt/puppet/share/puppet/modules

Run the first command again, and you should see that Puppet now uses the 
path you specified.

Hope this helps,
Martijn Heemels

Op maandag 17 september 2012 09:42:12 UTC+2 schreef itJunky het volgende:

 My main issue it Where i can find directory file_metadata?
 If I learn it, i can edit auth.conf to it directory.

 пятница, 14 сентября 2012 г., 18:24:43 UTC+4 пользователь Cosmin-Viorel 
 Ilie написал:

 I think you need to edit the auth.conf file to allow the puppet client 
 access. 

 On Friday, September 14, 2012 5:12:49 PM UTC+3, itJunky wrote:

 I have a directive like this:

 file { /etc/sudoers:
 owner = root,
 group = root,
 mode = 440, 
 source = puppet:///modules/sudo/sudoers
 }

 When i try to get this file on puppet agent, i see error:
 err: /Stage[main]/Sudo/File[/etc/sudoers]: Could not evaluate: Error 403 
 on SERVER: Forbidden request: puppet-client(192.168.200.170) access to 
 /file_metadata/modules/sudo/sudoers [find] authenticated  at line 104 Could 
 not retrieve file metadata for puppet:///modules/sudo/sudoers: Error 403 on 
 SERVER: Forbidden request: puppet-client(192.168.200.170) access to 
 /file_metadata/modules/sudo/sudoers [find] authenticated  at line 104 at 
 /etc/puppet/manifests/site.pp:12

 In this error message i see a path 
 /file_metadata/modules/sudo/sudoers! Where i can find directory 
 file_metadata?

 I trying to change any of directives like vardir, modulepath and much 
 more, but not anyone of path not work as /file_metadata/ =(



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/KnWddP9IBtsJ.
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: Systems Provisioning

2012-09-17 Thread Keiran Sweet
Hi There,
I manage a relatively large RHEL environment, we handle provisioning as 
follows:

- PXE + Kickstart to bootstrap and install the base OS + Puppet client onto 
the platform, be it VMWare or bare metal
- Kickstart post scripts put a basic puppet configuration file in place on 
the host, and a number of the values for things such as environment and 
puppetmaster come from Foreman's Macro's, this allows values in the ENC to 
flow into the kickstart files before your first puppet run.

We then run in the %post section of the kickstart file the following:
- A Puppet run that bootstraps the puppet client using tags ie,  --tags 
puppet::client
- A full puppet run via puppet agent -tov which applys the SOE to the 
platform

That provides on first boot a fully configured RHEL server that includes 
all our additional software and customisations in about 3-5 minutes (not 
including POST)

In regards to certs, we have a relatively open autosign.conf on our build 
networks, so we can provision servers , physical or virtual quite quickly 
by just hitting F12 for a network boot. I am sure there are some 
cleaner/more secure things we can do provisioning wise, however these have 
been slightly hindered by the RHN Satellite server i've been slowly pulling 
out of the environment at the same time, as it had the potential to break 
things if i wasnt careful.

ENC wise, I can't recommend Foreman enough, version 1.x is just brilliant, 
you can see the macros it can provide here:  
http://theforeman.org/projects/foreman/wiki/TemplateWriting

Hope this helps,

K









On Sunday, September 16, 2012 7:22:03 AM UTC+1, Douglas wrote:

 I'm wondering what people are doing systems provisioning with, ie the 
 process that gets puppet installed onto a system, running for the 
 first time, and also the handling of certificate signing and so forth. 
 I don't see this topic discussed much. 

 The mc-provision tools at 
 https://github.com/ripienaar/mcollective-server-provisioner don't seem 
 to be actively developed anymore, or at least I wasn't able to find 
 enough documentation to be able to effectively make use of it. 

 Doug 


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/NrKmbHHiaq8J.
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] Can puppet add repositories to nodes?

2012-09-17 Thread Sandra Schlichting
Hi all,

I would like to add two repositories to Ubuntu nodes

apt-add-repository deb http://archive.canonical.com/ $(lsb_release -sc) 
partner

deb http://dl.google.com/linux/chrome/deb/ stable main


and then import the key


apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 16126D3A3E5C1192


Can this be done in a clever way with puppet?


Hugs,

Sandra




-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/lkxkivCib8YJ.
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.



Re: [Puppet Users] Can puppet add repositories to nodes?

2012-09-17 Thread Joe Topjian
Hi Sandra,

The Puppet Apt module should be of some use:

http://puppetlabs.com/blog/module-of-the-week-puppetlabs-apt-pull-apt-strings-with-puppet/

Thanks,
Joe



On Mon, Sep 17, 2012 at 7:51 AM, Sandra Schlichting 
littlesandr...@gmail.com wrote:

 Hi all,

 I would like to add two repositories to Ubuntu nodes

 apt-add-repository deb http://archive.canonical.com/ $(lsb_release -sc) 
 partner

 deb http://dl.google.com/linux/chrome/deb/ stable main


 and then import the key


 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 16126D3A3E5C1192


 Can this be done in a clever way with puppet?


 Hugs,

 Sandra




  --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/puppet-users/-/lkxkivCib8YJ.
 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.




-- 
Joe Topjian
Systems Administrator
Cybera Inc.

www.cybera.ca

Big data is coming to Canada. Join the welcome wagon.
*Cyber Summit 2012*
October 1-3, Banff
www.cybera.ca/summit2012

Cybera is a not-for-profit organization that works to spur and support
innovation, for the economic benefit of Alberta, through the use
of cyberinfrastructure.

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



[Warning: Phish?] Re: [Puppet Users] Can puppet add repositories to nodes?

2012-09-17 Thread Matt Zagrabelny
On Mon, Sep 17, 2012 at 8:55 AM, Joe Topjian joe.topj...@cybera.ca wrote:
 Hi Sandra,

 The Puppet Apt module should be of some use:

 http://puppetlabs.com/blog/module-of-the-week-puppetlabs-apt-pull-apt-strings-with-puppet/

What I've done is use use file resources and the following apt locations:

/etc/apt/sources.list.d
/etc/apt/trusted.gpg.d

and and exec resource to apt-get update when subscribed to the above files.

Cheers,

-mz


 On Mon, Sep 17, 2012 at 7:51 AM, Sandra Schlichting
 littlesandr...@gmail.com wrote:

 Hi all,

 I would like to add two repositories to Ubuntu nodes

 apt-add-repository deb http://archive.canonical.com/ $(lsb_release -sc)
 partner

 deb http://dl.google.com/linux/chrome/deb/ stable main


 and then import the key


 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 16126D3A3E5C1192


 Can this be done in a clever way with puppet?


 Hugs,

 Sandra




 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/puppet-users/-/lkxkivCib8YJ.
 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.




 --
 Joe Topjian
 Systems Administrator
 Cybera Inc.

 www.cybera.ca

 Big data is coming to Canada. Join the welcome wagon.
 Cyber Summit 2012
 October 1-3, Banff
 www.cybera.ca/summit2012

 Cybera is a not-for-profit organization that works to spur and support
 innovation, for the economic benefit of Alberta, through the use of
 cyberinfrastructure.

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

-- 
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: Do you rely on 'param=undef' being equal to '(nothing)'?

2012-09-17 Thread jcbollinger
I expect param = undef to be an explicit expression of 'param' not being 
specified by the current declaration, or as an override, to express the 
idea of the overridden resource as if 'param' had not been specified.  The 
latter is essential.  The former follows for consistency, because

foobar { 'example':
  param = undef
}

should not express a different resource state than does

Foobar['example'] {
  param = undef
}

Moreover, my gut feeling is that having the undef bind to the actual 
parameter instead of being declaration metasyntax implies a need for users 
to have more knowledge of the details of the definition's (or class's) 
implementation than is reasonable.  Though users may indeed have such 
information in some cases, that still doesn't sit well with me.


John

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/F0rGcYv_GAQJ.
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: Run Stages for Particular Modules

2012-09-17 Thread Alessandro Franceschi
It feels like you're overusing a bit too much run stages...
Read here for usage recommendations (and limitations):
http://docs.puppetlabs.com/puppet/2.7/reference/lang_run_stages.html
You can more easily manage relationships inside a class (all the mysql 
steps can be managed inside the same mysql module) and maybe attributes 
like require or before can result easier to manage than chains, in this 
case.

my2c
al

On Friday, September 14, 2012 4:31:25 PM UTC+2, jbrown wrote:

 Hello,

 I'm new to Puppet, and I'm having some trouble getting run stages to work 
 with one of my modules. The module is quite complicated and involves 
 several operations where order is very important. 
 In short, here are the steps
 1) Install some packages
 2) Create a user and home dir
 3) Install Mysql-server*
 4) Set mysql root pw*
 5) Create databases*
 6) Create db users*
 7) setup grants for db users**
 8) Setup firewall***
 9) Create cron jobs

 * Used puppetlabs-mysql
 ** Used puppetlabs-mysql and exec (for column-specific perms)
 *** Used puppetlabs-firewall

 I originally setup this module to use chaining, but it was tremendously 
 complicated (one huge line). I decided to give run stages a try, and it 
 seems to work, but I think that I'm doing it wrong and need some help.

 Here's the init.pp for the module described above, billing.

 class billing {
   include billing::install, billing::service, billing::config::main, 
 billing::config::dbserver, billing::config::dbs, billing::config::dbinit, 
 billing::config::dbusers, billing::config::dbgrants, billing::config::cron, 
 billing::firewall, billing::firewall::sys, billing::firewall::app, 
 billing::firewall::denial
 }

   class {
 billing::install: stage = install;
 billing::config::main: stage = main;
 billing::config::dbserver: stage = dbserver;
 billing::config::dbs: stage = dbs;
 billing::config::dbinit: stage = dbinit;
 billing::config::dbusers: stage = dbusers;
 billing::config::dbgrants: stage = dbgrants;
 billing::config::cron: stage = cron;
 billing::firewall: stage = fwmain;
 billing::firewall::sys: stage = fwsys;
 billing::firewall::app: stage = fwapp;
 billing::firewall::denial: stage = fwdenial;
 billing::service: stage = service;
   }

   stage { install: before = Stage[main] }
   stage { main: before = Stage[dbserver] }
   stage { dbserver: before = Stage[dbs] }
   stage { dbs: before = Stage[dbinit] }
   stage { dbusers: before = Stage[dbgrants] }
   stage { dbgrants: before = Stage[cron] }
   stage { cron: before = Stage[fwmain] }
   stage { fwmain: before = Stage[fwsys] }
   stage { fwsys: before = Stage[fwapp] }
   stage { fwapp: before = Stage[fwdenial] }
   stage { fwdenial: before = Stage[service] }

   stage { service: after = Stage[fwdenial] }

 Hopefully that gives a good idea of what is happening. The code for all 
 those classes is too much to post here.

 This module is only used on a single node. However, other nodes (that 
 don't include billing) get an error:

 *Could not find stage install specified by Class[Billing::Install] at 
 /etc/puppet/modules/billing/manifests/init.pp:19*

 I'm guessing that is because the class and stage definitions happen 
 outside class billing { ... }. But, it was a syntax error to put them 
 inside.

 What's the recommendation here? Use chains? How do you all deal with 
 modules that have lots of ordered steps?

 Thanks,

 Justin


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/dX9Q0s_MlZ4J.
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: Node collecting its own exported resource

2012-09-17 Thread jcbollinger


On Friday, September 14, 2012 11:51:34 AM UTC-5, Jon McKenzie wrote:

 It seems that nodes are not able to collect their own resource, but they 
 can collect every other resource, with a given tag. I've validated that all 
 of the appropriate resources exist 
 in the storeconfigs database.


Nodes should be able to collect resources they themselves export.  It 
sounds like you have a good, simple failure case, so I recommend you file a 
ticket.


John

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/qXd29c1alFEJ.
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: How to recursively ship files while keeping their modes

2012-09-17 Thread Alessandro Franceschi
Have you tried to add:
   mode = undef,
it might work (not tested).

On Wednesday, September 12, 2012 9:43:58 PM UTC+2, Marc Haber wrote:

 Hi, 

 I have defined a resource like this: 

 file { /etc/foo/conf.d : 
 ensure = directory, 
 recurse = true, 
 purge = true, 
 force = true, 
 owner = root, 
 group = root, 
 source = puppet:///modules/foo/client/etc/foo/conf.d, 
 } 

 This works fine. 

 However the directory contains both snippets that need to be taken 
 verbatim (with mode 644) and executeables that need to be executes and 
 their output taken (with mode 755). It is ok to deliver the 
 executeables, since the code running on the target which builds the 
 actual foo.conf out of the contents of foo/conf.d takes care of this, 
 but it needs the mode for doing so. 

 This mechanism is in use inside a Debian package, and I would like to 
 be of least surprise for the casual user, so I'd like to keep this 
 scheme albeit puppet would be able to generate a monolithic 
 configuration itself. 

 Puppet seems to always reset the access bits for others, so 644 
 mutates to 640 on the target system. I cannot say whether this is 
 deliberate configuration of the people running the puppet master or 
 whether this is a feature of puppet. 

 Is this a feature of puppet? If yes, is there a possibility to have 
 puppet 2.7.18 ship the files with the mode given to them in the 
 modules/foo/client/etc/foo/conf.d directory on the Master? 

 Greetings 
 Marc 

 -- 
 - 

 Marc Haber | I don't trust Computers. They | Mailadresse im 
 Header 
 Mannheim, Germany  |  lose things.Winona Ryder | Fon: *49 621 
 31958061 
 Nordisch by Nature |  How to make an American Quilt | Fax: *49 621 
 31958062 


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/fq8iiTSg3m4J.
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] inheritance failure: duplicate declaration error

2012-09-17 Thread Guillaume Rousse

Hello list.

I've the following parent class:

class munin::client {

...

munin::client::plugin { postfix_mailqueue:
name   = postfix_mailqueue,
enable = false
}
}

And the following inherited class:

class munin::client::plugins::postfix inherits munin::client {

munin::client::plugin { postfix_mailqueue:
name   = postfix_mailqueue,
source = postfix_mailqueue,
enable = true
}

}

munin::client::plugin is a custom type, allowing to easily 
enable/disable munin plugins, according to the following definition:


define munin::client::plugin($name, $source, $enable=true) {

 case $enable {

true: {
file { ${name}_link:
path= $destdir/$name,
ensure  = link,
target  = $sourcedir/$source,
}
}

false: {
file { ${name}_link:
path= $destdir/$name,
ensure  = absent,
}
}
}
}

According to my understanding of how inheritance works, it should allow 
to easily redefine default behaviour in some specific nodes by just 
adding munin::client::plugins::postfix class in addition to 
munin::client, inherited through default node definition. However, it 
fails with the following error message:


err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Duplicate declaration: Munin::Client::Plugin[postfix_mailqueue] is 
already declared in file 
/var/lib/puppet/devrousse/modules/munin/manifests/client.pp at line 135; 
cannot redeclare at 
/var/lib/puppet/devrousse/modules/munin/manifests/client/plugins/postfix.pp:11 
on node dev-zimbra.inria.fr


I originally tought it was the double inclusion of both the base and the 
derivated class that was causing the issue, so I attempted to remove the 
base classe for the default node definition, so as to only include the 
derivated one: same result :(


So, what is the generic design pattern for including default classes in 
default node definition, while still allowing to override them in 
specific nodes ?


--
BOFH excuse #389:

/dev/clue was linked to /dev/null

--
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] storeconfigs: are there any benefits giving a client access to the dabase?

2012-09-17 Thread marco
A coworker and me are currently trying out puppet (2.7).

We enabled storeconfigs on client and server.

The client has been given access to the mysql-db that the puppet-master 
uses for storeconfigs.
The client does not have any manifests on its local disk.
If we run 'puppet agent' on this client, it tells us that it is connecting 
to the database.

With my limited understanding of the puppet workflow, I was thinking this 
database-connection would actually do nothing, but I couldn't find any 
documentation to back this.

Does the puppetmaster compile a catalog _including_ data from the mysql-db 
and push it to the client?
Or does the puppetmaster just tell the client: fetch _this_ from the 
database?

Is there any benefit from giving the client access to the mysql-db on the 
puppet-master?
Am I missing something that is obvious to everybody but me?

Puzzled, Marco

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/UbGf1yhc34QJ.
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.



Re: [Warning: Phish?] Re: [Puppet Users] Can puppet add repositories to nodes?

2012-09-17 Thread Sandra Schlichting
Hi Joe and Matt,

Thanks a lot for both solutions!!

I am actually going to use both as for normal hosts Joe's solution is good, 
and Matt's for LTSP clients =)

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/kagYSfTf51IJ.
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.



Re: [Puppet Users] inheritance failure: duplicate declaration error

2012-09-17 Thread Stephen Gran
Hi,

On Mon, 2012-09-17 at 16:51 +0200, Guillaume Rousse wrote:
 Hello list.
 
 I've the following parent class:
 
 class munin::client {
 
  ...
 
  munin::client::plugin { postfix_mailqueue:
  name   = postfix_mailqueue,
  enable = false
  }
 }
 
 And the following inherited class:
 
 class munin::client::plugins::postfix inherits munin::client {
 
  munin::client::plugin { postfix_mailqueue:
  name   = postfix_mailqueue,
  source = postfix_mailqueue,
  enable = true
  }
 
 }

It looks like you're attempting to redeclare, rather than override, the
plugin definition, as the error tells you.

Try:

Munin::Client::Plugin[postfix_mailqueue] { enable = true }

Cheers,
-- 
Stephen Gran
Senior Systems Integrator - guardian.co.uk

Please consider the environment before printing this email.
--
Visit guardian.co.uk - newspaper of the year

www.guardian.co.ukwww.observer.co.uk www.guardiannews.com 

On your mobile, visit m.guardian.co.uk or download the Guardian
iPhone app www.guardian.co.uk/iphone and iPad edition www.guardian.co.uk/iPad 
 
Save up to 37% by subscribing to the Guardian and Observer - choose the papers 
you want and get full digital access. 
Visit guardian.co.uk/subscribe 

-
This e-mail and all attachments are confidential and may also
be privileged. If you are not the named recipient, please notify
the sender and delete the e-mail and all attachments immediately.
Do not disclose the contents to another person. You may not use
the information for any purpose, or store, or copy, it in any way.
 
Guardian News  Media Limited is not liable for any computer
viruses or other material transmitted with or as part of this
e-mail. You should employ virus checking software.

Guardian News  Media Limited

A member of Guardian Media Group plc
Registered Office
PO Box 68164
Kings Place
90 York Way
London
N1P 2AP

Registered in England Number 908396

-- 
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: Run Stages for Particular Modules

2012-09-17 Thread jcbollinger


On Monday, September 17, 2012 9:31:41 AM UTC-5, Alessandro Franceschi wrote:

 It feels like you're overusing a bit too much run stages...


That's putting it mildly.
 

 Read here for usage recommendations (and limitations):
 http://docs.puppetlabs.com/puppet/2.7/reference/lang_run_stages.html
 You can more easily manage relationships inside a class (all the mysql 
 steps can be managed inside the same mysql module) and maybe attributes 
 like require or before can result easier to manage than chains, in this 
 case.


+1

Indeed, there is nothing you can do with stages that you cannot also 
accomplish with ordinary resource relationships.  Stages basically allow 
you to define a lot of relationships in a simple, compact way, but for 
ordering small numbers or resources that all know about each other they 
cost a lot more than ordinary relationships.


John

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/_mUruEmIk6sJ.
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.



Re: [Puppet Users] inheritance failure: duplicate declaration error

2012-09-17 Thread Guillaume Rousse

Le 17/09/2012 17:08, Stephen Gran a écrit :

It looks like you're attempting to redeclare, rather than override, the
plugin definition, as the error tells you.

Try:

Munin::Client::Plugin[postfix_mailqueue] { enable = true }

Good catch...

Thanks for your help.

--
BOFH excuse #286:

Telecommunications is downgrading.

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



Re: [Puppet Users] Why agent report is so slow?

2012-09-17 Thread Daniel Pittman
The agent builds up an in-memory report no matter what; you can't avoid that.

You could write a null report terminus that responds to save by
simply discarding the data, though.  That would remove the cost of
YAML serialization.

I guess the key question, though, is why you feel you need this?

On Mon, Sep 17, 2012 at 12:14 AM, flex frostyn...@gmail.com wrote:
 Thank you, Daniel.
 Then how can we make puppet not generate the reports? I try to add
 'report=false', but seems no effect.

 On Sat, Sep 15, 2012 at 2:46 AM, Daniel Pittman dan...@puppetlabs.com
 wrote:

 On Fri, Sep 14, 2012 at 3:16 AM, flex frostyn...@gmail.com wrote:
  Thanks, Daniel. We do have some recursive file copies and hundreds of
  other
  resources. So we'd better decrease the resources numbers?

 Well, that would be the only short term path to making report output
 faster - but, in general, if you are managing it you probably need to
 be managing it.  :)

 --
 Daniel Pittman
 ⎋ Puppet Labs Developer – http://puppetlabs.com
 ♲ Made with 100 percent post-consumer electrons

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


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



-- 
Daniel Pittman
⎋ Puppet Labs Developer – http://puppetlabs.com
♲ Made with 100 percent post-consumer electrons

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



Re: [Puppet Users] Complex custom type?

2012-09-17 Thread Nan Liu
On Sun, Sep 16, 2012 at 2:23 PM, Jakov Sosic jso...@srce.hr wrote:
 On 09/16/2012 04:47 PM, Stefan Schulte wrote:

 or the interface property could accept a hash. I have not tried it
 myself but it should work because the puppetlabs f5 type seems to use
 it:

 https://github.com/puppetlabs/puppetlabs-f5#appendix


 Also, if you don't mind to explain it, or to show by example what do you
 mean by 'hash'? ty...

Assuming the following command:
cobbler add system --name=blah \
  --profile=someprofile  \
  --interface=eth0 \
--mac=SOMEMAC \
--interface-type=bond_slave \
--interface-master=bond0 \
  --interface=eth1 \
--mac=SOMEMAC \
--interface-type=bond_slave \
--interface-master=bond0 \
...

The example above maps to the following puppet resource:

cobbler_system { 'bla':
  profile = 'someprofile',
  interface = { 'eth0' = { 'mac' = somemac, 'interface-type' =
bond_slave, ... },
'eth1' = { 'mac' = ... },
  ...
}

To support a hash for the interface attribute, make sure you override
insync?, is_to_s, should_to_s and possibly change_to_s in the resource
type. The f5_pool member attribute should provide an example.

Thanks,

Nan

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



Re: [Puppet Users] storeconfigs: are there any benefits giving a client access to the dabase?

2012-09-17 Thread Nan Liu
On Mon, Sep 17, 2012 at 7:54 AM, marco joedho...@googlemail.com wrote:
 A coworker and me are currently trying out puppet (2.7).

 We enabled storeconfigs on client and server.

 The client has been given access to the mysql-db that the puppet-master uses
 for storeconfigs.
 The client does not have any manifests on its local disk.
 If we run 'puppet agent' on this client, it tells us that it is connecting
 to the database.

Typically, you don't need to enable this on the agent.

 With my limited understanding of the puppet workflow, I was thinking this
 database-connection would actually do nothing, but I couldn't find any
 documentation to back this.

The main reason to enable stored config option is to take advantage of
export/collect resource.

 Does the puppetmaster compile a catalog _including_ data from the mysql-db
 and push it to the client?
 Or does the puppetmaster just tell the client: fetch _this_ from the
 database?

The information flows in both direction, export resource writes
information as the result of the catalog compilation, and collect
resource query the database. Since catalog compilation is normally
puppet master's responsibility, the client have no reason to interact
with the database directly.

 Is there any benefit from giving the client access to the mysql-db on the
 puppet-master?
 Am I missing something that is obvious to everybody but me?

Enabling storeconfigs on the client supports exported/collect resource
via puppet apply, but that is a fairly unusual use case.

Nan

-- 
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] Right approach to Windows installers

2012-09-17 Thread Jason_s
Hi Puppeteers,

I hope I can get you advice about the best way to approach using MSIs and other 
installers on Windows.

Currently I am downloading Windows installers from the puppet master with the 
puppet:// syntax and the file type into a temporary directory c:\puppet_temp 
with subdirectories where necessary. Then after running the installers witht 
the package type, I was hoping to remove them with the tidy type.

Is this the right approach, or should we be planning to host our installers in 
a Windows-based file server and using running the installers with a UNC path? 
Will this be a future feature? 

Assuming the temp directory approach is correct, could I get your advice on the 
most lightweight way to copy the files, since I can't use the checksum none 
setting, and I don't need to check the files are present on each run, I plan to 
remove them after the package is installed correctly.

Sorry for the noob question. Look forward to your responses.

Thanks, Jason

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/noF9F-TV4rgJ.
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] Need more information

2012-09-17 Thread Balasubramaniam Natarajan
On this particular link
http://docs.puppetlabs.com/learning/variables.html#variables  I am a bit
confused about the following two statement.  Could someone explain to me as
to what is this about, with a simple example ?

Every variable has a short local name and a long fully-qualified name.
Fully qualified variables look like $scope::variable. Top scope variables
are the same, but their scope is nameless. (For example:
$::top_scope_variable.)

If you reference a variable with its short name and it isn’t present in the
local scope, Puppet will also check the top
scope;1http://docs.puppetlabs.com/learning/variables.html#fn:dynamicthis
means you can almost always refer to global variables with just their
short names.

-- 
Regards,
Balasubramaniam Natarajan
www.etutorshop.com/moodle/

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



Re: [Puppet Users] Help me name a class in the new puppetdb module!

2012-09-17 Thread Chris Price
That's a fair statement; it's been brought up around the office.  The goal 
for now is to have a single puppetdb module that is capable of managing 
everything related to puppetdb, and then potentially later wrap some subset 
of the puppetdb classes in the puppet/master module.  For the short term, 
I'm just trying to name the class inside of the puppetdb module.

Thanks for the suggestion!

On Saturday, September 15, 2012 7:03:20 AM UTC-7, Ashley Penney wrote:

 I kind of feel like the reason you're having a problem naming this is 
 that it doesn't really belong in the puppetdb class but in the puppet 
 module that sets up the server. :) 

 That's how I did this, I have a puppetdb module that purely sets up 
 puppetdb and then puppet::server::puppetdb to handle that other stuff. 
  Failing that I guess I nominate the name puppetdb::puppetmaster 
 despite the ugliness! 

 On Fri, Sep 14, 2012 at 7:03 PM, Chris Price 
 ch...@puppetlabs.comjavascript: 
 wrote: 
  Anyone interested in helping me name a class in the forthcoming puppetdb 
  module? 
  
  There are 2 major parts to the module... the part that sets up puppetdb 
  itself, and the part that sets up the puppet master to talk to puppetdb. 
  I'm brainstorming names for the latter... a class that you would apply 
 on 
  your puppet master machine to tell it how to find and use puppetdb. 
  
  Any suggestions? 
  
  -- 
  You received this message because you are subscribed to the Google 
 Groups 
  Puppet Users group. 
  To post to this group, send email to 
  puppet...@googlegroups.comjavascript:. 

  To unsubscribe from this group, send email to 
  puppet-users...@googlegroups.com javascript:. 
  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 view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/Q0Hmd1t26l4J.
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.



Re: [Puppet Users] Help me name a class in the new puppetdb module!

2012-09-17 Thread Chris Price
Not a bad idea, thanks for the suggestion!

On Monday, September 17, 2012 2:39:15 AM UTC-7, Stefan Goethals wrote:

 Why not simply puppetdb::server for the ... well, puppetdb server and 
 puppetdb::client for... the client, as that is exactly what the 
 puppetmaster is to puppetdb?

 Regards,

 Stefan.

 On Sat, Sep 15, 2012 at 4:03 PM, Ashley Penney ape...@gmail.comjavascript:
  wrote:

 I kind of feel like the reason you're having a problem naming this is
 that it doesn't really belong in the puppetdb class but in the puppet
 module that sets up the server. :)

 That's how I did this, I have a puppetdb module that purely sets up
 puppetdb and then puppet::server::puppetdb to handle that other stuff.
  Failing that I guess I nominate the name puppetdb::puppetmaster
 despite the ugliness!

 On Fri, Sep 14, 2012 at 7:03 PM, Chris Price 
 ch...@puppetlabs.comjavascript: 
 wrote:
  Anyone interested in helping me name a class in the forthcoming puppetdb
  module?
 
  There are 2 major parts to the module... the part that sets up puppetdb
  itself, and the part that sets up the puppet master to talk to puppetdb.
  I'm brainstorming names for the latter... a class that you would apply 
 on
  your puppet master machine to tell it how to find and use puppetdb.
 
  Any suggestions?
 
  --
  You received this message because you are subscribed to the Google 
 Groups
  Puppet Users group.
  To post to this group, send email to 
  puppet...@googlegroups.comjavascript:
 .
  To unsubscribe from this group, send email to
  puppet-users...@googlegroups.com javascript:.
  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...@googlegroups.comjavascript:
 .
 To unsubscribe from this group, send email to 
 puppet-users...@googlegroups.com javascript:.
 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 view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/uV1NNslhb2EJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: [Puppet-dev] Do you rely on 'param=undef' being equal to '(nothing)'?

2012-09-17 Thread Eric Sorenson
Aaron -- could you distill this down to a code sample? Unless I'm 
misunderstanding, it sounds like your case is slightly different to the 
ones I posted. Thanks.

On Friday, September 14, 2012 3:29:05 PM UTC-7, Aaron Grewell wrote:

 I'm using the current behavior in inherited classes to unset parameters 
 set by the parent class.  If that no longer works it will definitely impact 
 my code. 
 On Sep 14, 2012 11:31 AM, Eric Sorenson 
 eric.s...@puppetlabs.comjavascript: 
 wrote:

 Hi, there's an issue that came up recently in the 3.0RCs -- Big thanks to 
 Erik Dalén for reporting it in #16221 -- that involves a behaviour change 
 to part of the DSL. In a nutshell, this code:

 define foobar ($param='Hello world') {
   notice($param)
 }
 foobar { 'test': param = undef }

 in 2.7, causes 'Hello world' in the notice. In 3.x, it's nothing. As I 
 said in the bug, this seems more correct to me -- I've overriden the 
 default with an explicit 'undef', taking off the default. The same thing 
 goes for invoking parameterised classes with undef arguments, which is 
 perhaps more ambiguous (example from matthaus):

 class toplevel (
$maybe = false,
$optional = undef ) {
if ($maybe) {
   class { toplevel::secondlevel: optional = undef }
}
 }

 In order to make use of the default for the `optional` parameter in 
 toplevel::secondlevel, you'd now need to either test in `toplevel` whether 
 `$optional` was passed into it, or have toplevel::secondlevel use an 
 `$optional_real` value inside it, similar to what's commonly done to append 
 to defaults that are array values.

 The closest thing to documentation around this suggests the new behaviour 
 is what's intended 
 http://docs.puppetlabs.com/puppet/2.7/reference/lang_classes.html#overriding-resource-attributes
 :

 You can remove an attribute’s previous value without setting a new 
 one by overriding it with the special value undef:

   class base::freebsd inherits base::unix {
 File['/etc/passwd'] {
   group = undef,
 }
   }

 So, I'm trying to determine whether this is a widespread pattern or an 
 edge-case. Do you expect 'param=undef' to be the same as not specifying 
 param at all, or for the receiver to see the undef?

 Eric Sorenson - eric.s...@puppetlabs.com javascript:
 PuppetConf'12 - 27-28 Sep in SF - http://bit.ly/pcsig12

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

 

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/KtqHUAhcelcJ.
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.



Re: [Puppet Users] Re: [Puppet-dev] Do you rely on 'param=undef' being equal to '(nothing)'?

2012-09-17 Thread Daniel Pittman
On Mon, Sep 17, 2012 at 11:58 AM, Eric Sorenson
eric.soren...@puppetlabs.com wrote:
 Aaron -- could you distill this down to a code sample? Unless I'm
 misunderstanding, it sounds like your case is slightly different to the ones
 I posted. Thanks.

I recognise the case; this is a different use and, as far as I
understand, shouldn't be changed.

(It is also consistent with how the *new* behaviour of undef vs
parameter defaults works. :)

 On Friday, September 14, 2012 3:29:05 PM UTC-7, Aaron Grewell wrote:

 I'm using the current behavior in inherited classes to unset parameters
 set by the parent class.  If that no longer works it will definitely impact
 my code.

 On Sep 14, 2012 11:31 AM, Eric Sorenson eric.s...@puppetlabs.com
 wrote:

 Hi, there's an issue that came up recently in the 3.0RCs -- Big thanks to
 Erik Dalén for reporting it in #16221 -- that involves a behaviour change to
 part of the DSL. In a nutshell, this code:

 define foobar ($param='Hello world') {
   notice($param)
 }
 foobar { 'test': param = undef }

 in 2.7, causes 'Hello world' in the notice. In 3.x, it's nothing. As I
 said in the bug, this seems more correct to me -- I've overriden the default
 with an explicit 'undef', taking off the default. The same thing goes for
 invoking parameterised classes with undef arguments, which is perhaps more
 ambiguous (example from matthaus):

 class toplevel (
$maybe = false,
$optional = undef ) {
if ($maybe) {
   class { toplevel::secondlevel: optional = undef }
}
 }

 In order to make use of the default for the `optional` parameter in
 toplevel::secondlevel, you'd now need to either test in `toplevel` whether
 `$optional` was passed into it, or have toplevel::secondlevel use an
 `$optional_real` value inside it, similar to what's commonly done to append
 to defaults that are array values.

 The closest thing to documentation around this suggests the new behaviour
 is what's intended
 http://docs.puppetlabs.com/puppet/2.7/reference/lang_classes.html#overriding-resource-attributes:

 You can remove an attribute’s previous value without setting a new
 one by overriding it with the special value undef:

   class base::freebsd inherits base::unix {
 File['/etc/passwd'] {
   group = undef,
 }
   }

 So, I'm trying to determine whether this is a widespread pattern or an
 edge-case. Do you expect 'param=undef' to be the same as not specifying
 param at all, or for the receiver to see the undef?

 Eric Sorenson - eric.s...@puppetlabs.com

 PuppetConf'12 - 27-28 Sep in SF - http://bit.ly/pcsig12

 --
 You received this message because you are subscribed to the Google Groups
 Puppet Developers group.
 To post to this group, send email to puppe...@googlegroups.com.
 To unsubscribe from this group, send email to
 puppet-dev+...@googlegroups.com.

 For more options, visit this group at
 http://groups.google.com/group/puppet-dev?hl=en.

 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/puppet-users/-/KtqHUAhcelcJ.
 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.



-- 
Daniel Pittman
⎋ Puppet Labs Developer – http://puppetlabs.com
♲ Made with 100 percent post-consumer electrons

-- 
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] Need to restart puppetmaster a lot

2012-09-17 Thread Balasubramaniam Natarajan
Hi

When I create a manifest and when it contains some errors which I do not
realize and try to apply it using puppet apply manifest.pp I am getting
no complains and the manifest never get applied.  So I have to pgrep puppet
from another terminal and kill -15 puppetmanifest  After this all the
corrected manifest never gets applied I have to reboot the puppetmaster
machine before it would work.  I tried to restart /etc/init.d/puppetmaster
as well, still no effect, Please let me know what is the fix for this ?

# puppet -V
2.7.11


-- 
Regards,
Balasubramaniam Natarajan
www.etutorshop.com/moodle/

-- 
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] puppet-dashboad fileviewer

2012-09-17 Thread llowder
I recently install dashboard (1.2.10) on my puppet master (2.7.19 on Ubuntu 
10.04 LTS).

I setup the filebucket/viewer as per 
http://docs.puppetlabs.com/dashboard/manual/1.2/configuring.html#enabling-the-filebucket-viewer.

The md5sums are now clickable links, but when I click them I just get a 
screen that says input/output error and in the logs for dashboard I see:

Processing FilesController#show (for 172.16.36.71 at 2012-09-17 14:50:28) 
[GET]
  Parameters: {action=show, controller=files, 
file=86aaee758e9f530be2ba5cc7a3a7d147}
Completed in 1ms (View: 0, DB: 0) | 500 Internal Server Error 
[http:///files/show?file=86aaee758e9f530be2ba5cc7a3a7d147]

My question is, how can I enable debug type logging for dashboard, and 
what, if any, additional steps are needed beyond the linked directions? 
(such as changes to auth.conf or perhaps permissions needed on directories 
in /var/lib/puppet etc).

Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/pxzs0LtWJXkJ.
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.



Re: [Puppet Users] storeconfigs: are there any benefits giving a client access to the dabase?

2012-09-17 Thread marco
Hello Nan,

Am Montag, 17. September 2012 19:26:59 UTC+2 schrieb Nan Liu:

 On Mon, Sep 17, 2012 at 7:54 AM, marco joed...@googlemail.comjavascript: 
 wrote: 
  Does the puppetmaster compile a catalog _including_ data from the 
 mysql-db 
  and push it to the client? 
  Or does the puppetmaster just tell the client: fetch _this_ from the 
  database? 

 The information flows in both direction, export resource writes 
 information as the result of the catalog compilation, and collect 
 resource query the database. Since catalog compilation is normally 
 puppet master's responsibility, the client have no reason to interact 
 with the database directly. 

  Is there any benefit from giving the client access to the mysql-db on 
 the 
  puppet-master? 
  Am I missing something that is obvious to everybody but me? 

 Enabling storeconfigs on the client supports exported/collect resource 
 via puppet apply, but that is a fairly unusual use case.   


Thank you for your reply!

Just to double-check if I understand this correctly:

Enabling the storeconfigs on the client *and* allow it to access the 
mysql-db is *only* useful if
- I distribute my manifest via rsync or git or a puppet file resource.
- and run 'puppet apply somemanifest' by a cronjob on the client?

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/HYLQQt-0D58J.
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: Systems Provisioning

2012-09-17 Thread Glenn Poston
Similar setup here:  pxe boot, etc.  but we keep a pxe booted sparse base image 
available to clone.  And use a script to to do the clone so that we can 
provision more quickly (saves us the pxe boot time).  The script also interacts 
with puppet dashboard to set the machine role.  We can provision a new machine 
in less than 4 minutes.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/ssItzXfne8oJ.
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.



Re: [Puppet Users] storeconfigs: are there any benefits giving a client access to the dabase?

2012-09-17 Thread Nan Liu
On Mon, Sep 17, 2012 at 1:03 PM, marco joedho...@googlemail.com wrote:
 Just to double-check if I understand this correctly:

 Enabling the storeconfigs on the client *and* allow it to access the
 mysql-db is *only* useful if
 - I distribute my manifest via rsync or git or a puppet file resource.
 - and run 'puppet apply somemanifest' by a cronjob on the client?

Yes, and you depend on export/collect resources in the manifests.

Nan

-- 
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: Run Stages for Particular Modules

2012-09-17 Thread Jason_s
Hi I just tried reading the .dot files today into a graphing application and I 
found that very useful in visualising the graph of resources that is produced 
by a run on the agent.

Good luck. It's not procedural, but declarative, hence a visual graph let's a 
person picture it better IMHO.

http://bitfieldconsulting.com/puppet-dependency-graphs

cheers, Jason

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/COG6RdyscvAJ.
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.



Re: [Puppet Users] Re: Run Stages for Particular Modules

2012-09-17 Thread Justin Brown
Thanks for the replies John and Al. I've spent some time re-designing my
module. It's now a few separate modules that use smaller chains and is far
more readable.

Cheers,

Justin

On Mon, Sep 17, 2012 at 10:28 AM, jcbollinger john.bollin...@stjude.orgwrote:



 On Monday, September 17, 2012 9:31:41 AM UTC-5, Alessandro Franceschi
 wrote:

 It feels like you're overusing a bit too much run stages...


 That's putting it mildly.


 Read here for usage recommendations (and limitations):
 http://docs.puppetlabs.com/**puppet/2.7/reference/lang_run_**stages.htmlhttp://docs.puppetlabs.com/puppet/2.7/reference/lang_run_stages.html
 You can more easily manage relationships inside a class (all the mysql
 steps can be managed inside the same mysql module) and maybe attributes
 like require or before can result easier to manage than chains, in this
 case.


 +1

 Indeed, there is nothing you can do with stages that you cannot also
 accomplish with ordinary resource relationships.  Stages basically allow
 you to define a lot of relationships in a simple, compact way, but for
 ordering small numbers or resources that all know about each other they
 cost a lot more than ordinary relationships.


 John

  --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/puppet-users/-/_mUruEmIk6sJ.

 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.


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



Re: [Puppet Users] Why agent report is so slow?

2012-09-17 Thread flex
Sometimes we use puppet agent --test --environment xxx to debug puppet
configuration. The 2 minutes and more execution time is unacceptable. As
agent output is enough, we do not need the report that time. This is why i
want to disable the reports.

On Mon, Sep 17, 2012 at 11:44 PM, Daniel Pittman dan...@puppetlabs.comwrote:

 The agent builds up an in-memory report no matter what; you can't avoid
 that.

 You could write a null report terminus that responds to save by
 simply discarding the data, though.  That would remove the cost of
 YAML serialization.

 I guess the key question, though, is why you feel you need this?

 On Mon, Sep 17, 2012 at 12:14 AM, flex frostyn...@gmail.com wrote:
  Thank you, Daniel.
  Then how can we make puppet not generate the reports? I try to add
  'report=false', but seems no effect.
 
  On Sat, Sep 15, 2012 at 2:46 AM, Daniel Pittman dan...@puppetlabs.com
  wrote:
 
  On Fri, Sep 14, 2012 at 3:16 AM, flex frostyn...@gmail.com wrote:
   Thanks, Daniel. We do have some recursive file copies and hundreds of
   other
   resources. So we'd better decrease the resources numbers?
 
  Well, that would be the only short term path to making report output
  faster - but, in general, if you are managing it you probably need to
  be managing it.  :)
 
  --
  Daniel Pittman
  ⎋ Puppet Labs Developer – http://puppetlabs.com
  ♲ Made with 100 percent post-consumer electrons
 
  --
  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.
 
 
  --
  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.



 --
 Daniel Pittman
 ⎋ Puppet Labs Developer – http://puppetlabs.com
 ♲ Made with 100 percent post-consumer electrons

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



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