Re: [Puppet Users] Puppet and Passenger.. configprint

2012-06-06 Thread Jo Rhett
If you read the docs for that parameter, it only takes webrick or nginx. It 
determines that it's running under passenger from it's environment while 
running.

On Jun 5, 2012, at 7:53 PM, JA wrote:
 Hello everyone...
 
 I have configured the puppetmaster to use Apache/Passenger.  However,
 executing a configprint (puppet --configprint all) from either the
 puppetmaster or an agent shows
 
 servertype = Webbrick
 
 Has anyone else seen this?  What do I need to do to correct this?
 
 Thanks!
 JA
 
 -- 
 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.
 

-- 
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] rspec spec_helper

2012-06-06 Thread Dan Carley
On Jun 4, 2012 5:07 PM, Jeff McCune jeff@ j...@puppetlabs.com
puppetlabs.com j...@puppetlabs.com wrote:
 I'll leave the description to Branan but please be aware that we're
 actively and currently working to centralize all of this into a single
 repository named puppetlabs_spec_helper.  The goal of this repository
 is to provide a single place that abstracts away the details of
 initializing Puppet for spec testing.  This includes initializing
 Puppet for use with modules being spec tested.

And, by the looks of it, will depend on rspec-puppet for core
functionality. Which is great news.

-- 
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] puppet-load forbidden request to /catalog/*

2012-06-06 Thread Matthew Burgess
 On Sat, Jun 2, 2012 at 2:27 PM, Brice Figureau
 brice-pup...@daysofwonder.com wrote:

 So my suggestion would be to:
 gem uninstall em-http-request
 gem install -v 0.2.5 em-http-request

Unfortunately, that hasn't had any effect either.  I've now got the
same versions of gems installed as you, including downgrading facter
1.6.2.  I'm still getting the 400 error caused by it interpreting the
clientversion fact as an array.

Thanks,

Matt.

-- 
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: Creating configuration for dhcpd

2012-06-06 Thread Jiří Červenka
 The problem in this case is this declaration inside your preseed
 definition:

         file { /etc/dhcp/dhcpd.conf-$name:
 ...
                 path    = /etc/dhcp/dhcpd.conf,
 ...
         } #file

 Note that you are giving a literal path to a resource declared within
 a defined type.  That would work if you only declared one instance of
 the defined type, but it creates a conflict if you declare more than
 one.

 The solution looks easy in this case, because the problematic
 declaration doesn't really depend on its context (that should have
 been your first clue that it didn't belong there).  Pull it out and
 make it a sibling of the preseed { ... } declaration block:

 preseed {
     node1:
 ...

 } # preseed

 file { /etc/dhcp/dhcpd.conf:
 ...

 } #file

 John

Hi,
unfortunately this doesnt work. In preseed {...} i declare variables
for each node, which are then used in file {/etc/dhcp/dhcpd.conf:}
in template content = template(preseed/dhcpd.conf.erb).

If I make file {/etc/dhcp/dhcpd.conf:} sibling of preseed {...},
then variables from preseed are not available in template.

I want to perform this. For each node I want to add one line into /etc/
dhcp/dhcpd.conf :
...
host n1 { hardware ethernet 78:e7:d1:24:5c:10; fixed-address
192.168.1.1; }
host n2 { hardware ethernet 78:e7:d1:24:5c:11; fixed-address
192.168.1.2; }
host nx { hardware ethernet 78:e7:d1:24:5c:1@; fixed-address
192.168.1.x; }
...


Jiri

-- 
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] file path problems

2012-06-06 Thread llow...@oreillyauto.com
In my code, I have the following snippet:

  file {
'es_conf':
  ensure  = directory,
  path= $path_conf,
  require = File['es_dir'];
'es_data':
  ensure  = directory,
  path= $path_data,
  require = File['es_dir'];
'es_logs':
  ensure  = directory,
  path= $path_logs,
  require = File['es_dir'];
'es_plugins':
  ensure  = directory,
  path= $path_plugins,
  require = File['es_dir'];
  }

Each of these variables is defined elsewhere in scope.

The referenced es_dir is defined in this same class as the above snippet, 
and is as follows:

  file {'es_dir':
ensure  = link,
path= '/opt/elasticsearch',
target  = /opt/elasticsearch-${elastic_ver},
require = Exec['unpack_elasticsearch'],
  }

When I run puppet (currently with --noop while I work out errors) it tells 
me that File paths must be fully qualified, not 'es_logs' 

Based on the documentation I have seen (from puppetlabs and 3rd party 
sites) the above code should work.

What is it that I am missing? 

-- 
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/-/0wxWdnbN4a0J.
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: Autoscaling with Puppet

2012-06-06 Thread Stephen Gran
Hello,

On Tue, 2012-06-05 at 08:43 -0600, Matthew Boeckman wrote:
 Thanks, that's very helpful. 
 
 
 What are other users doing with autoscale to define their nodes.pp? A
 wildcard match? Basing replies off a custom fact like this? I'm
 already looking at using a non-fqdn based certname via user-data...
 but that general part in autoscale is a bit obscured for me. 

When you create the autoscaling group, one of the things you do is
create a launch config.  In this launch config you can add scripts to
the userdata that will then be run by the node on bootup (via
cloud-init).  This is very helpful for injecting custom data into the
node for use when it connects to the puppetmaster.

 Or, phrased differently, if Amazon is init'ing the instance creation
 request from one of my AMI's, how do I get a config in place on the
 puppet side to match the host. I'm thinking that's certname and a
 custom fact, but am open to other ideas.

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.



Re: [Puppet Users] Not using expired node for targethost from cache; expired

2012-06-06 Thread Berry Sizemore
Does it matter that it is a core class that comes with Puppet Enterprise?

On Tuesday, June 5, 2012 5:44:55 PM UTC-7, Jo wrote:

 Or the class is failing to compile for some reason. You have to check the 
 logs on the master to find out why. It only tells you once.

 On Jun 5, 2012, at 4:43 PM, Berry Sizemore wrote:

 When I execute *puppet agent --test --debug --verbose* on the target 
 host, I receive the following error message:

 err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
 Could not find class pe_accounts for targethost on node targethost
 warning: Not using cache on failed catalog
 err: Could not retrieve catalog; skipping run

 I enabled debugging for the Puppet Master, and whenI look at the logs I 
 get the following output:

 Jun  5 16:25:12 puppet puppet-master[29802]: Expiring the node cache of 
 targethost
 Jun  5 16:25:12 puppet puppet-master[29802]: Not using expired node for 
 targethost from cache; expired at Tue Jun 05 16:24:12 -0700 2012
 Jun  5 16:25:12 puppet puppet-master[29802]: Caching node for targethost
 Jun  5 16:25:12 puppet puppet-master[29802]: Could not find class 
 pe_accounts for targethost on node targethost
 Jun  5 16:25:12 puppet puppet-master[29802]: Could not find class 
 pe_accounts for targethost on node targethost

 I have 4 nodes that are effectively the same and 3 of the 4 work as 
 expected.  Someone trying to help has said:

 The only thing i can derive from that is there is no 
 'modules/pe_accounts/manifests/init.pp' in any of the path elements in 
 `puppet master --configprint modulepath` on your server, for the 
 environment that client is

 It was my understanding from reading that the pe_accounts was a part of 
 the core classes that comes with puppet.  The version of puppet I am 
 working with is PE 2.5.1 on Solaris 10 non-global zones.


 -- 
 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 view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/NEirrpSfg48J.
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] file path problems

2012-06-06 Thread Jeff McCune
The $path_logs variable doesn't hold the value you expect. You might try
printing the variable with notice() or a notify resource.

-Jeff

On Jun 6, 2012, at 7:57 AM, llow...@oreillyauto.com 
llow...@oreillyauto.com wrote:

In my code, I have the following snippet:

  file {
'es_conf':
  ensure  = directory,
  path= $path_conf,
  require = File['es_dir'];
'es_data':
  ensure  = directory,
  path= $path_data,
  require = File['es_dir'];
'es_logs':
  ensure  = directory,
  path= $path_logs,
  require = File['es_dir'];
'es_plugins':
  ensure  = directory,
  path= $path_plugins,
  require = File['es_dir'];
  }

Each of these variables is defined elsewhere in scope.

The referenced es_dir is defined in this same class as the above snippet,
and is as follows:

  file {'es_dir':
ensure  = link,
path= '/opt/elasticsearch',
target  = /opt/elasticsearch-${elastic_ver},
require = Exec['unpack_elasticsearch'],
  }

When I run puppet (currently with --noop while I work out errors) it tells
me that File paths must be fully qualified, not 'es_logs' 

Based on the documentation I have seen (from puppetlabs and 3rd party
sites) the above code should work.

What is it that I am missing?

 --
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/-/0wxWdnbN4a0J.
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] Not using expired node for targethost from cache; expired

2012-06-06 Thread Ryan Coleman
On Wed, Jun 6, 2012 at 8:39 AM, Berry Sizemore berry.sizem...@gmail.com wrote:
 Does it matter that it is a core class that comes with Puppet Enterprise?

Nope. That's a just a module that comes pre-deployed to a portion of
the modulepath. Try `puppet module list --tree` or `puppet config
print modulepath` and make sure that you have a pe_accounts module in
/opt/puppet/share/puppet/modules (that path should be in your
modulepath as well).

If it had been removed somehow, you can find it in the 'modules'
folder in an expanded PE installer tarball.

HTH,

--Ryan

-- 
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] Not using expired node for targethost from cache; expired

2012-06-06 Thread Jeff McCune
On Wed, Jun 6, 2012 at 10:00 AM, Ryan Coleman r...@puppetlabs.com wrote:
 On Wed, Jun 6, 2012 at 8:39 AM, Berry Sizemore berry.sizem...@gmail.com 
 wrote:
 Does it matter that it is a core class that comes with Puppet Enterprise?

 Nope. That's a just a module that comes pre-deployed to a portion of
 the modulepath. Try `puppet module list --tree` or `puppet config
 print modulepath` and make sure that you have a pe_accounts module in
 /opt/puppet/share/puppet/modules (that path should be in your
 modulepath as well).

A really good way to troubleshoot this issue is to paste the following
two commands to the list:

(On the puppet master)

$ sudo puppet master --configprint modulepath
$ sudo find /opt/puppet/share/puppet/modules -iname '*.pp'

Ryan's intuition is correct, this is probably a module path issue.

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



[Puppet Users] Restart service on ensure running ; class dependecies

2012-06-06 Thread Andrei-Florian Staicu
Hi all,

May i get your opinion on the following two subjects?

First, for services that have ensure=runnig and for which service
bla status returns not running, can puppet be convinced to call
service bla restart instead of service bla start?

Second question, about class dependencies. I have a class called
network, with a subclass networ::device, which I use to deploy the
ifcfg-* files. So, for a node, i will have an undefined number of
network::device objects. Furthermore, I have a class called
network::ipconfig2. How can I make sure that network::ipconfig2 will
be applied only after all the network::devices are applied?

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-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] Restart service on ensure running ; class dependecies

2012-06-06 Thread Jo Rhett
On Jun 6, 2012, at 10:33 AM, Andrei-Florian Staicu wrote:
 First, for services that have ensure=runnig and for which service
 bla status returns not running, can puppet be convinced to call
 service bla restart instead of service bla start?

Would be easier to change the command used to check and see if it is running 
for those processes.

 Second question, about class dependencies. I have a class called
 network, with a subclass networ::device, which I use to deploy the
 ifcfg-* files. So, for a node, i will have an undefined number of
 network::device objects. Furthermore, I have a class called
 network::ipconfig2. How can I make sure that network::ipconfig2 will
 be applied only after all the network::devices are applied?

require = Class['network::device'] ?

-- 
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] SSL emailAddress interpreted as part of the CN when using puppet with an external PKI

2012-06-06 Thread Jeff McCune
On Sat, Jun 2, 2012 at 7:59 AM, Andrew Wasilczuk a...@zx23.net wrote:
 Hi Jeff,

    You may be running into a bug in Puppet but I'm not entirely sure yet...
    What web server are you using to terminate the SSL connection from the
    agent to the master?  Is it simply the built in one provided by `puppet
    master` or are you using Apache or something?

 SSL is terminated by Apache.  My Apache config is similar to what comes with
 puppet in ext/rack/files/apache2.conf, and contains:

 RequestHeader set X-SSL-Subject %{SSL_CLIENT_S_DN}e
 RequestHeader set X-Client-DN %{SSL_CLIENT_S_DN}e
 RequestHeader set X-Client-Verify %{SSL_CLIENT_VERIFY}e

 My puppet.conf contains:

 ssl_client_header = SSL_CLIENT_S_DN_
 ssl_client_verify_header = SSL_CLIENT_VERIFY

 in the [master] section.


    It appears that we're not correctly parsing out the emailAddress field
    inside the subject and instead we're treating it as part of the common
    name (CN).

 Yup, that's what it looks like.

Andrew,

This is definitely a bug.  The regular expression we're using to
extract the common name (CN) from the distinguished name (DN) is
/^.*?CN\s*=\s*(.*)/ [1]

This is a greedy regular expression which explains why it's also
grabbing the email address.  I think we need to fix this to only match
up to the next / character or the end of the string.

Before I go fix this right now, are we sure this is a valid encoding
for the fields in the DN?  What software are you using to produce
these certificates?

I've filed the bug here and added you as a watcher Andrew:
http://projects.puppetlabs.com/issues/14852

[1] 
https://github.com/puppetlabs/puppet/blob/master/lib/puppet/network/http/rack/rest.rb#L89

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



[Puppet Users] ENC and Passenger

2012-06-06 Thread Brian Carpio
Hi,

I have passenger up and running and everything was working file while
I was using the /etc/puppet/manifests/nodes.pp file. Recently I
switched over to using LDAP as an external node classifer and now when
I start passenger for some reason puppet doesn't look to ldap for node
class info. However when I start mongrel (or webrick can't remember
what comes with Ubuntu package) /etc/init,d/puppetmaster start the
master looks to the ENC for puppet class info.

Anyone had this issue before? I can't see anything in my apache config
which would make passenger not look at the /etc/puppet/puppet.conf
(unless that is whats wrong here).

Brian

-- 
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] Not using expired node for targethost from cache; expired

2012-06-06 Thread Berry Sizemore
On the puppet master /opt/puppet/share/puppet/modules/pe_accounts does 
exist, but not on the either node (one that works and one that gets the 
error message).

On Wednesday, June 6, 2012 10:00:03 AM UTC-7, Ryan Coleman wrote:

 On Wed, Jun 6, 2012 at 8:39 AM,  wrote: 
  Does it matter that it is a core class that comes with Puppet 
 Enterprise? 

 Nope. That's a just a module that comes pre-deployed to a portion of 
 the modulepath. Try `puppet module list --tree` or `puppet config 
 print modulepath` and make sure that you have a pe_accounts module in 
 /opt/puppet/share/puppet/modules (that path should be in your 
 modulepath as well). 

 If it had been removed somehow, you can find it in the 'modules' 
 folder in an expanded PE installer tarball. 

 HTH, 

 --Ryan 


-- 
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/-/oG_MD9KH20MJ.
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: ENC and Passenger

2012-06-06 Thread Brian Carpio
Nevermind, I turned on debug and noticed passenger / apache couldn't
read the puppet.conf file. Once I fixed that everything worked as
expected.



On Jun 6, 12:19 pm, Brian Carpio bcar...@thetek.net wrote:
 Hi,

 I have passenger up and running and everything was working file while
 I was using the /etc/puppet/manifests/nodes.pp file. Recently I
 switched over to using LDAP as an external node classifer and now when
 I start passenger for some reason puppet doesn't look to ldap for node
 class info. However when I start mongrel (or webrick can't remember
 what comes with Ubuntu package) /etc/init,d/puppetmaster start the
 master looks to the ENC for puppet class info.

 Anyone had this issue before? I can't see anything in my apache config
 which would make passenger not look at the /etc/puppet/puppet.conf
 (unless that is whats wrong here).

 Brian

-- 
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] Announce: Facter 1.6.10rc1 Available

2012-06-06 Thread Moses Mendoza
Facter 1.6.10rc1 is a maintenance release candidate in the 1.6.x branch
with bug fixes.

It includes contributions from Hailee Kenney, Josh Cooper, Jeff Weiss,
Stefan Shulte, and Moses Mendoza.

This release is available for download at:
 https://downloads.puppetlabs.com/facter/facter-1.6.10rc1.tar.gz
 https://apt.puppetlabs.com
 https://yum.puppetlabs.com

See the Verifying Puppet Download section at:

http://projects.puppetlabs.com/projects/puppet/wiki/Downloading_Puppet#Verifying+Puppet+Downloads

Please report feedback via the Puppet Labs Redmine site, using an
affected version of 1.6.10rc1:
 http://projects.puppetlabs.com/projects/facter/

Release Notes at: https://projects.puppetlabs.com/projects/facter/wiki/Wiki

Facter 1.6.10rc1 Highlights
==
(#10261) Detect x64 architecture on Windows

Previously, the hardwaremodel fact was using

RbConfig::CONFIG['host_cpu']

for Windows, but this returns i686 on a 64-bit OS, which is incorrect.
And
this caused the architecture fact to be reported as i386, which is also
wrong.

This commit updates the hardwaremodel fact on Windows to return the
appropriate cpu model, e.g. x64, i686, etc. Based on that, the
architecture fact will either be x86 or x64, and can be used to install
architecture-specific packages, e.g.
splunk-4.2.4-110225-x64-release.msi.

(#13678) Allow passing shell built-ins to exec method on windows

The former exec method tried to run the command on windows no matter
wether it could be found on the filesystem or not. This allowed end
users to run shell-builtins with the exec method.

The new exec method always tried to expand the binary first and returned
nil if the binary was not found. This commit now restores the old
behaviour on windows: Even if we fail to expand the command, we will try
to run the command in the exact same way as it was passed to the exec
method in case it is indeed a shell built-in. But we will now raise a
deprecation warning.

Reason for deprecating this even if we cannot find it, just run it
behaviour: We may want to predetermine the paths where facter tries to
find
binaries in the future. A fall back behaviour may then lead to strange
results. Most built-ins can be expressed in pure ruby anyways.

(#13678) Join PATHs correctly on windows

On windows File.join joins with the File::SEPARATOR which is '/' on
windows. While a lot of the windows API and the ruby filetests allow
/ as a separator we should use File::ALT_SEPARATOR ('\' on windows) to
create pathnames on windows

Facter 1.6.10rc1 Changelog
===
Josh Cooper (4)
f42896d (#14764) Stub architecture fact when Windows facts run on Linux
964d1f0 (#12864) Close registry key
ab025bb Revert Revert (#12864) Windows: get primary DNS from
registry
478386d (#10261) Detect x64 architecture on Windows

Hailee Kenney (1)
b050eb1 (#14582) Fix noise in LSB facts

Jeff Weiss (1)
f44ca52 (maint) Fix hardware model fact for ruby 1.9

Stefan Shulte (12)
2043244 (#13678) Remove deprecation msg triggerd by the ipaddress6 fact
d118d81 (#13678) Add filename extension on absolute paths on windows
85654b0 (#13678) Allow passing shell built-ins to exec method on windows
8f4c016 (#13678) Single quote paths on unix with spaces
2d164e8 (#13678) Join PATHs correctly on windows
e7e7e8f (#13678) Extend spec tests for expand_command
0fea7b0 maint: Add shared context for specs to imitate windows or posix
60d0cd2 (#13678) Fix spec failures on windows
121a2ab (#13678) Fix quoting in expand_command
55b1125 (#13678) Add more unit tests for new methods
9086c0a (#13678) Add RDoc documentation for new methods
165ace4 (#13678) Convert command to absolute paths before executing

Moses Mendoza(2)
d6a3e91 Make package task depend on tar in Rakfile
6cc881d Use git describe in Rakefile to determine pkg ver

-- 
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] Hiera Lookup Issues Ubuntu 12.04

2012-06-06 Thread Gmoney
I receive this error message:

err: Could not retrieve catalog from remote server: Error 400 on
SERVER: undefined method `empty?' for nil:NilClass at /etc/puppet/
manifests/site.pp:16

It's coughing on my code in site.pp which looks like so ( all other
hiera_include have no issues, problem is at node_classes


node default {
   $region= extlookup( region)
   $hostgroup = extlookup( hostgroup )
   $site  = extlookup( site  )
   $env   = extlookup( env   )
   hiera_include( global_classes ) # This is maintained in
defaults.yaml
   hiera_include( hostgroup_classes )  # Maintained in hostgroups/
hostgroup/hostgroup.yaml
   hiera_include( site_classes )   # Maintained in hostgroups/
hostgroup/site/site.yaml
   hiera_include( node_classes )   # Maintained in hostgroups/
hostgroup/site/hostname.yaml
}

cleint yaml

---
config:  - SuperAwesomeCONF2.0
server:  - client
node_classes: - xxx_base

I am running RedHat 6 Puppetmaster: 2.7.14
I am running Ubuntu 12.04 on client with puppet 2.7.11
Hiera: 0.3.0

Is there a way I can see what Hiera is returning without setting the
args for it's value?

I do not see this behavior on Red Hat5 or Red Hat6. Any help would be
greatly appreciated.

-- 
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] Not using expired node for targethost from cache; expired

2012-06-06 Thread Jeff McCune
On Wed, Jun 6, 2012 at 11:49 AM, Berry Sizemore
berry.sizem...@gmail.com wrote:
 On the puppet master /opt/puppet/share/puppet/modules/pe_accounts does
 exist, but not on the either node (one that works and one that gets the
 error message).

The module not being there is the problem.  =)

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



[Puppet Users] Puppet 2.7.15: Thunderdome

2012-06-06 Thread Matthaus Litteken
As specified in our timed-release cycle process, we've entered the
THUNDERDOME for the 2.7.15 series (May) vs 2.7.16 series (June).

Two releases enter; one leaves.

It was determined today that 2.7.16 has won the Thunderdome.  (An epic
battle, 2.7.15 put up a good fight and looked like it would knock
2.7.16 out until 2.7.16 used some new SSL abilities to distract 2.7.15
and push it over a cliff.)

So, look for 2.7.16rc1 later today.

The main reason for holding back 2.7.15 were concerns around SSL
compatibility between Ruby 1.8 and Ruby 1.9.

1.  Ruby 1.8 defaults to an SSL verify_mode of NO_VERIFY while Ruby
1.9 defaults to PEER_VERIFY. This is addressed by specifying which is
desired and not using Ruby's default value.

-- 
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] Problem with Virtual Resource

2012-06-06 Thread Jeff McCune
On Wed, Jun 6, 2012 at 4:26 PM, Worker Bee beeworke...@gmail.com wrote:
 Hello Everyone;

 I am stuck...

 I am testing creating virtual resources and having no luck at all.  I am not
 getting any errors when I execute puppet agent --test but, the user account
 is never getting created.  I would be so grateful if anyone would be kind
 enough to offer some advice.

What version of Puppet?

-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] Problem with Virtual Resource

2012-06-06 Thread Worker Bee
2.7.9..





On Wed, Jun 6, 2012 at 7:37 PM, Jeff McCune j...@puppetlabs.com wrote:

 On Wed, Jun 6, 2012 at 4:26 PM, Worker Bee beeworke...@gmail.com wrote:
  Hello Everyone;
 
  I am stuck...
 
  I am testing creating virtual resources and having no luck at all.  I am
 not
  getting any errors when I execute puppet agent --test but, the user
 account
  is never getting created.  I would be so grateful if anyone would be kind
  enough to offer some advice.

 What version of Puppet?

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



-- 
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] Announce: Puppet 2.7.16rc1 Available

2012-06-06 Thread Matthaus Litteken
Puppet 2.7.16rc1 is a maintenance release candidate for Puppet in the
2.7.x series. (Puppet 2.7.15 died in the thunderdome). The release notes below
include notes from the 2.7.15 series, so you may see some changes repeated
from previous emails.

Downloads are available at:
 * Source https://downloads.puppetlabs.com/puppet/puppet-2.7.16rc1.tar.gz

Windows package is available at
https://downloads.puppetlabs.com/windows/puppet-2.7.16rc1.msi

RPMs are available at https://yum.puppetlabs.com/el or /fedora

Debs are available at  https://apt.puppetlabs.com

Mac package is available at
https://downloads.puppetlabs.com/mac/puppet-2.7.16rc1.dmg

See the Verifying Puppet Download section at:
https://projects.puppetlabs.com/projects/puppet/wiki/Downloading_Puppet

Please report feedback via the Puppet Labs Redmine site, using an
affected puppet version of 2.7.16rc1:
http://projects.puppetlabs.com/projects/puppet/


## Puppet 2.7.16rc1 Release Notes ##

(#8858) Explicitly set SSL peer verification mode.

In Ruby 1.8 the Net::HTTP library defaults to skipping peer
verification when
no mode is explicitly set.  Ruby 1.9, on the other hand, does not:
it defaults
to verification of the peer certificate - leading to failure when
we depended
on the default value in our HTTP setup.

This changes to explicitly set the verification mode, ensuring we get
consistent results across all Ruby versions.

*Significantly improve compilation performance when using modules
When autoloading classes/defines, the typeloader constructs a set of
possible locations for the class, based on its name. Effectively, it
will look in the canonical locations corresponding to each namespace in
the fully-qualified name. So for each namespace, it will ask the
environment for a Puppet::Module instance for that module, to ask it
which of the module's potentially manifests match the class it's looking
for. To answer that request, the environment instantiates a
Puppet::Module.

This amounts to potentially thousands of Puppet::Module instances being
created, because it does this many times (based on nesting of the class
name) per include/autoload/import. When Puppet::Module instances are
created, they parse and load their metadata.json file, in part to
validate their use. This implies that each compilation results in
metadata.json being parsed thousands of times, which is extremely slow
(and obviously provides no actual benefit).

Fortunately, the environment object already keeps a list of
Puppet::Module instances for every module in its modulepath. The fix
applied here is simply to change the environment such that it provides
modules by looking them up in its cached list, resulting in up to an
order of magnitude improvement in compilation time.

*Colorize console output on Windows
Previously, `Puppet[:color]` was false on Windows, because the Windows
console does not support ANSI escape sequences.

The win32console gem converts ANSI color escape sequences into Win32
console API calls to change the foreground color, etc. If the output
stream has been redirected to a file, then the gem does not translate
the sequences, instead preserving them in the stream, as is done on
Unix.

To disable colorized output specify `color=false` or `--color=false` on
the command line.

This commit adds a `Puppet.features.ansicolor?` feature that defines
whether ANSI color escape sequences are supported. On Windows, this is
only true if the win32console gem can be loaded. On other platforms, the
value is always true.

The win32console gem will be packaged into the Windows installer, and
so, `Puppet[:color]` now defaults to true. If the gem can't be loaded,
then puppet will revert to its previous behavior.

(#8174) Allow defines to reference topscope

Because the compiler re-assigned the topscope, looking up topscope vars
or facts from a defined resource type was causing deprecation warnings
when it should not be. By cherry-picking commits
b02aa930a03a282588e81f65e14f47a138a4b9f0 and
c995be16bc9e3ad8dbad9d21b49df76de5b72ea9 the topscope is no longer
re-assigned and so defined resource types can now lookup these kinds of
variables without problem.

Evaluate node classes either in top or node scope

Classes that are tied to a node should be preferred to be evaluated in
the node scope, but if we don't have one then they should be in the top
scope

(#14297) Handle upstart services better

The previous changes to the upstart provider didn't take into
account services
that may have upstart jobs in /etc/init with no corresponding symlink to
upstart-job in /etc/init.d. This fix adds /etc/init/$service.conf
to the search
path in the upstart provider.

In order to allow upstart to use debian as its parent, this commit
adds methods
for enabled?, enable and 

[Puppet Users] Re: [Puppet-dev] Announce: Puppet 2.7.16rc1 Available

2012-06-06 Thread Trevor Vaughan
All,

Very awesome work on this release and I'm looking forward to trying it out.

Is there any chance that DNS SRV records are going to make it into 2.7?

Thanks,

Trevor

On Wed, Jun 6, 2012 at 7:52 PM, Matthaus Litteken
matth...@puppetlabs.com wrote:
 Puppet 2.7.16rc1 is a maintenance release candidate for Puppet in the
 2.7.x series. (Puppet 2.7.15 died in the thunderdome). The release notes below
 include notes from the 2.7.15 series, so you may see some changes repeated
 from previous emails.

 Downloads are available at:
  * Source https://downloads.puppetlabs.com/puppet/puppet-2.7.16rc1.tar.gz

 Windows package is available at
 https://downloads.puppetlabs.com/windows/puppet-2.7.16rc1.msi

 RPMs are available at https://yum.puppetlabs.com/el or /fedora

 Debs are available at  https://apt.puppetlabs.com

 Mac package is available at
 https://downloads.puppetlabs.com/mac/puppet-2.7.16rc1.dmg

 See the Verifying Puppet Download section at:
 https://projects.puppetlabs.com/projects/puppet/wiki/Downloading_Puppet

 Please report feedback via the Puppet Labs Redmine site, using an
 affected puppet version of 2.7.16rc1:
 http://projects.puppetlabs.com/projects/puppet/


 ## Puppet 2.7.16rc1 Release Notes ##

 (#8858) Explicitly set SSL peer verification mode.

    In Ruby 1.8 the Net::HTTP library defaults to skipping peer
 verification when
    no mode is explicitly set.  Ruby 1.9, on the other hand, does not:
 it defaults
    to verification of the peer certificate - leading to failure when
 we depended
    on the default value in our HTTP setup.

    This changes to explicitly set the verification mode, ensuring we get
    consistent results across all Ruby versions.

 *Significantly improve compilation performance when using modules
    When autoloading classes/defines, the typeloader constructs a set of
    possible locations for the class, based on its name. Effectively, it
    will look in the canonical locations corresponding to each namespace in
    the fully-qualified name. So for each namespace, it will ask the
    environment for a Puppet::Module instance for that module, to ask it
    which of the module's potentially manifests match the class it's looking
    for. To answer that request, the environment instantiates a
    Puppet::Module.

    This amounts to potentially thousands of Puppet::Module instances being
    created, because it does this many times (based on nesting of the class
    name) per include/autoload/import. When Puppet::Module instances are
    created, they parse and load their metadata.json file, in part to
    validate their use. This implies that each compilation results in
    metadata.json being parsed thousands of times, which is extremely slow
    (and obviously provides no actual benefit).

    Fortunately, the environment object already keeps a list of
    Puppet::Module instances for every module in its modulepath. The fix
    applied here is simply to change the environment such that it provides
    modules by looking them up in its cached list, resulting in up to an
    order of magnitude improvement in compilation time.

 *Colorize console output on Windows
    Previously, `Puppet[:color]` was false on Windows, because the Windows
    console does not support ANSI escape sequences.

    The win32console gem converts ANSI color escape sequences into Win32
    console API calls to change the foreground color, etc. If the output
    stream has been redirected to a file, then the gem does not translate
    the sequences, instead preserving them in the stream, as is done on
    Unix.

    To disable colorized output specify `color=false` or `--color=false` on
    the command line.

    This commit adds a `Puppet.features.ansicolor?` feature that defines
    whether ANSI color escape sequences are supported. On Windows, this is
    only true if the win32console gem can be loaded. On other platforms, the
    value is always true.

    The win32console gem will be packaged into the Windows installer, and
    so, `Puppet[:color]` now defaults to true. If the gem can't be loaded,
    then puppet will revert to its previous behavior.

 (#8174) Allow defines to reference topscope

    Because the compiler re-assigned the topscope, looking up topscope vars
    or facts from a defined resource type was causing deprecation warnings
    when it should not be. By cherry-picking commits
    b02aa930a03a282588e81f65e14f47a138a4b9f0 and
    c995be16bc9e3ad8dbad9d21b49df76de5b72ea9 the topscope is no longer
    re-assigned and so defined resource types can now lookup these kinds of
    variables without problem.

 Evaluate node classes either in top or node scope

    Classes that are tied to a node should be preferred to be evaluated in
    the node scope, but if we don't have one then they should be in the top
    scope

 (#14297) Handle upstart services better

    The previous changes to the upstart provider didn't take into
 account services
    that may have upstart jobs 

Re: [Puppet Users] Problem with Virtual Resource

2012-06-06 Thread Walter Heck
We usually choose to inherit the developers class from the virtual
class, have you tried that approach?

On Thu, Jun 7, 2012 at 7:44 AM, Worker Bee beeworke...@gmail.com wrote:
 2.7.9..






 On Wed, Jun 6, 2012 at 7:37 PM, Jeff McCune j...@puppetlabs.com wrote:

 On Wed, Jun 6, 2012 at 4:26 PM, Worker Bee beeworke...@gmail.com wrote:
  Hello Everyone;
 
  I am stuck...
 
  I am testing creating virtual resources and having no luck at all.  I am
  not
  getting any errors when I execute puppet agent --test but, the user
  account
  is never getting created.  I would be so grateful if anyone would be
  kind
  enough to offer some advice.

 What version of Puppet?

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


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



-- 
Walter Heck

--
Check out my startup: Puppet training and consulting @ http://www.olindata.com
Follow @olindata on Twitter and/or 'Like' our Facebook page at
http://www.facebook.com/olindata

-- 
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] Not using expired node for targethost from cache; expired

2012-06-06 Thread Berry Sizemore
We learned more about the ENC today. When a node has been placed into the 
console, but the puppet.conf for the node has report=false, the classes set for 
the node continue to work. This was a janitorial task for me, and no classes 
for that node had been assigned. The logs suggested pe_accounts was 
unavailable, and of course, that wasn’t going to work. I hadn’t thought to 
check the console, since I was never given the URL or access to it. I removed 
the node from the console and the node normalized. It’s too bad the logs don’t 
signal the condition, but it probably seems odd that our nodes aren’t reporting 
out to the console en masse. We will be using the console in the future.

Thanks for the feedback.  Great Community!

-- 
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/-/fVb1jpbghx0J.
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] Hiera with Yaml and Json backend does not seem to work for me.

2012-06-06 Thread Steven Truong
Dear all,

I tried to use both yaml and json backends because some of my users
might not know Yaml.  However, when I ran hiera from the CLI, I could
only retrieve things from YAML and not in JSON.  The objects in JSON
are not overlapped with those in YAML.  I could retrieve all objects
when I ran YAML or JSON alone.

Is it possible to use both YAML and JSON as Hiera's backends? Or just
JSON + puppet or YAML + puppet or MySQL/Redis + puppet? Is Puppet
backend required as the second tier?

Thanks,
Steven.

cat hiera.yaml
---
:backends:
   - yaml
   - json

:hierarchy: - %{operatingsystem}
- common
:yaml:
:datadir: /etc/puppet/hierayaml_data

:json:
:datadir: /etc/puppet/hierajson_data


ls hiera*data
hierajson_data:
common.json

hierayaml_data:
common.yaml  Ubuntu.yaml

-- 
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] Duplicate package resource solutions?

2012-06-06 Thread Ryan Bowlby
Hi Guys,

I searched through the forum and found a few related threads but no clear 
puppet sanctioned solution. We have several modules that require the same 
package, for example rsync or gcc. We usually solve these conflicts by 
making that package a standalone module. We don't want to have modules 
exist for the sole purpose of installing gcc. Initially we had a 
development-tools module that installed the RH equivalent of the 
Development Tools yum group. In some cases only a third of the packages 
were truly required, so this solution seems suboptimal.

What would be the downside of creating a module called common-packages 
which would become the central location for simple packages (no 
daemon/service, etc)? Declare all the packages within the common-packages 
class as virtual resources. Then each module can feed off that class for 
the individual packages it requires. This would solve the problem caused by 
multiple identical package resources being defined throughout modules.

class  common-packages {

@package { rsync:
ensure = present,
}

...
}

class somemodule {
include common-packages
realize(Package[rsync])

...
}

We obviously would create individual modules for packages that require any 
advanced logic: apache, tomcat, etc. What would be the downside to doing 
this?

Thanks,
Ryan

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