Re: [Puppet Users] how to conditionally add users to a virtualized group?

2012-07-16 Thread Felix Frank
John,

On 07/13/2012 06:38 PM, jcbollinger wrote:
 
 I would tell hiera to have puppet include the mysql development class,
 not each single user and group. That would strike me as silly.
 
 
 Sure, but I'm not seeing how that relates.  A more parallel situation
 would be if in addition, some unrelated class wanted to be able to
 determine which users and groups the mysql development class had
 declared.  As Puppet now stands, the best way would be for the mysql
 development class to provide that data in class variables, or else to
 have obtained it from some shared source in the first place.  The point
 is that neither of those options requires that data to be duplicated in
 the structure of the class.

I'm not sure I concur with your conclusion, nor with what you boil the
problem at hand down to.

Puppet *does* have means to implement business logic that adds resources
as implications of roles or aspects, and that is by the singleton nature
of classes. You can add users via implication of different possible
aspects of nodes by having the aspect class include the approprate
user class(es) for example.

Puppet even allows to make adjustments to such implied resources by
means of subclasses. If a node has a very certain role, the respective
class will include a subclass of some other feature to specialize its
resources appropriately.

All this is according to what puppet has so far been designed to do.

The problem at hand can be handled to a degree with these language
features, as the OP has successfully done already. The approach has
scaling issues, so a workaround is currently needed. I don't see why the
approach should be discarded as not currently implemented out of hand,
seeing as the better part of it *is* in fact possible.

Felix

-- 
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] Re: puppet freezes on FUTEX_WAKE_PRIVATE

2012-07-16 Thread Thomas Sturm



 Is this a relativly new issue for you? FUTEX_WAIT reminds me of the leap 
 second kernelbug. If that's the case setting the time will fix the issue. 


 http://serverfault.com/questions/407224/java-process-opends-consumes-all-cpu-futex-flood-how-to-debug-futex
  

 -Stefan 


No, we already noticed this some weeks ago, so I don't think it has to do 
with the leap second bug. The process also doesn't consume much CPU, it 
just waits.

Thomas

-- 
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/-/UrDHHp_teAsJ.
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 freezes on FUTEX_WAKE_PRIVATE

2012-07-16 Thread Ernest Beinrohr
Same here, we have this issue from the beginning (~3m). I am now forced to 
restart the service every hour :(

On Monday, July 16, 2012 9:56:15 AM UTC+2, Thomas Sturm wrote:


 Is this a relativly new issue for you? FUTEX_WAIT reminds me of the leap 
 second kernelbug. If that's the case setting the time will fix the issue. 


 http://serverfault.com/questions/407224/java-process-opends-consumes-all-cpu-futex-flood-how-to-debug-futex
  

 -Stefan 


 No, we already noticed this some weeks ago, so I don't think it has to do 
 with the leap second bug. The process also doesn't consume much CPU, it 
 just waits.

 Thomas


-- 
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/-/5ei7mfBzHW0J.
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: The Puppet Way to handle slow resources? (newbie)

2012-07-16 Thread Dave Anderson
That sounds like a very elegant solution! 
I'm thinking that this pattern could be useful for others, not just me. I'll 
start a separate thread asking for a location to publish and critique recipes.
/d
-- 
This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. 
If you have received this email in error please notify the system manager. 
This message contains confidential information and is intended only for the 
individual named. If you are not the named addressee you should not 
disseminate, distribute or copy this e-mail.

-- 
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/-/10e0e6HN-xsJ.
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] execute a command if a package isn't installed, then install the package

2012-07-16 Thread Martin Alfke
Hi
On 15.07.2012, at 00:30, Peter Bukowinski wrote:

 On Jul 14, 2012, at 5:19 PM, loki77 lok...@gmail.com wrote:
 
 Hi, I'm trying to install the 'unbound' dns resolver in ubuntu via
 puppet and I'm running into some issues.  The issue isn't that the
 package doesn't install, but rather that apt automatically starts the
 daemon - and when the daemon starts, it updates resolv.conf in a way
 that breaks DNS.
 
 There's a command, 'resolvconf --disable-updates' that will stop
 unbound from making the change it wants to.  What I'd like to do is:
 
 - If unbound isn't installed, then execute --disable-updates
 - Then install unbound
 - Then --enable-updates
 
 Is there anyway to do this?  Thanks.
 
 You can either write a custom fact that gets set when unbound is 
 installed/active and use that in an if block around the stop-install-start 
 procedure, or use the 'resolvconf --disable-updates' exec resource's 'unless' 
 parameter to test for a running unbound daemon prior to installing the 
 package.


You can use require and notify within the package resource to run exec 
statements.

e.g. (untested)

exec { 'disable':
command = '/path/to/resolvconf --disable-updates',
onlyif = 'dpkg -l | grep -c unbound | wc -l',
}
exec { 'enable':
command = '/path/tp/resolvconf --enable-updates',
unless = 'dpkg -l | grep -c unbound | wc -l',
}
package { 'unbound':
requires = Exec['disable'],
notify = Exec['enable'],
}

- Martin

-- 
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 gets stuck + CRON

2012-07-16 Thread pierre-emmanuel degand
Hi,

I use Cron to avoid puppet to get stuck with this command : /bin/echo  | 
/bin/nc localhost 8139
But I get this error : /USR/SBIN/CRON[11065]: (CRON) error (grandchild 
#11068 failed with exit status 1)

At the beginning, i launched : echo  | nc localhost 8139, but I read that 
we have to put the path with the lastest cron version. 

sudo uname -a
Linux #.com 2.6.38.2-grsec--grs-ipv6-64 #2 SMP Thu Aug 25 
16:40:22 UTC 2011 x86_64 GNU/Linux

If someone get an idea :)

-- 
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/-/WQszVVuu7BYJ.
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] empty() function in stdlib not functional?

2012-07-16 Thread Dave Lloyd
I'm using the empty function to test whether an array passed to my
defined type is empty (it's a function to set up network interfaces
and their routes if passed an array of routes). Unfortunately, I get
this error when trying to use the empty() function:


err: Could not retrieve catalog from remote server: Error 400 on
SERVER: Function 'empty' does not return a value at /etc/puppet/
modules/netif/manifests/init.pp:78 on node [REDACTED]t
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run

Relevant code snippet is here:


define netif::interface ( $ifaddr = , $slaves = [] , $onboot =
yes, $onparent = yes , $mtu =  , $routes = undef)
{

# switch on interface name
case $name {
# catch alias first since it might match other stuff
/^.*:.*$/ : {
netif::alias { $name :
ifaddr = $ifaddr ,
}
}
# regular ethernet interface.
/^eth\d+$/ : {
netif::eth { $name :
ifaddr = $ifaddr ,
}
}
# vlan ethernet interface.
/^eth\d+\.\d+$/ : {
netif::eth_vlan { $name :
ifaddr = $ifaddr ,
}
}
# regular ib interface.
/^ib\d+$/ : {
netif::ib { $name :
ifaddr = $ifaddr ,
}
}
# partitioned ib interface.
/^ib\d+\.\d+$/ : {
netif::ib_pkey { $name :
ifaddr = $ifaddr ,
}
}
# bridge interface
/^br\d+$/ : {
netif::br { $name :
ifaddr = $ifaddr ,
slaves = $slaves ,
}
}
# tap interface
/^tap\d+$/ : {
netif::tap { $name :
ifaddr = $ifaddr ,
}
}

# default case do nothing
default : { notify {netif: interface type ${name} not
found.:} }
}

# make route file
if !empty($routes) {
netif::route { $name :
routes = $routes
}
}

-- 
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 configuration/startup problems

2012-07-16 Thread Yuri Medvinsky
Hi 

Has anyone seen this error message type before and know how to resolve it? 
I came across this message when trying to access puppet over its web 
interface. And when I try to run 'rake db:migrate' I get the following:

# rake db:migrate
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, 
Rakefile.rb)
/opt/puppet/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2376:in 
`raw_load_rakefile'
(See full trace by running task with --trace)

# rake db:migrate --trace
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, 
Rakefile.rb)
/opt/puppet/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2376:in 
`raw_load_rakefile'
/opt/puppet/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2016:in 
`load_rakefile'
/opt/puppet/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2067:in 
`standard_exception_handling'
/opt/puppet/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2015:in 
`load_rakefile'
/opt/puppet/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1999:in `run'
/opt/puppet/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2067:in 
`standard_exception_handling'
/opt/puppet/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1997:in `run'
/opt/puppet/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/opt/puppet/bin/rake:19:in `load'
/opt/puppet/bin/rake:19



---
Ruby on Rails application could not be started The application has exited 
during startup (i.e. during the evaluation of config/environment.rb). The 
error message can be found below. To solve this problem, please follow any 
instructions in the error message. Error message:Database isn't the current 
migration version: expected 20120112195235, got 0 You must either run 'rake 
db:migrate' or set environmental variable NO_MIGRATION_CHECK Application 
root: /opt/puppet/share/puppet-dashboard Backtrace:  # File Line Location  0 
/opt/puppet/share/puppet-dashboard/config/initializers/check_migration_version.rb
 
13 in `abort'  1 
/opt/puppet/share/puppet-dashboard/config/initializers/check_migration_version.rb
 
13 
 2 
/opt/puppet/share/puppet-dashboard/vendor/rails/activesupport/lib/active_support/dependencies.rb
 
173 in `load_without_new_constant_marking'  3 
/opt/puppet/share/puppet-dashboard/vendor/rails/activesupport/lib/active_support/dependencies.rb
 
173 in `load'  4 
/opt/puppet/share/puppet-dashboard/vendor/rails/railties/lib/initializer.rb 
622 in `load_application_initializers'  5 
/opt/puppet/share/puppet-dashboard/vendor/rails/railties/lib/initializer.rb 
621 in `each'  6 
/opt/puppet/share/puppet-dashboard/vendor/rails/railties/lib/initializer.rb 
621 in `load_application_initializers'  7 
/opt/puppet/share/puppet-dashboard/vendor/rails/railties/lib/initializer.rb 
176 in `process'  8 
/opt/puppet/share/puppet-dashboard/vendor/rails/railties/lib/initializer.rb 
113 in `send'  9 
/opt/puppet/share/puppet-dashboard/vendor/rails/railties/lib/initializer.rb 
113 in `run'  10 /opt/puppet/share/puppet-dashboard/config/environment.rb 14 
 11 /opt/puppet/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb 31 in 
`gem_original_require'  12 
/opt/puppet/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb 31 in 
`require'  13 
/opt/puppet/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb 303 in 
`preload_application'  14 
/opt/puppet/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb 252 in 
`initialize_server'  15 /opt/puppet/lib/ruby/1.8/phusion_passenger/utils.rb 
255 in `report_app_init_status'  16 
/opt/puppet/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb 237 in 
`initialize_server'  17 
/opt/puppet/lib/ruby/1.8/phusion_passenger/abstract_server.rb 194 in 
`start_synchronously'  18 
/opt/puppet/lib/ruby/1.8/phusion_passenger/abstract_server.rb 163 in `start'  
19 /opt/puppet/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb 
213 in `start'  20 
/opt/puppet/lib/ruby/1.8/phusion_passenger/spawn_manager.rb 262 in 
`spawn_rails_application'  21 
/opt/puppet/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb 126 in 
`lookup_or_add'  22 
/opt/puppet/lib/ruby/1.8/phusion_passenger/spawn_manager.rb 256 in 
`spawn_rails_application'  23 
/opt/puppet/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb 80 in 
`synchronize'  24 
/opt/puppet/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb 79 in 
`synchronize'  25 
/opt/puppet/lib/ruby/1.8/phusion_passenger/spawn_manager.rb 255 in 
`spawn_rails_application'  26 
/opt/puppet/lib/ruby/1.8/phusion_passenger/spawn_manager.rb 154 in 
`spawn_application'  27 
/opt/puppet/lib/ruby/1.8/phusion_passenger/spawn_manager.rb 287 in 
`handle_spawn_application'  28 
/opt/puppet/lib/ruby/1.8/phusion_passenger/abstract_server.rb 352 in 
`__send__'  29 /opt/puppet/lib/ruby/1.8/phusion_passenger/abstract_server.rb 
352 in `main_loop'  30 
/opt/puppet/lib/ruby/1.8/phusion_passenger/abstract_server.rb 196 in 
`start_synchronously'  31 

[Puppet Users] Run the nodes in an orderly

2012-07-16 Thread Emmanuel Odorisio
Hi, 
I would like to run the nodes in order.
If I have in my site.pp:

node 'node1' {
   include class1
}

node 'node2' {
   include class2
}

The node2 must run when the node1 is complete (Finished catalog run)
Is there any way to do this with puppet?

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/-/imGaTBzj5QoJ.
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] How can I list classes available on the puppet master?

2012-07-16 Thread Kamil Winczek
On 12 Jul 12 08:54 -0700, llow...@oreillyauto.com wrote:
   Is there a way to get a list of all the classes available from the puppet
   master?
   I have 2 goals for this - one is documentation in a human readable form,
   and the other is potentially importing that data into dashboard.

Hi,

How about simple:

find . -name '*.pp' -exec awk '/^class [a-zA-Z]/ {print $2}' {} \;

?
-- 
Kamil Winczek, Gentoo Linux user, post no: 1443
GG:888677, M:kamil[at]winczek.com, JID:crs[at]jabster.pl
For a list of all the ways technology has failed to improve
the quality of life, please press three. - Alice Kahn

-- 
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] Run the nodes in an orderly

2012-07-16 Thread Stephen Gran
Hello,

On Fri, 2012-07-13 at 12:16 -0700, Emmanuel Odorisio wrote:
 Hi, 
 I would like to run the nodes in order.
 If I have in my site.pp:
 
 node 'node1' {
include class1
 }
 
 node 'node2' {
include class2
 }
 
 
 The node2 must run when the node1 is complete (Finished catalog run)
 Is there any way to do this with puppet?

The master (which is where catalogue compilation takes place) has no
control over when the nodes check in in most arrangements.  I suspect
you'll have to do something yourself here.

I might ask, though, why do you need this strict ordering?  That's
usually a sign that you have created a not very fault tolerant design.

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
 
To save up to 30% when you subscribe to the Guardian and the Observer
visit www.guardian.co.uk/subscriber 
-
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: How to take away install privilege from users other than puppet?

2012-07-16 Thread jcbollinger


On Sunday, July 15, 2012 3:05:36 AM UTC-5, Ryan Bowlby wrote:

 That's not really a puppet question. Typically installation of software in 
 normal (posix compliant) locations requires root privileges. Merely 
 limiting the commands one is capable of executing via sudo would likely be 
 enough.


Supposing that users have sudo in the first place, though that's not 
uncommon.

Note also, however, that that only applies to installing software in system 
locations.  If users can write to their own home directories then it's 
pretty darn hard to prevent them from installing software there.


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/-/kK0D95fKgGwJ.
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 configuration/startup problems

2012-07-16 Thread Yuri Medvinsky
Looks like I figured out what was wrong. The mysqld was not running. Once 
it was started up this message went away.

On Friday, July 13, 2012 3:03:02 PM UTC-4, Yuri Medvinsky wrote:

 Hi 

 Has anyone seen this error message type before and know how to resolve it? 
 I came across this message when trying to access puppet over its web 
 interface. And when I try to run 'rake db:migrate' I get the following:

 # rake db:migrate
 rake aborted!
 No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, 
 Rakefile.rb)
 /opt/puppet/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2376:in 
 `raw_load_rakefile'
 (See full trace by running task with --trace)

 # rake db:migrate --trace
 rake aborted!
 No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, 
 Rakefile.rb)
 /opt/puppet/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2376:in 
 `raw_load_rakefile'
 /opt/puppet/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2016:in 
 `load_rakefile'
 /opt/puppet/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2067:in 
 `standard_exception_handling'
 /opt/puppet/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2015:in 
 `load_rakefile'
 /opt/puppet/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1999:in `run'
 /opt/puppet/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2067:in 
 `standard_exception_handling'
 /opt/puppet/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1997:in `run'
 /opt/puppet/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
 /opt/puppet/bin/rake:19:in `load'
 /opt/puppet/bin/rake:19




 ---
 Ruby on Rails application could not be started The application has exited 
 during startup (i.e. during the evaluation of config/environment.rb). The 
 error message can be found below. To solve this problem, please follow any 
 instructions in the error message. Error message:Database isn't the 
 current migration version: expected 20120112195235, got 0 You must either 
 run 'rake db:migrate' or set environmental variable NO_MIGRATION_CHECK 
 Application 
 root: /opt/puppet/share/puppet-dashboard Backtrace:  # File Line Location  
 0 
 /opt/puppet/share/puppet-dashboard/config/initializers/check_migration_version.rb
  
 13 in `abort'  1 
 /opt/puppet/share/puppet-dashboard/config/initializers/check_migration_version.rb
  
 13 
  2 
 /opt/puppet/share/puppet-dashboard/vendor/rails/activesupport/lib/active_support/dependencies.rb
  
 173 in `load_without_new_constant_marking'  3 
 /opt/puppet/share/puppet-dashboard/vendor/rails/activesupport/lib/active_support/dependencies.rb
  
 173 in `load'  4 
 /opt/puppet/share/puppet-dashboard/vendor/rails/railties/lib/initializer.rb 
 622 in `load_application_initializers'  5 
 /opt/puppet/share/puppet-dashboard/vendor/rails/railties/lib/initializer.rb 
 621 in `each'  6 
 /opt/puppet/share/puppet-dashboard/vendor/rails/railties/lib/initializer.rb 
 621 in `load_application_initializers'  7 
 /opt/puppet/share/puppet-dashboard/vendor/rails/railties/lib/initializer.rb 
 176 in `process'  8 
 /opt/puppet/share/puppet-dashboard/vendor/rails/railties/lib/initializer.rb 
 113 in `send'  9 
 /opt/puppet/share/puppet-dashboard/vendor/rails/railties/lib/initializer.rb 
 113 in `run'  10 /opt/puppet/share/puppet-dashboard/config/environment.rb 
 14 
  11 /opt/puppet/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb 31 in 
 `gem_original_require'  12 
 /opt/puppet/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb 31 in 
 `require'  13 
 /opt/puppet/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb 
 303 in `preload_application'  14 
 /opt/puppet/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb 
 252 in `initialize_server'  15 
 /opt/puppet/lib/ruby/1.8/phusion_passenger/utils.rb 255 in 
 `report_app_init_status'  16 
 /opt/puppet/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb 
 237 in `initialize_server'  17 
 /opt/puppet/lib/ruby/1.8/phusion_passenger/abstract_server.rb 194 in 
 `start_synchronously'  18 
 /opt/puppet/lib/ruby/1.8/phusion_passenger/abstract_server.rb 163 in 
 `start'  19 
 /opt/puppet/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb 
 213 in `start'  20 
 /opt/puppet/lib/ruby/1.8/phusion_passenger/spawn_manager.rb 262 in 
 `spawn_rails_application'  21 
 /opt/puppet/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb 
 126 in `lookup_or_add'  22 
 /opt/puppet/lib/ruby/1.8/phusion_passenger/spawn_manager.rb 256 in 
 `spawn_rails_application'  23 
 /opt/puppet/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb 
 80 in `synchronize'  24 
 /opt/puppet/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb 
 79 in `synchronize'  25 
 /opt/puppet/lib/ruby/1.8/phusion_passenger/spawn_manager.rb 255 in 
 `spawn_rails_application'  26 
 /opt/puppet/lib/ruby/1.8/phusion_passenger/spawn_manager.rb 154 in 
 `spawn_application'  27 
 /opt/puppet/lib/ruby/1.8/phusion_passenger/spawn_manager.rb 287 in 
 `handle_spawn_application'  28 
 

[Puppet Users] Hierachy for facts?

2012-07-16 Thread ZJE
We're working on prototpying facter+puppet for our environment and 
wondering what the generally accepted best-pratices are for handling 
hierarchical custom facts in facter.  Right now, we're using underscores. 


For example, if I'm collecting infromation about the raid array, it would 
be something like this:
---
custom_hw_localstorage_ctrl_0_array_0_raid = 1
custom_hw_localstorage_ctrl_0_array_1_raid = 5
---

Where the implied hierachy is something like:
custom
  hw
localstorage
  ctrl
0: array
0: raid = 1
1: raid = 5

And of course, there would be many, many more sub-items under custom, 
hw, localstorage, etc...

I'm using the facter 2 and puppet 3 RCs and I know they have hiera 
included, but I'm not sure if or how that could help with this. Ultimately, 
I'd like to be able to use these facts for decision making in puppet. 

Thanks!

-- 
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/-/9Zy_zeh12owJ.
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] how to conditionally add users to a virtualized group?

2012-07-16 Thread jcbollinger
Felix,

On Monday, July 16, 2012 2:44:58 AM UTC-5, Felix.Frank wrote:

 John, 

 On 07/13/2012 06:38 PM, jcbollinger wrote: 
  
  I would tell hiera to have puppet include the mysql development 
 class, 
  not each single user and group. That would strike me as silly. 
  
  
  Sure, but I'm not seeing how that relates.  A more parallel situation 
  would be if in addition, some unrelated class wanted to be able to 
  determine which users and groups the mysql development class had 
  declared.  As Puppet now stands, the best way would be for the mysql 
  development class to provide that data in class variables, or else to 
  have obtained it from some shared source in the first place.  The point 
  is that neither of those options requires that data to be duplicated in 
  the structure of the class. 

 I'm not sure I concur with your conclusion, nor with what you boil the 
 problem at hand down to. 


I didn't define the problem, Jo did.  He defined at least two different 
problems, in fact, so perhaps that's where you and I have gotten out of 
sync.  The first problem was to build the value of a resource property 
based on declarations in multiple unrelated classes.  Jo then went on to 
object to some proposed alternative solutions on the basis that they 
introduced duplication of data already implicit in his class and resource 
declarations, making avoiding such duplication the second problem.
 


 Puppet *does* have means to implement business logic that adds resources 
 as implications of roles or aspects, and that is by the singleton nature 
 of classes. You can add users via implication of different possible 
 aspects of nodes by having the aspect class include the approprate 
 user class(es) for example. 

 Puppet even allows to make adjustments to such implied resources by 
 means of subclasses. If a node has a very certain role, the respective 
 class will include a subclass of some other feature to specialize its 
 resources appropriately. 

 All this is according to what puppet has so far been designed to do. 

 The problem at hand can be handled to a degree with these language 
 features, as the OP has successfully done already. The approach has 
 scaling issues, so a workaround is currently needed. I don't see why the 
 approach should be discarded as not currently implemented out of hand, 
 seeing as the better part of it *is* in fact possible.


The fact that the approach doesn't work isn't sufficient?  Until now, my 
focus has been on something that Jo could actually use, rather than on 
advocacy for new Puppet features.  If you have a good way to make that 
approach work for Jo, with current Puppet, then I would be genuinely 
interested in hearing it.  I suppose Jo would be even more so.

I'm not suggesting that Puppet shouldn't have a feature that allowed Jo to 
do what he wants, approximately how he wants, without parse-order 
dependencies or other serious drawbacks.  I would love it if there were 
such a feature.  In fact, I think it would serve a lot of people well, and 
allow clearer, simpler manifests.

That feature isn't available today, as far as I know, but I have an idea 
how it might look.  In fact, I had it about six months ago.  Remember 
resource constraints 
(https://groups.google.com/forum/?fromgroups#!topic/puppet-users/Fvl0aOe4RPE)?  
The idea arose as an approach to cross-module dependencies, but it would 
address this problem as well.  In fact, this problem is pretty similar to a 
cross-module dependency issue, and might even be one.


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/-/2A8pqYpNEeoJ.
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] stdlib empty() function not working?

2012-07-16 Thread Dave Lloyd
Running 2.7.14 both on the client and server.

I've created a defined type for managing network interface IPs and static
routes. The routes are passed in as an array of hashes. I used the empty()
function to see if the array is empty before attempting to call another
defined type to write out the files for managing static routes. Whenever I
try to apply this on the client, I receive the following error:

err: Could not retrieve catalog from remote server: Error 400 on SERVER:
Function 'empty' does not return a value at
/etc/puppet/modules/netif/manifests/init.pp:78 on node [REDACTED]
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run

The same error appears on the server.

Relevant code is below:

define netif::interface ( $ifaddr = , $slaves = [] , $onboot = yes,
$onparent = yes , $mtu =  , $routes = undef)
{
# switch on interface name
case $name {
# catch alias first since it might match other stuff
/^.*:.*$/ : {
netif::alias { $name :
ifaddr = $ifaddr ,
}
}
# regular ethernet interface.
/^eth\d+$/ : {
netif::eth { $name :
ifaddr = $ifaddr ,
}
}
# vlan ethernet interface.
/^eth\d+\.\d+$/ : {
netif::eth_vlan { $name :
ifaddr = $ifaddr ,
}
}
# regular ib interface.
/^ib\d+$/ : {
netif::ib { $name :
ifaddr = $ifaddr ,
}
}
# partitioned ib interface.
/^ib\d+\.\d+$/ : {
netif::ib_pkey { $name :
ifaddr = $ifaddr ,
}
}
# bridge interface
/^br\d+$/ : {
netif::br { $name :
ifaddr = $ifaddr ,
slaves = $slaves ,
}
}
# tap interface
/^tap\d+$/ : {
netif::tap { $name :
ifaddr = $ifaddr ,
}
}

# default case do nothing
default : { notify {netif: interface type ${name} not found.:} }
}

# make route file
if !empty($routes) {
netif::route { $name :
routes = $routes
}
}
}

--dlloyd

-- 
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] Can't create pdf from puppet doc

2012-07-16 Thread Giovanni Torres
I'm trying to use puppet doc to create a pdf version of my modules. 
 According to the help file, `puppet doc -m pdf -r configuration` is the 
syntax to accomplish this.  However, I keep getting this error:

creating pdf
Could not run: wrong number of arguments (1 for 2)

I search elsewhere on the web for others having a similar issue with pdf 
generation, but no real luck finding a solution.

I am running CentOS 6 with
ruby-1.8.7
puppet-server-2.7.18

Is this a bug?  I did not find a bug describing this issue in the Issues 
section of the Puppet website.

Is there a --verbose or --debug that I could use with `puppet doc`?

-- 
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/-/gNuAnlKWRY4J.
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: system users caching

2012-07-16 Thread jcbollinger


On Sunday, July 15, 2012 4:01:13 PM UTC-5, Thomas Bétrancourt wrote:

 Hi!

 On my servers, i'm using pam-ldap and cie.

 All the configuration of the system is done by puppet.

 After to the system installation, when i run puppet, in a first time, 
 puppet sets up the ldap configuration and after, the services installation 
 and configuration.

 While setting up of one of these services, puppet doesn't find a user 
 which is provided by LDAP. When i launch again puppet, the user is found.


When you say puppet doesn't find, do you mean that in the context of a 
User resource, or do you simply mean that the user is not visible on the 
system?
 


 I think that puppet stores in it's cache the list of the users of the 
 system, but when ldap is up, puppet doesn't reload it's cache to find new 
 users.


If you mean that the *system* doesn't see your LDAP user then that's not 
inherently a Puppet problem.  It could be a problem with a caching service 
provided by the system, such as nscd.  Alternatively, it may be that 
resources are not being applied in the order you expect.  Unless you 
declare ordering relationships between resources, you cannot predict the 
relative order in which they will be applied.  The log will show the order 
in which resources are actually applied.

On the other hand, if you mean that Puppet itself doesn't recognize a User 
resource present in LDAP then you have probably analyzed the situation 
correctly.  It is a common pattern for the providers of Puppet resource 
types to pre-load all existing instances of the resource type they manage.  
I have not checked, but it would expect the User providers to be among 
those.
 


 It's there a way to do this ?


Maybe.  If your problem is of the first type, then defining appropriate 
relationships among your resources will probably take care of it pretty 
easily.

If your problem is of the second type, then you may be able to resolve it 
by setting up relationships that cause LDAP to be set up before *any* User 
resource is synced.  For example, if you have a class ldap::config that 
ensures the system is correctly configured for LDAP access, then you could 
make this this declaration be parsed after all User resources have been 
declared:

Class['ldap::config'] - User| |

Do note that that particular declaration will, I think, also realize all 
virtual User resources, so it's probably more useful for testing than for 
production.

On the other hand, if you are hoping for Puppet to use the ldap User 
provider to manage an LDAP user, then you may be out of luck.  Puppet 
determines very early which providers are applicable to the target node, 
based mostly on node facts and available system binaries.  It is a 
well-known Puppet limitation that you cannot use a provider in the same 
Puppet run that installs its dependencies.  If you want Puppet to be able 
to use the ldap User provider on its first run, then you need to ensure 
at least that the client software is installed during the initial 
provisioning.


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/-/pWdvzP5kXW4J.
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: Can't create pdf from puppet doc

2012-07-16 Thread llow...@oreillyauto.com


On Monday, July 16, 2012 9:50:54 AM UTC-5, Giovanni Torres wrote:

 I'm trying to use puppet doc to create a pdf version of my modules. 
  According to the help file, `puppet doc -m pdf -r configuration` is the 
 syntax to accomplish this.  However, I keep getting this error:

 creating pdf
 Could not run: wrong number of arguments (1 for 2)


I've been having this same problem, and have previously asked for help on 
this list to no avail.

If you do find a solution, please share, as it would be much appreciated.
 

 I search elsewhere on the web for others having a similar issue with pdf 
 generation, but no real luck finding a solution.

 I am running CentOS 6 with
 ruby-1.8.7
 puppet-server-2.7.18

 Is this a bug?  I did not find a bug describing this issue in the Issues 
 section of the Puppet website.

 Is there a --verbose or --debug that I could use with `puppet doc`?



-- 
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/-/j8NqA9jMO_UJ.
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] how to conditionally add users to a virtualized group?

2012-07-16 Thread Felix Frank
On 07/16/2012 04:14 PM, jcbollinger wrote:
 The fact that the approach doesn't work isn't sufficient?  Until now, my
 focus has been on something that Jo could actually use, rather than on
 advocacy for new Puppet features.  If you have a good way to make that
 approach work for Jo, with current Puppet, then I would be genuinely
 interested in hearing it.  I suppose Jo would be even more so.

I cannot, of course, but I do sympathize with Jo's notion that in order
to solve the apparently small problem of making resource overrides
scale, he is now required to rework most if not all of his manifests to
play with a hiera based approach.
I'm not saying there is a simpler solution right now. And we've already
agreed there should be:

 I'm not suggesting that Puppet shouldn't have a feature that allowed Jo
 to do what he wants, approximately how he wants, without parse-order
 dependencies or other serious drawbacks.  I would love it if there were
 such a feature.  In fact, I think it would serve a lot of people well,
 and allow clearer, simpler manifests.
 
 That feature isn't available today, as far as I know, but I have an idea
 how it might look.  In fact, I had it about six months ago.  Remember
 resource constraints
 (https://groups.google.com/forum/?fromgroups#!topic/puppet-users/Fvl0aOe4RPE)?
  
 The idea arose as an approach to cross-module dependencies, but it would
 address this problem as well.  In fact, this problem is pretty similar
 to a cross-module dependency issue, and might even be one.

I do. Sometimes even wondered if that made it to some pin-board down at
puppetlabs ;-)

But I'm not sure they're the best solution for the problem at hand. My
understanding is that you would have each class declare constraints on
given users' group memberships, e.g. user jo needs to be in the devs group.
The only real advantage I see here is that, yes, you can make the
compilation fail if your hiera data is not consistent with your business
logic. That doesn't really simplify the way to get to the desired catalog.

Am I missing a wholly different implied intention of your's here?

Cheers,
Felix

-- 
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] stdlib empty() function not working?

2012-07-16 Thread Nan Liu
On Mon, Jul 16, 2012 at 7:46 AM, Dave Lloyd d...@davelloyd.com wrote:
 Running 2.7.14 both on the client and server.

 I've created a defined type for managing network interface IPs and static
 routes. The routes are passed in as an array of hashes. I used the empty()
 function to see if the array is empty before attempting to call another
 defined type to write out the files for managing static routes. Whenever I
 try to apply this on the client, I receive the following error:

 err: Could not retrieve catalog from remote server: Error 400 on SERVER:
 Function 'empty' does not return a value at
 /etc/puppet/modules/netif/manifests/init.pp:78 on node [REDACTED]
 warning: Not using cache on failed catalog
 err: Could not retrieve catalog; skipping run

empty() should be an rvalue function. In this case posting the empty()
function would be more helpful than the puppet 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.



Re: [Puppet Users] Re: system users caching

2012-07-16 Thread Nan Liu
On Mon, Jul 16, 2012 at 7:53 AM, jcbollinger john.bollin...@stjude.org wrote:


 On Sunday, July 15, 2012 4:01:13 PM UTC-5, Thomas Bétrancourt wrote:

 Hi!

 On my servers, i'm using pam-ldap and cie.

 All the configuration of the system is done by puppet.

 After to the system installation, when i run puppet, in a first time,
 puppet sets up the ldap configuration and after, the services installation
 and configuration.

 While setting up of one of these services, puppet doesn't find a user
 which is provided by LDAP. When i launch again puppet, the user is found.


 When you say puppet doesn't find, do you mean that in the context of a
 User resource, or do you simply mean that the user is not visible on the
 system?



 I think that puppet stores in it's cache the list of the users of the
 system, but when ldap is up, puppet doesn't reload it's cache to find new
 users.


 If you mean that the system doesn't see your LDAP user then that's not
 inherently a Puppet problem.  It could be a problem with a caching service
 provided by the system, such as nscd.  Alternatively, it may be that
 resources are not being applied in the order you expect.  Unless you declare
 ordering relationships between resources, you cannot predict the relative
 order in which they will be applied.  The log will show the order in which
 resources are actually applied.

 On the other hand, if you mean that Puppet itself doesn't recognize a User
 resource present in LDAP then you have probably analyzed the situation
 correctly.  It is a common pattern for the providers of Puppet resource
 types to pre-load all existing instances of the resource type they manage.
 I have not checked, but it would expect the User providers to be among
 those.



 It's there a way to do this ?


 Maybe.  If your problem is of the first type, then defining appropriate
 relationships among your resources will probably take care of it pretty
 easily.

 If your problem is of the second type, then you may be able to resolve it by
 setting up relationships that cause LDAP to be set up before any User
 resource is synced.  For example, if you have a class ldap::config that
 ensures the system is correctly configured for LDAP access, then you could
 make this this declaration be parsed after all User resources have been
 declared:

 Class['ldap::config'] - User| |

 Do note that that particular declaration will, I think, also realize all
 virtual User resources, so it's probably more useful for testing than for
 production.

 On the other hand, if you are hoping for Puppet to use the ldap User
 provider to manage an LDAP user, then you may be out of luck.  Puppet
 determines very early which providers are applicable to the target node,
 based mostly on node facts and available system binaries.  It is a
 well-known Puppet limitation that you cannot use a provider in the same
 Puppet run that installs its dependencies.  If you want Puppet to be able to
 use the ldap User provider on its first run, then you need to ensure at
 least that the client software is installed during the initial provisioning.

This last issue is something that should have been fixed in 2.7.8. In
the past providers had to be modified as optional_command, but
this is no longer necessary. Resource order still matters, but we are
able to install mysql and manage mysql database using a type and
provider in the same run as an example. For more details, see:
http://projects.puppetlabs.com/issues/6907.

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] problems with puppetdb

2012-07-16 Thread Deepak Giridharagopal
On Sun, Jul 15, 2012 at 7:42 PM, Peter Brown rendhal...@gmail.com wrote:

 Hi everyone,

 I got the new version installed and am now having a strange issue.
 my puppetdb server seems to start but then dies after a few seconds
 with no logging that i can find.
 I tried setting the log level to DEBUG but still nothing.

 I tried running by hand and discovered it couldn't read it's config
 files so i fixed that.
 It also wants write access to /usr/share/puppetdb
 This seems like strange place it would need write access to.
 Is the really necessary?
 It is also ringing security bells in my head so I am a bit hesitant to
 give it write access without knowing why.

 My puppetdb is running on latest ubuntu with latest openjdk 6


I've created ticket http://projects.puppetlabs.com/issues/15536 to track
this; we'll take a look at that this iteration. Would you mind adding
yourself as a watcher on that ticket?

Thanks for the report!

deepak

--
Deepak Giridharagopal / Puppet Labs / grim_radical

-- 
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] stdlib empty() function not working?

2012-07-16 Thread Dave Lloyd
On Mon, Jul 16, 2012 at 10:56 AM, Nan Liu n...@puppetlabs.com wrote:



 empty() should be an rvalue function. In this case posting the empty()
 function would be more helpful than the puppet manifests.

 Nan


It's the standard one shipped with stdlib:

modules/stdlib/lib/puppet/parser/functions/empty.rb
#
# empty.rb
#

module Puppet::Parser::Functions
  newfunction(:empty, :type = :rvalue, :doc = -EOS
Returns true if the variable is empty.
EOS
  ) do |arguments|

raise(Puppet::ParseError, empty(): Wrong number of arguments  +
  given (#{arguments.size} for 1)) if arguments.size  1

value = arguments[0]
klass = value.class

unless [Array, Hash, String].include?(klass)
  raise(Puppet::ParseError, 'empty(): Requires either ' +
'array, hash or string to work with')
end

result = value.empty?

return result
  end
end

# vim: set ts=2 sw=2 et :

--dlloyd

-- 
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] problems with puppetdb

2012-07-16 Thread Chris Price
Also, would you mind sharing a bit more info about your setup?  I presume:

* You are installing from the puppetlabs apt repos?
* Your upgrade was from puppetdb 0.9.1 to 0.9.2?

On Monday, July 16, 2012 9:36:40 AM UTC-7, Deepak Giridharagopal wrote:

 On Sun, Jul 15, 2012 at 7:42 PM, Peter Brown rendhal...@gmail.com wrote:

 Hi everyone,

 I got the new version installed and am now having a strange issue.
 my puppetdb server seems to start but then dies after a few seconds
 with no logging that i can find.
 I tried setting the log level to DEBUG but still nothing.

 I tried running by hand and discovered it couldn't read it's config
 files so i fixed that.
 It also wants write access to /usr/share/puppetdb
 This seems like strange place it would need write access to.
 Is the really necessary?
 It is also ringing security bells in my head so I am a bit hesitant to
 give it write access without knowing why.

 My puppetdb is running on latest ubuntu with latest openjdk 6


 I've created ticket http://projects.puppetlabs.com/issues/15536 to track 
 this; we'll take a look at that this iteration. Would you mind adding 
 yourself as a watcher on that ticket?

 Thanks for the report!

 deepak

 --
 Deepak Giridharagopal / Puppet Labs / grim_radical


-- 
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/-/UF5A0GCai9UJ.
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] how to conditionally add users to a virtualized group?

2012-07-16 Thread Jo Rhett
On Jul 16, 2012, at 8:42 AM, Felix Frank wrote:
 I cannot, of course, but I do sympathize with Jo's notion that in order
 to solve the apparently small problem of making resource overrides
 scale, he is now required to rework most if not all of his manifests to
 play with a hiera based approach.


Well, more matter of factly, that shifting to a hiera-based approach would 
require us to manage very carefully the balance of data between puppet and 
hiera, and manage by eyeball the dependencies between the two. There is 
considerable resistance to this idea here.

If it was possible to put all the user and group information in hiera and then 
put the assignment/management of that information into puppet then we could 
probably manage that. But having to edit this host gets the sql server info 
in puppet and then these users get put in mysql group on this host in hiera 
is completely nonfunctional, and I've seen no examples of ways to bridge that 
gap.

-- 
Jo Rhett
Net Consonance : net philanthropy to improve open source and internet projects.



-- 
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] system users caching

2012-07-16 Thread Jo Rhett
This is likely a factor of how unix works rather than puppet.  When puppet 
starts up, it reads nsswitch.conf. If you modify nsswitch.conf during the 
puppet run, it will not see the changes until after the process has restarted 
and sees the new nsswitch.conf file.

I have gotten around this by putting the LDAP config in a stage prior to main 
and restarting puppet within that stage, so that puppet restarts itself before 
processing the main stage. It's a bit clunky and painful to manage the 
dependancy trees, but it works.

On Jul 15, 2012, at 2:01 PM, Thomas Bétrancourt wrote:
 On my servers, i'm using pam-ldap and cie.
 
 All the configuration of the system is done by puppet.
 
 After to the system installation, when i run puppet, in a first time, puppet 
 sets up the ldap configuration and after, the services installation and 
 configuration.
 
 While setting up of one of these services, puppet doesn't find a user which 
 is provided by LDAP. When i launch again puppet, the user is found.
 
 I think that puppet stores in it's cache the list of the users of the system, 
 but when ldap is up, puppet doesn't reload it's cache to find new users.
 
 It's there a way to do this ?
 
 Thank you for your support
 
 -- 
 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/-/L2o0C_vGeJwJ.
 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.

-- 
Jo Rhett
Net Consonance : net philanthropy to improve open source and internet projects.



-- 
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] how to conditionally add users to a virtualized group?

2012-07-16 Thread Christopher Wood
(inline)

On Mon, Jul 16, 2012 at 11:19:02AM -0700, Jo Rhett wrote:
On Jul 16, 2012, at 8:42 AM, Felix Frank wrote:
 
  I cannot, of course, but I do sympathize with Jo's notion that in order
  to solve the apparently small problem of making resource overrides
  scale, he is now required to rework most if not all of his manifests to
  play with a hiera based approach.
 
Well, more matter of factly, that shifting to a hiera-based approach would
require us to manage very carefully the balance of data between puppet and
hiera, and manage by eyeball the dependencies between the two. There is
considerable resistance to this idea here.
If it was possible to put all the user and group information in hiera and
then put the assignment/management of that information into puppet then we
could probably manage that. But having to edit this host gets the sql
server info in puppet and then these users get put in mysql group on
this host in hiera is completely nonfunctional, and I've seen no examples
of ways to bridge that gap.

Possibly something like the following pseudocode example? The main point being 
to only include a puppet class if there's a certain piece of data in hiera.

node default {
  if hiera('usemysql') {
include mysql::service
  }
  if hiera_array('users') {
include users
  }
}

(I haven't tested the above myself. We're still not using hiera at work, more's 
the pity.)

-- 
Jo Rhett
Net Consonance : net philanthropy to improve open source and internet
projects.
 
--
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.



Re: [Puppet Users] Re: State of Puppet 3.0 and our commitment to quality

2012-07-16 Thread Matthaus Litteken
David,
The hiera 1.0 rc packages or the 0.3.0 gem will work with 2.7.x. Hiera
1.0 will work with both Puppet 2.7.x and Puppet 3.x. And to answer
your other question, Hiera 1.0.0rc1 was never publicly released as a
package because a bug was found internally before it released.

Does that help answer your questions?

haus

On Sat, Jul 14, 2012 at 7:10 AM, David dnblankedel...@gmail.com wrote:
 Hi Mike-
 Thanks for your announcement. Can you say a bit about where the hiera
 distribution fits into this?

 It is a little fuzzy to me during the 2.7/3.x transition which
 version/packages the community is supposed to use with 2.7.x in the
 meantime. The gem version (0.30)?, the one off HEAD in the github repos
 (1.0.0)?, the files in the puppetlabs repos (e.g. 1.0.0.0-01rc3 on
 apt.puppetlabs.com -- and hey, what about hiera-puppet 1.0.0-0.1rc1, where
 does that fit into the picture for the 2.7 branch?)? Thanks for any
 direction you can provide.

-- dNb

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

 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.



-- 
Matthaus Litteken
Release Manager, Puppet Labs

-- 
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] service * { enable = true } fails on puppet runs... (one client only)

2012-07-16 Thread trey85stang
I have a puppet client that fails when trying to enable mcollective and 
nrpe (the only two services I have enable set for).  I have 160+ machines 
that this works fine on but one just gives me the following:

Jul 16 15:21:21 server1 puppet-agent[29413]: 
(/Stage[main]/Mcollective/Service[mcollective]/enable) change from false to 
true failed: Could not enable mcollective: Exec
ution of '/sbin/chkconfig mcollective on' returned 1: 
Jul 16 15:21:21 server1 puppet-agent[29413]: 
(/Stage[main]/Nagios_plugins/Service[nrpe]/enable) change from false to 
true failed: Could not enable nrpe: Execution of '/
sbin/chkconfig nrpe on' returned 1: 
Jul 16 15:21:21 server1 puppet-agent[29413]: Finished catalog run in 2.38 
seconds

The problem is,  these commands return zero when I run as root (puppet runs 
as root)

[ server1 ~]# /sbin/chkconfig mcollective on
[ server1 ~]# echo $?
0
[ server1 ~]# /sbin/chkconfig nrpe on
[ server1 ~]# echo $?
0

[ server1 ~]# cat /etc/redhat-release 
CentOS release 5.2 (Final)
[ server1 ~]# rpm -qa | grep puppet
puppet-2.7.18-1.el5.noarch


Any idea what is going on here?  I can post the debug entries if it will 
help but it doesnt tell much more then what the messages log says.

Thanks,
Trey

 


-- 
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/-/3nwpAaZtXVQJ.
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] how to scale puppet with F5 load balancer?

2012-07-16 Thread Matt
The only issue is there is no real good guide on how to do this. Is there 
any more information that can be provided? What would really help is to see 
the F5 VS, F5 SSL Profile, and how the ssl key was generated.

On Monday, July 9, 2012 8:05:22 AM UTC-4, olli...@googlemail.com wrote:



 On Monday, 9 July 2012 06:44:16 UTC+1, Alan Evans wrote:

 From what I can tell there is no need to use alternate names.  You can 
 make the F5 appear to the clients to be the puppetmaster by leveraging 
 the F5 to do SSL offloading and part of the certificate verification 
 taking some load off your puppet masters.  Even more though, since the 
 puppet environments and other calls use pretty consistently organized 
 URI paths, you can do some really neat stuff with F5 HTTP Class 
 profiles to delegate certain requests to certain servers. 


 +1 on Alan's post. This is exactly how we do it where I currently am.

 Allows us to scale out the Puppet Master pool horizontally based on demand
 and geographical location to keep hops to the minimum.

 Using AltDNSNames would not make this flexible at all as you would need
 to re-gen the cert each time.

 This was all the clients have a single entry point:- puppet.domain and
 the F5 takes the strain and sends them to the appropriate server and
 routes around accordingly.

 The only minor downside we have we this is that sometimes debugging the
 route from the client to the eventual master means we have to go through
 the logs on the potential masters to track down where it went. I do not 
 have
 direct access to the F5's.

  


-- 
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/-/kAZndld2DDkJ.
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] how to conditionally add users to a virtualized group?

2012-07-16 Thread Jo Rhett
On Jul 16, 2012, at 11:55 AM, Christopher Wood wrote:
 Possibly something like the following pseudocode example? The main point 
 being to only include a puppet class if there's a certain piece of data in 
 hiera.
 
 node default {
  if hiera('usemysql') {
include mysql::service
  }
  if hiera_array('users') {
include users
  }
 }

I'm not sure how this would work.  So you're now talking about putting all the 
if/then logic inside hiera?

 (I haven't tested the above myself. We're still not using hiera at work, 
 more's the pity.)


We aren't, because we have no external datasource for this stuff and every 
example we've seen (like yours above) indicates that we're going to have to put 
half of the logic engine of puppet inside the data source, which means it needs 
to be a very complex thing that enforces the structure and somehow ties it with 
the puppet logic. Our analysis so far is that to implement hiera we're going to 
have to write our own software platform which manages hiera data and writes out 
puppet policies on the fly when the data changes.

-- 
Jo Rhett
Net Consonance : net philanthropy to improve open source and internet projects.



-- 
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: service * { enable = true } fails on puppet runs... (one client only)

2012-07-16 Thread Corey Hammerton
In the service resource set the provider parameter to 'redhat':

service{'mcollective':
provider='redhat',
enable=true
...
}

On Monday, July 16, 2012 3:50:50 PM UTC-4, trey85stang wrote:

 I have a puppet client that fails when trying to enable mcollective and 
 nrpe (the only two services I have enable set for).  I have 160+ machines 
 that this works fine on but one just gives me the following:

 Jul 16 15:21:21 server1 puppet-agent[29413]: 
 (/Stage[main]/Mcollective/Service[mcollective]/enable) change from false to 
 true failed: Could not enable mcollective: Exec
 ution of '/sbin/chkconfig mcollective on' returned 1: 
 Jul 16 15:21:21 server1 puppet-agent[29413]: 
 (/Stage[main]/Nagios_plugins/Service[nrpe]/enable) change from false to 
 true failed: Could not enable nrpe: Execution of '/
 sbin/chkconfig nrpe on' returned 1: 
 Jul 16 15:21:21 server1 puppet-agent[29413]: Finished catalog run in 2.38 
 seconds

 The problem is,  these commands return zero when I run as root (puppet 
 runs as root)

 [ server1 ~]# /sbin/chkconfig mcollective on
 [ server1 ~]# echo $?
 0
 [ server1 ~]# /sbin/chkconfig nrpe on
 [ server1 ~]# echo $?
 0

 [ server1 ~]# cat /etc/redhat-release 
 CentOS release 5.2 (Final)
 [ server1 ~]# rpm -qa | grep puppet
 puppet-2.7.18-1.el5.noarch


 Any idea what is going on here?  I can post the debug entries if it will 
 help but it doesnt tell much more then what the messages log says.

 Thanks,
 Trey

  




-- 
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/-/BbWSkV1SGAcJ.
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] stdlib empty() function not working?

2012-07-16 Thread Nan Liu
On Mon, Jul 16, 2012 at 9:48 AM, Dave Lloyd d...@davelloyd.com wrote:
 On Mon, Jul 16, 2012 at 10:56 AM, Nan Liu n...@puppetlabs.com wrote:



 empty() should be an rvalue function. In this case posting the empty()
 function would be more helpful than the puppet manifests.

 Nan


 It's the standard one shipped with stdlib:

Didn't realize you were using stdlib. I ran a quick test with undef
and some common variables, and wasn't able to trigger the error msg.
Would you be able to provide an example resource and the value for
$routes that triggered this problem?

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] Re: State of Puppet 3.0 and our commitment to quality

2012-07-16 Thread David
On Monday, July 16, 2012 3:10:28 PM UTC-4, Matthaus Litteken wrote:

 The hiera 1.0 rc packages or the 0.3.0 gem will work with 2.7.x. Hiera 
 1.0 will work with both Puppet 2.7.x and Puppet 3.x. And to answer 
 your other question, Hiera 1.0.0rc1 was never publicly released as a 
 package because a bug was found internally before it released. 

 Does that help answer your questions? 


Very close, and extremely helpful, thanks. I think my other question might 
not have been clear. It appears there are separate hiera and 
hiera-puppet packages (the latter being the one with the 1.0.0rc1 
designation) in the puppetlabs devel apt repo. 
See http://apt.puppetlabs.com/pool/lucid/devel/h/ for what I mean. I was 
under the impression that hiera-puppet contained the glue code between 
puppet 3.x and hiera 1.x. Am I correct that 2.7.x users do not need to 
install it? 

If this is the case, it seems like it makes more sense to pull hiera 1.0.0 
from github rather than try to get it from the devel apt repo. At least 
until a hiera package gets blessed into the non-devel repos. Does that 
sound right to you?

Thanks for your help.

  -- dNb

-- 
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/-/SFtd9eorcKUJ.
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: service * { enable = true } fails on puppet runs... (one client only)

2012-07-16 Thread Corey Hammerton
it works for me when redhat is quoted. 

On Monday, July 16, 2012 4:57:47 PM UTC-4, trey85stang wrote:

 That is a no go as well

   service { nrpe:
 ensure = running,
 provider   = redhat,
 enable = true,
 hasrestart = true,
 hasstatus  = true,
   }


   service { mcollective:
 ensure = running,
 provider   = redhat,
 enable = true,
 hasrestart = true,
 hasstatus  = true,
   }

 Same error message in log as before.  



-- 
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/-/t6J-gNoll5UJ.
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: State of Puppet 3.0 and our commitment to quality

2012-07-16 Thread Matthaus Litteken
David,
Hiera-puppet does provide the glue between Puppet and Hiera. You need
to install both hiera and hiera-puppet if you are doing hiera lookups
in your manifests (regardless of puppet version). Hiera-puppet
provides the parser functions that are used in manifests and hiera
does the lookups.

haus

On Mon, Jul 16, 2012 at 2:29 PM, David dnblankedel...@gmail.com wrote:
 On Monday, July 16, 2012 3:10:28 PM UTC-4, Matthaus Litteken wrote:

 The hiera 1.0 rc packages or the 0.3.0 gem will work with 2.7.x. Hiera
 1.0 will work with both Puppet 2.7.x and Puppet 3.x. And to answer
 your other question, Hiera 1.0.0rc1 was never publicly released as a
 package because a bug was found internally before it released.

 Does that help answer your questions?


 Very close, and extremely helpful, thanks. I think my other question might
 not have been clear. It appears there are separate hiera and
 hiera-puppet packages (the latter being the one with the 1.0.0rc1
 designation) in the puppetlabs devel apt repo. See
 http://apt.puppetlabs.com/pool/lucid/devel/h/ for what I mean. I was under
 the impression that hiera-puppet contained the glue code between puppet 3.x
 and hiera 1.x. Am I correct that 2.7.x users do not need to install it?

 If this is the case, it seems like it makes more sense to pull hiera 1.0.0
 from github rather than try to get it from the devel apt repo. At least
 until a hiera package gets blessed into the non-devel repos. Does that sound
 right to you?

 Thanks for your help.

   -- dNb

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

 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.



-- 
Matthaus Litteken
Release Manager, Puppet Labs

-- 
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] problems with puppetdb

2012-07-16 Thread Peter Brown
On 17 July 2012 03:15, Chris Price ch...@puppetlabs.com wrote:
 Also, would you mind sharing a bit more info about your setup?  I presume:

 * You are installing from the puppetlabs apt repos?

yes

 * Your upgrade was from puppetdb 0.9.1 to 0.9.2?

and yes.

thanks again Deepak.
I shall add myself to the ticket.
It seems it's a problem with jetty because all the other settings seem
to be working fine.
I am guessing Jetty is part of the puppetdb install?
I tried installing jetty as well but still get the same results.


 On Monday, July 16, 2012 9:36:40 AM UTC-7, Deepak Giridharagopal wrote:

 On Sun, Jul 15, 2012 at 7:42 PM, Peter Brown rendhal...@gmail.com wrote:

 Hi everyone,

 I got the new version installed and am now having a strange issue.
 my puppetdb server seems to start but then dies after a few seconds
 with no logging that i can find.
 I tried setting the log level to DEBUG but still nothing.

 I tried running by hand and discovered it couldn't read it's config
 files so i fixed that.
 It also wants write access to /usr/share/puppetdb
 This seems like strange place it would need write access to.
 Is the really necessary?
 It is also ringing security bells in my head so I am a bit hesitant to
 give it write access without knowing why.

 My puppetdb is running on latest ubuntu with latest openjdk 6


 I've created ticket http://projects.puppetlabs.com/issues/15536 to track
 this; we'll take a look at that this iteration. Would you mind adding
 yourself as a watcher on that ticket?

 Thanks for the report!

 deepak

 --
 Deepak Giridharagopal / Puppet Labs / grim_radical

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

 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] Puppet can't find class from imported files

2012-07-16 Thread Anatoliy Lisovskiy
Hi!
What I am doing wrong?

When I define such a way:
===
import classes/*.pp

node default{
include ntp
include add_admin_accounts

}


node kvm4 inherits default
{
include vm_create
}
===

it can't find the class from the file imported file.

But when I write such way:

===
import classes/*.pp

node default{
include ntp
include add_admin_accounts
   include vm_create
}

node kvm4 inherits default
{

}
===

it works fine. What I am doing wrong?

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



Re: [Puppet Users] State of Puppet 3.0 and our commitment to quality

2012-07-16 Thread Jeff McCune
On Fri, Jul 13, 2012 at 12:08 PM, Michael Stahnke stah...@puppetlabs.comwrote:

 As many of you have doubtless noticed, Puppet 3 and Facter 2 have been
 sitting
 in RC (Release Candidate process) for a long time. That's about to change,
 but
 they won't be getting released as they currently stand. Puppet 3 and
 Facter 2
 have been pulled out of the RC process after we recognized that the
 performance
 needed to be worked on and the reworked pluginsync was not going to solve
 the
 problems that we had aimed for it to solve. What this means is the Facter
 2.0rc and Puppet 3.0rc branches will be removed, and work will be targeted
 at
 the Facter 2.x and Puppet 3.x branches. When they are ready for release we
 will
 restart their rc process, continuing from the last rc tag.

 In order for us to be able to concentrate on getting things right, we are
 going
 to concentrate all of our efforts on 3.0 until it is out. After it is out
 we'll
 move to an alternating release cadence between the Puppet 2.7/Facter 1.6
 series
 and the Puppet 3.x/Facter 2.x series. At this point Puppet 2.7/Facter 1.6
 will
 be in bug fix only mode, all new features will go into the Puppet
 3.x/Facter
 2.x series.

 One reason for the Puppet 3 and Facter 2 (and Hiera 1) releases to to
 reset our
 version number system to match SemVer (seehttp://semver.org for more
 information about what exactly that is, if you are not familiar with it).
 At
 the moment it is still a little bit up in the air how we are going to try
 to
 focus work on 3.0.y bug fixes and new, backward compatible features for
 later
 3.x versions. We'll keep you posted as we come up with a plan.

 If you have questions or concerns, please let us know.



To follow up on this, I removed the 3.0rc branch from the main Puppet Labs
repository.  Patrick and I merged the change set present in this branch
into the 3.x branch itself.

This means the merge targets are now back to normal rather than in
release candidate.  Please review the following information for a
refresher about what goes where.

If you have code that has not been merged, please follow these guidelines
to answer the question, What is my merge base?

* Merge up will happen as: 2.6.x = 2.7.x = 3.x = master

* Bug fixes should target 2.7.x at the earliest.
* 2.6.x is only for security fixes.

* If you're developing something that should _not_ be released in 3.0.0,
then use master as your merge base.  (Note, this scenario is a smell for
Puppet Labs employees.  If you're working on something that shouldn't be
released in Puppet 3.0.0 then please ask yourself, Am I working on the
right thing?)
* If you're working on a bug that affects 2.7, use 2.7.x as your merge base.
* If you're working on a security issue that affects 2.6, use 2.6.x as your
merge base.  Only security related changes should go into 2.6.x at this
point.
* For everything else, use 3.x as your merge base.

Hope this helps.

Cheers,
-Jeff McCune

-- 
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] Re: State of Puppet 3.0 and our commitment to quality

2012-07-16 Thread David
Thanks for the explanation. My apologies for any thread hijacking I did 
(and thanks to Jeff for bringing it back on target).
-- dNb

-- 
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/-/hdeIgB54AlIJ.
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] problems with puppetdb

2012-07-16 Thread Deepak Giridharagopal
On Mon, Jul 16, 2012 at 5:13 PM, Peter Brown rendhal...@gmail.com wrote:

 On 17 July 2012 03:15, Chris Price ch...@puppetlabs.com wrote:
  Also, would you mind sharing a bit more info about your setup?  I
 presume:
 
  * You are installing from the puppetlabs apt repos?

 yes

  * Your upgrade was from puppetdb 0.9.1 to 0.9.2?

 and yes.

 thanks again Deepak.
 I shall add myself to the ticket.
 It seems it's a problem with jetty because all the other settings seem
 to be working fine.
 I am guessing Jetty is part of the puppetdb install?
 I tried installing jetty as well but still get the same results.


Indeed, that's part of the install. It's embedded in PuppetDB as a library.
The ports thing is super-weird...we definitely didn't change them as part
of the upgrade. In fact, your configs should have remained unchanged. How
are you determining what ports it's listening on? What does
/var/log/puppetdb/puppetdb.log say during startup?

Thanks!
deepak

--
Deepak Giridharagopal / Puppet Labs / grim_radical

-- 
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] Re: State of Puppet 3.0 and our commitment to quality

2012-07-16 Thread Jeff McCune
On Mon, Jul 16, 2012 at 5:11 PM, David dnblankedel...@gmail.com wrote:

 Thanks for the explanation. My apologies for any thread hijacking I did
 (and thanks to Jeff for bringing it back on target).


You didn't hijack the thread AFAIK.  Mike asked to let us know if they had
questions which is what you did.

I was just replying to the original message because I deleted the 3.0rc
branch which may affect work in flight.

-Jeff

-- 
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] problems with puppetdb

2012-07-16 Thread Peter Brown
On 17 July 2012 10:19, Deepak Giridharagopal dee...@puppetlabs.com wrote:
 On Mon, Jul 16, 2012 at 5:13 PM, Peter Brown rendhal...@gmail.com wrote:

 On 17 July 2012 03:15, Chris Price ch...@puppetlabs.com wrote:
  Also, would you mind sharing a bit more info about your setup?  I
  presume:
 
  * You are installing from the puppetlabs apt repos?

 yes

  * Your upgrade was from puppetdb 0.9.1 to 0.9.2?

 and yes.

 thanks again Deepak.
 I shall add myself to the ticket.
 It seems it's a problem with jetty because all the other settings seem
 to be working fine.
 I am guessing Jetty is part of the puppetdb install?
 I tried installing jetty as well but still get the same results.


 Indeed, that's part of the install. It's embedded in PuppetDB as a library.
 The ports thing is super-weird...we definitely didn't change them as part of
 the upgrade. In fact, your configs should have remained unchanged. How are
 you determining what ports it's listening on? What does
 /var/log/puppetdb/puppetdb.log say during startup?

i am using netstat -nap and grepping for the PID to find out what
ports it's using.

I am not not getting any logging into /var/log/puppetdb/puppetdb.log
It was working yesterday but nothing there today.
I just tried running it under the official oracle jre 1.6.0.33 and same results.
I have also tried reinstalling from scratch and get the same results.

I am at a loss as to what to try next.


 Thanks!
 deepak

 --
 Deepak Giridharagopal / Puppet Labs / grim_radical

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



Re: [Puppet Users] problems with puppetdb

2012-07-16 Thread Peter Brown
I have gotten around the current problem by installing puppetdb on one
of me CentOS 6 nodes and it appears to be working as expected.
I even got it talking to my postgres database on my master node and
that seems to be working as well.
Now I can apply some new catalogs i need to roll out.

I am happy to help further but it's not as urgent at this stage.

Thanks guys.

Pete.

On 17 July 2012 10:37, Peter Brown rendhal...@gmail.com wrote:
 On 17 July 2012 10:19, Deepak Giridharagopal dee...@puppetlabs.com wrote:
 On Mon, Jul 16, 2012 at 5:13 PM, Peter Brown rendhal...@gmail.com wrote:

 On 17 July 2012 03:15, Chris Price ch...@puppetlabs.com wrote:
  Also, would you mind sharing a bit more info about your setup?  I
  presume:
 
  * You are installing from the puppetlabs apt repos?

 yes

  * Your upgrade was from puppetdb 0.9.1 to 0.9.2?

 and yes.

 thanks again Deepak.
 I shall add myself to the ticket.
 It seems it's a problem with jetty because all the other settings seem
 to be working fine.
 I am guessing Jetty is part of the puppetdb install?
 I tried installing jetty as well but still get the same results.


 Indeed, that's part of the install. It's embedded in PuppetDB as a library.
 The ports thing is super-weird...we definitely didn't change them as part of
 the upgrade. In fact, your configs should have remained unchanged. How are
 you determining what ports it's listening on? What does
 /var/log/puppetdb/puppetdb.log say during startup?

 i am using netstat -nap and grepping for the PID to find out what
 ports it's using.

 I am not not getting any logging into /var/log/puppetdb/puppetdb.log
 It was working yesterday but nothing there today.
 I just tried running it under the official oracle jre 1.6.0.33 and same 
 results.
 I have also tried reinstalling from scratch and get the same results.

 I am at a loss as to what to try next.


 Thanks!
 deepak

 --
 Deepak Giridharagopal / Puppet Labs / grim_radical

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



AW: [Puppet Users] What is the intention of thin_storeconfigs?

2012-07-16 Thread Bernd Adamowicz
Brice,

Thanks for this detailed answer. As mentioned, I will try this throughout the 
next weeks (will not find the time before.)

Thanks
Bernd

 -Ursprüngliche Nachricht-
 Von: puppet-users@googlegroups.com [mailto:puppet-
 us...@googlegroups.com] Im Auftrag von Brice Figureau
 Gesendet: Freitag, 13. Juli 2012 11:08
 An: puppet-users@googlegroups.com
 Betreff: Re: [Puppet Users] What is the intention of thin_storeconfigs?
 
 On 12/07/12 10:29, Bernd Adamowicz wrote:
  I started doing some experiments with the configuration option
  'thin_storeconfigs=true' by adding this option to one of my Puppet
  masters. However, I could not determine any change in behavior.
 
 As others already have explained, with thin_storeconfigs, only exported
 resources, facts and nodes are persisted to the DB. With regular
 (thick) storeconfigs every resources are persisted to the database.
 
  I expected to have the resources collected faster, but Puppet still
  takes some 15min to do the job.
 
 The thing is that if you had run with regular storeconfigs before
 activating the thin_storeconfigs option, then your database is already
 populated with all the resources definitions and parameters. So the
 first time you run with thin_storeconfigs you end up collecting as if
 thick was activated, then after the first catalog run (for a given
 node), puppet should remove all the un-needed resources (ie the non
 exported ones) from the database.
 If that doesn't happen, I would suggest you to cleanup the database for
 your nodes so that only exported resources are persisted and collected.
 
  So maybe I misunderstood something.
  Should this option instead be placed in the client's configuration to
  make them export only the @@-resources?
 
 No, it's a master option.
 --
 Brice Figureau
 My Blog: http://www.masterzen.fr/
 
 
 --
 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.