Re: [Puppet Users] ReportEvent() failed: The parameter is incorrect. Error

2013-10-08 Thread Josh Cooper
Hi Bill,


On Thu, Oct 3, 2013 at 1:40 PM, Bill Stephens wrote:

> I'm getting this error on a windows server when it's trying to compare 2
> files using gnuwin32 diff.exe.
>
> Debug: Executing 'C:\GnuWin32\bin\diff -u
> d:/AICS.CLAIMS.new/ASPX/App.config C:/
> Users/BSTEPH~1/AppData/Local/Temp/2/puppet-file20131003-4508-11k0jfs'
>
> Error: /Stage[main]/Claims/File[d:/AICS.CLAIMS.new/ASPX/App.config]: Could
> not e
> valuate: ReportEvent() failed: The parameter is incorrect.
>
>
Can you try running that with `--debug --trace`. Puppet is trying to write
the diff to the Application Event Log and the ReportEvent api is failing.
Presumably it doesn't like something in the diff content.


> However, when I try it comparing to a backup copy of the file, the diff is
> executing correctly:
>
> C:\Program Files (x86)\Puppet Labs\Puppet\bin>C:\GnuWin32\bin\diff -u d:/
> AICS.CL
> AIMS.new/ASPX/App.config d:/AICS.CLAIMS/ASPX/App.config
> --- d:/AICS.CLAIMS.new/ASPX/App.config  2013-10-03 14:06:15.400645000 -0500
> +++ d:/AICS.CLAIMS/ASPX/App.config  2013-10-01 01:21:56.0 -0500
> @@ -1,4 +1,4 @@
> -
> +
>  http://schemas.microsoft.com/.NetConfiguration/v2.0
> ">
>
>   type="AICS.ARCHITECTURE.SERVICES.CONFIGURA
> TION.AICSConfigurationHandler,AICS.ARCHITECTURE.SERVICES"/>
>
> Any ideas what the issue might be?
>

>  --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>


Josh

-- 
Josh Cooper
Developer, Puppet Labs

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: FW: parameters to a defined type from the puppet console

2013-10-08 Thread Paul Tötterman

>
> I can't use the same class with different parameters for the same node


Classes can only be declared once per node. If you want multiple somethings 
per node, you need defined types.

Would something like this work?

define foo($param) {
  notice { $param: }
}

node example {
  foo { 'test1': }
  foo { 'test2': }
}

Cheers,
Paul

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] FW: parameters to a defined type from the puppet console

2013-10-08 Thread AMARASINGHAM, Chandra
Hi,



Sorry I just saw my email and saw a typoit should be re-written to include



I can't use the same class with different parameters for the same node



Any ideasor a way around this?



Chandra


From: puppet-users@googlegroups.com [puppet-users@googlegroups.com] on behalf 
of AMARASINGHAM, Chandra
Sent: Tuesday, 8 October 2013 5:59 PM
To: puppet-users@googlegroups.com
Subject: [Puppet Users] parameters to a defined type from the puppet console


Hi,



I would like to use a defined type and enter parameters from the puppet 
console.  So far I can only use defined types in a class because the puppet 
console only seems to allow assigning configuration via classes.  This means 
that I can use the same class with different parameters for the same 
node...which is why I wanted to use a defined type.  Is there any way around 
this?



Kind Regards

Chandra

--
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Installing ActiveRecord fails

2013-10-08 Thread ytmp123
Hello guys,

When I try to execute this: 
"gem install activerecord"

Then I get the error message: 
"Error installing activerecord. ERROR: Failed to build gem native extension"

I'm using:
Ubuntu 12.10
Ruby 1.9.3p194
Puppet 2.7.18

Can you give me some hint how to solve this problem?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Force Fact within manifest

2013-10-08 Thread Paul Oyston
I'm really only wanting an up to date set of facts once the puppet agent 
has finished making changes to the system, I'm not wanting to modify the 
catalog run process by modifying facter values during the run process. I'm 
aware that the facts are evaluated and the manifests compiled at the 
beginning of the agent run. 

It's simply a matter of PuppetDB not containing the most up to date facts 
once that catalog has been completed.

In the simplest possible example you might push a fact using pluginsync 
that checks if mongo is installed, at the start of the puppet agent run the 
fact is pulled in and evaluated to be false. The manifests then go away and 
make changes to that node, it installs mongo. The puppet agent then 
finishes, if you ran the fact on the system now it would return true, but 
the puppet master still contains false because it was only evaluated at the 
start. You then can't rely on the PuppetDB information until the puppet 
agent runs again which could be another hour from the first run, then 
another period of time before other nodes pick up on this new fact value.

What you explained about using Exec (in actuality I'm querying PuppetDB 
using puppetdbquery) is exactly what I'm wanting to do and have nodes 
perform actions based on the facts about other nodes stored in PuppetDB.

As I say though, I've already provided a workaround by having a postrun 
script that updates the facts using "puppet facts upload", I just need to 
do some additional checking to see if there were actually changes in the 
run and then only update the facts if there were changes.

On Tuesday, 8 October 2013 20:27:34 UTC+1, jcbollinger wrote:
>
>
>
> On Tuesday, October 8, 2013 4:31:17 AM UTC-5, Paul Oyston wrote:
>>
>> Hi Wolf,
>>
>> Thanks for that diagram, that's incredibly helpful.
>>
>> It seems a bit of an oversight not to allow facts to be updated during 
>> the manifest phase since manifests are making changes to the system and 
>> therefore potentially modifying facts during their run.
>>
>
>
> You need to better understand the operational model.  Puppet evaluates the 
> manifests provided to it in light of a target node identity and a set of 
> facts to compute, all in advance, details of the desired state of the 
> target node.  The result is packaged in a compiled form -- a catalog -- and 
> handed off to the client-side Puppet runtime for those computed state 
> details to be ensured.
>
> Puppet uses fact values only during catalog compilation, before it changes 
> anything about the target node.  They can be interpolated into resource 
> properties, such as file names or content, but their identity is thereby 
> lost.  Changing or setting fact values in PuppetDB during catalog 
> application will not have any effect on the catalog application process, 
> except that in principle you could apply Exec resources that perform 
> PuppetDB queries and do something dependent on the result.
>
>  
>
>> I might look into modifying the agent run so that facts can be updated 
>> during the manifest phase using a custom function of some description.
>>
>
>
> Puppet functions run during catalog compilation, not during catalog 
> application, so that particular approach wouldn't work.  Even if you could 
> make it work, you could not thereby modify the catalog run during catalog 
> application.
>
> These are not the hooks you're looking for.
>  
>
> John
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Facter incorrectly detecting Virtual status on Windows VM

2013-10-08 Thread Jason Harmon
Ran into a problem with Facter on a Windows 2008 R2 system running on a 
proxmox server.  
Facter reports the machine as being physical.  
This is due to the WMI query used in the virtual.rb file is being return 
"Bochs" as the Manufacturer and Model.

Adding an additional "When" statement to the Ruby file (virtual.rb) 
corrected the check coming back as physical.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Re: [windows server 2008 r2] puppet errors in 3.3.0 on exchange database servers

2013-10-08 Thread Jason Harmon
I have the same type of setup with MSCS running in a virtual environment.
The change to the windows.rb file fixed my facter problem as well.
puppet agent --test now completes on the machines now.

On Friday, 4 October 2013 06:13:23 UTC-6, Ethan Brown wrote:
>
> Christian - 
>
> Thanks a bunch for taking the time out to verify this.  While we believed 
> our fix was correct, I was trying to replicate your network configuration 
> internally to be absolutely certain.  I was having difficulty getting the 
> virtual machines configured properly with respect to the 'Microsoft 
> Failover Cluster Virtual Adapter', so it's fantastic to hear that you were 
> able to verify this directly in your environment.
>
>
>
> On Fri, Oct 4, 2013 at 6:00 AM, Christian Koep 
> > wrote:
>
>> Hi Rob,
>> i just applied the changes to the windows.rb file.
>>
>> The catalog run finished as usual. Thank you ;-)
>>
>>
>>
>> On Thu, Oct 3, 2013 at 8:47 PM, Rob Reynolds 
>> 
>> > wrote:
>>
>>> This verifies for us that this is a gating issue. 
>>>
>>> Would you feel comfortable helping us verify that we've fixed this issue 
>>> for you?
>>>
>>>
>>> https://github.com/ferventcoder/facter/blob/874a5a96ac5fa778c50f1e93424850022b1756cf/lib/facter/util/ip/windows.rb#L46-L47
>>>
>>>
>>>
>>>
>>> On Thu, Oct 3, 2013 at 1:42 PM, Christian Koep 
>>> 
>>> > wrote:
>>>
 Yes, thats all i got from *facter --trace --debug*


 On Thu, Oct 3, 2013 at 8:41 PM, Rob Reynolds 
 
 > wrote:

> Was this the entire log (minus anything you feel sensitive)?
>
>
> On Thu, Oct 3, 2013 at 1:15 PM, cko >wrote:
>
>> https://gist.github.com/anonymous/6814400
>>
>>
>> On Thursday, October 3, 2013 5:23:05 PM UTC+2, Rob Reynolds wrote:
>>
>>> You should be able to run 
>>>
>>> facter --trace --debug
>>>
>>>
>>> On Wed, Oct 2, 2013 at 5:18 PM, cko  wrote:
>>>
 Hi Ethan,

 what's the exact command that i would have to use? 


 On Wednesday, October 2, 2013 11:35:29 PM UTC+2, Ethan Brown wrote:

> Christian - 
>
> I'm doing the final verification of our fix, and was hoping that I 
> could get the output from Facter run by itself?
>
>
>
> On Fri, Sep 20, 2013 at 1:36 PM, Rob Reynolds  > wrote:
>
>>  I would say with all of this in mind we move forward with a fix 
>> where we look to see that the network adapter itself is also 
>> enabled. This 
>> is laid out in the ticket that I noted earlier.
>>  
>>
>> On Fri, Sep 20, 2013 at 7:44 AM, Rich Siegel 
>> wrote:
>>
>>>  Exchange DAG is essentially a cluster and the adapter in 
>>> question the dag ip.
>>>
>>> My guess is the logic for adapters should be modded for when 
>>> netconnectionid is not null.
>>>
>>> In general don't try to mess with hidden adapters on dags unless 
>>> you understand ramifications.
>>>
>>> --
>>> You received this message because you are subscribed to the 
>>> Google Groups "Puppet Users" group.
>>> To unsubscribe from this group and stop receiving emails from 
>>> it, send an email to puppet-users...@googlegroups.com.
>>> To post to this group, send email to puppet...@googlegroups.com.
>>>
>>> Visit this group at http://groups.google.com/group/puppet-users.
>>> For more options, visit https://groups.google.com/groups/opt_out
>>> .
>>>
>>
>>
>>
>> -- 
>> Rob Reynolds
>> Developer, Puppet Labs
>>
>> Join us at PuppetConf 2014, September 23-24 in San Francisco
>>  -- 
>> You received this message because you are subscribed to the 
>> Google Groups "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, 
>> send an email to puppet-users...@googlegroups.com.
>> To post to this group, send email to puppet...@googlegroups.com.
>>
>> Visit this group at http://groups.google.com/group/puppet-users.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> -- 
> --
> Ethan Brown
> et...@puppetlabs.com
> Software Engineer
>
> *Join us at PuppetConf 2014, September 23-24 in San Francisco*
>  
 -- 
 You received this message because you are subscribed to the Google 
 Groups "Puppet Users" group.
 To unsubscribe from this group and stop receiving emails from it, 
 send an email to puppet-users...@googlegroups.com.
 To post to this group, send email to puppet...@googlegroups.com.
 Visit this group at http://groups.google

[Puppet Users] SSL Certificate expiration on Load Balancer

2013-10-08 Thread Zane Williamson
Greetings,

I am not sure what the best steps are to replace an SSL ceritificate that 
has expired on the load balancer that the puppet agents use.

setup:  agent ---> loadbalancer w/ SSL Cert port 8140 --->  2 master 
systems with shared SSL directory on nfs.


Here is what the puppet.conf looks like:

[main]
vardir = /var/puppet
logdir = /var/log/puppet
rundir = /var/run/puppet
ssldir = /etc/puppet/ssl
confdir = /etc/puppet
environment = production
pluginsync = true
factpath = $vardir/lib/facter
server = puppet.domain.net

[agent]
classfile = $vardir/classes.txt
localconfig = $vardir/localconfig
ca_port = 8140
puppetport = 18139
authconfig = /etc/puppet/namespaceauth.conf
report = true
libdir = $vardir/agent_lib

[production]
modulepath = /etc/puppet/modules-prod

[staging]
modulepath = /etc/puppet/modules-stage

[integration]
modulepath = /etc/puppet/modules-int
trace = true

[master]
dbmigrate = true
masterport = 8140
storeconfigs = true
ssl_client_header = HTTP_X_SSL_SUBJECT
node_terminus = plain
environments = production,staging,integration
certname = puppet.domain.net
server = puppet.domain.net
confdir = /etc/puppet
ssldir = /nfs/puppet/ssl
config = /etc/puppet/puppet.conf
modulepath = /etc/puppet/modules-prod

storeconfigs_backend = puppetdb

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Trying to get an mcollective module that works with ssl and doesn't use guest users

2013-10-08 Thread Ramin K

On 10/8/2013 1:22 PM, David Griffith wrote:

For several months I've been tearing my hair out trying to get Puppet to
install mcollective such that it talks with rabbitmq over SSL.  No
modules have worked.  A couple days ago I noticed a new module from
Puppetlabs.  I tried this and it doesn't work either.  Just starting out
with this:

node 'sleepy.foobar.com' {
   class { '::mcollective':
 middleware   => true,
 middleware_hosts => [ 'sleepy.foobar.com'],
   }
   mcollective::user { 'joe':
 certificate => '/home/joe/keys/joe_cert.pem',
 private_key => '/home/joe/keys/joe_key.pem',
   }
}

This fails with this complaint:

Error: Execution of '/usr/bin/apt-get -q -y -o
DPkg::Options::=-force-confold install ssl-certs' returned 100: Reading
package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package ssl-certs

Problem: there is no such package as ssl-certs in Ubuntu 12.04 or Debian
7.0, or Centos 6.

Can someone recommend ANY module anywhere that works as I state in the
first sentence?


http://packages.ubuntu.com/source/precise-updates/ssl-cert

ssl-cert seems to exist for me. And appears in the standard repos.

rdk@ops01.office ~ $ apt-cache policy ssl-cert
ssl-cert:
  Installed: 1.0.28ubuntu0.1
  Candidate: 1.0.28ubuntu0.1
  Version table:
 *** 1.0.28ubuntu0.1 0
500 mirror://mirrors.ubuntu.com/mirrors.txt/ 
precise-updates/main amd64 Packages
500 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main 
amd64 Packages

100 /var/lib/dpkg/status
 1.0.28 0
500 mirror://mirrors.ubuntu.com/mirrors.txt/ precise/main amd64 
Packages
500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 
Packages


I recall from the IRC channel that several months ago you had a number 
of problems defining your repos properly. You might start there.


Ramin

--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Trying to get an mcollective module that works with ssl and doesn't use guest users

2013-10-08 Thread David Griffith
For several months I've been tearing my hair out trying to get Puppet to 
install mcollective such that it talks with rabbitmq over SSL.  No modules 
have worked.  A couple days ago I noticed a new module from Puppetlabs.  I 
tried this and it doesn't work either.  Just starting out with this:

node 'sleepy.foobar.com' {
  class { '::mcollective':
middleware   => true,
middleware_hosts => [ 'sleepy.foobar.com'],
  }
  mcollective::user { 'joe':
certificate => '/home/joe/keys/joe_cert.pem',
private_key => '/home/joe/keys/joe_key.pem',
  }
}

This fails with this complaint:

Error: Execution of '/usr/bin/apt-get -q -y -o 
DPkg::Options::=-force-confold install ssl-certs' returned 100: Reading 
package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package ssl-certs

Problem: there is no such package as ssl-certs in Ubuntu 12.04 or Debian 
7.0, or Centos 6.

Can someone recommend ANY module anywhere that works as I state in the 
first sentence?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] seperating current puppet dashboard from puppet master

2013-10-08 Thread rmarque
I am a puppet newb
Looking for a how to on seperating the dashboard from the puppet master. I 
currently have the latest dashboard installed on second server but using 
the same certs as the master.
I am using apache virtualserver with port 80 on the master to send the 
reports to the dashboard server. I am not getting any reports to the 
dashboard.

What do I need to provide?
Where can I find a how to on doing this?
What are some gotchas I need to look out for?


-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Force Fact within manifest

2013-10-08 Thread jcbollinger


On Tuesday, October 8, 2013 4:31:17 AM UTC-5, Paul Oyston wrote:
>
> Hi Wolf,
>
> Thanks for that diagram, that's incredibly helpful.
>
> It seems a bit of an oversight not to allow facts to be updated during the 
> manifest phase since manifests are making changes to the system and 
> therefore potentially modifying facts during their run.
>


You need to better understand the operational model.  Puppet evaluates the 
manifests provided to it in light of a target node identity and a set of 
facts to compute, all in advance, details of the desired state of the 
target node.  The result is packaged in a compiled form -- a catalog -- and 
handed off to the client-side Puppet runtime for those computed state 
details to be ensured.

Puppet uses fact values only during catalog compilation, before it changes 
anything about the target node.  They can be interpolated into resource 
properties, such as file names or content, but their identity is thereby 
lost.  Changing or setting fact values in PuppetDB during catalog 
application will not have any effect on the catalog application process, 
except that in principle you could apply Exec resources that perform 
PuppetDB queries and do something dependent on the result.

 

> I might look into modifying the agent run so that facts can be updated 
> during the manifest phase using a custom function of some description.
>


Puppet functions run during catalog compilation, not during catalog 
application, so that particular approach wouldn't work.  Even if you could 
make it work, you could not thereby modify the catalog run during catalog 
application.

These are not the hooks you're looking for.
 

John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] puppet module

2013-10-08 Thread John
I need to write a puppet SSHD module that does the following:

First I have 5 different operating systems to install to: Red Hat, Free 
BSD, AIX, Ubuntu, and SuSE.

The second requirements:

If the host file contains an entry of host-A.domain.com (for example) then 
I need ssh-config1 installed.

If the host file contains an entry of host-B.domain.com then I need 
ssh_config2 installed.

If there is an entry in hosts for host-C.domain.com then I need ssh_config3 
installed.

Is there a sample SSH module that has such parameters, or can someone 
provide a generic template to follow such requirements?

Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] 'puppet storeconfigs export' killed

2013-10-08 Thread Roger Torrentsgenerós

Hi,

I currently have a MySQL database containing all Puppet storeconfigs. My 
intention is to migrate to PuppetDB on a PostgreSQL server, so the first 
step is to use the 'storeconfigs' face to export all the DB to a file 
PuppetDB can later consume. But the 'puppet storeconfigs export' command 
always ends up being killed, I suspect due to some sort of OOM issue. I 
have tried different environments, different Puppet / Ruby / whatever 
versions, different hardware... No matter what, it always ends up the same.

The process starts well, connects to the database and fetches all the data, 
but then it seems to get stuck after this output line:
Info: Connecting to mysql2 database: puppet

Meanwhile, a CPU is working and the amount of memory used by this process 
increases constantly. I have tried on several servers, one with up to 28GB 
of RAM, and it died the same way.

Here are the facts of my last attempt:

The execution output:

[root@ST-L226-ROGTORG ~]# time puppet storeconfigs --verbose --debug export
Debug: Using settings: adding file resource 'confdir': 
'File[/etc/puppet]{:path=>"/etc/puppet", :ensure=>:directory, 
:loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'vardir': 
'File[/var/lib/puppet]{:path=>"/var/lib/puppet", :ensure=>:directory, 
:loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Failed to load library 'ldap' for feature 'ldap'
Debug: Puppet::Type::User::ProviderLdap: feature ldap is missing
Debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dsimport 
does not exist
Debug: Puppet::Type::User::ProviderPw: file pw does not exist
Debug: Puppet::Type::User::ProviderUser_role_add: file roleadd does not 
exist
Debug: Failed to load library 'ldap' for feature 'ldap'
Debug: Puppet::Type::Group::ProviderLdap: feature ldap is missing
Debug: Puppet::Type::Group::ProviderDirectoryservice: file /usr/bin/dscl 
does not exist
Debug: Puppet::Type::Group::ProviderPw: file pw does not exist
Debug: Using settings: adding file resource 'logdir': 
'File[/var/log/puppet]{:path=>"/var/log/puppet", :mode=>"750", 
:owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, 
:links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'statedir': 
'File[/var/lib/puppet/state]{:path=>"/var/lib/puppet/state", :mode=>"1755", 
:ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'rundir': 
'File[/var/run/puppet]{:path=>"/var/run/puppet", :mode=>"755", 
:owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, 
:links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'libdir': 
'File[/var/lib/puppet/lib]{:path=>"/var/lib/puppet/lib", 
:ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'certdir': 
'File[/var/lib/puppet/ssl/certs]{:path=>"/var/lib/puppet/ssl/certs", 
:owner=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, 
:backup=>false}'
Debug: Using settings: adding file resource 'ssldir': 
'File[/var/lib/puppet/ssl]{:path=>"/var/lib/puppet/ssl", :mode=>"771", 
:owner=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, 
:backup=>false}'
Debug: Using settings: adding file resource 'publickeydir': 
'File[/var/lib/puppet/ssl/public_keys]{:path=>"/var/lib/puppet/ssl/public_keys",
 
:owner=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, 
:backup=>false}'
Debug: Using settings: adding file resource 'requestdir': 
'File[/var/lib/puppet/ssl/certificate_requests]{:path=>"/var/lib/puppet/ssl/certificate_requests",
 
:owner=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, 
:backup=>false}'
Debug: Using settings: adding file resource 'privatekeydir': 
'File[/var/lib/puppet/ssl/private_keys]{:path=>"/var/lib/puppet/ssl/private_keys",
 
:mode=>"750", :owner=>"puppet", :ensure=>:directory, :loglevel=>:debug, 
:links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'privatedir': 
'File[/var/lib/puppet/ssl/private]{:path=>"/var/lib/puppet/ssl/private", 
:mode=>"750", :owner=>"puppet", :ensure=>:directory, :loglevel=>:debug, 
:links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'manifestdir': 
'File[/etc/puppet/manifests]{:path=>"/etc/puppet/manifests", 
:ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'masterhttplog': 
'File[/var/log/puppet/masterhttp.log]{:path=>"/var/log/puppet/masterhttp.log", 
:mode=>"660", :owner=>"puppet", :group=>"puppet", :ensure=>:file, 
:loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'bucketdir': 
'File[/var/lib/puppet/bucket]{:path=>"/var/lib/puppet/bucket", 
:mode=>"750", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, 
:loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using se

Re: [Puppet Users] Puppet.3.3.0.msi Package Failed to Install

2013-10-08 Thread chengkai liang
The error I post was related to MSI package installation, and I haven't even 
been able to successfully execute msiexec /qn /i ... to install PE 3.0

On Oct 6, 2013, at 3:28 PM, chengkai liang  wrote:

> I will see if that version fix the problem.
> 
> On Oct 6, 2013, at 11:16 AM, Rob Reynolds  wrote:
> 
>> Chengkai,
>>  I'm not seeing the error message. But let me ask this question - are you 
>> attempting to install on a non en-US machine? If so, we just fixed a nasty 
>> bug that had errors with starting the agent service (something that is done 
>> during installation). https://projects.puppetlabs.com/issues/22493
>> 
>> This just went into v 3.3.1-rc3 release. If your error was similar to the 
>> one in the link above, when 3.3.1 releases it should resolve this issue.
>> 
>> If this is not your issue, please attach your error for further inspection. 
>> 
>> Thanks!
>> 
>> 
>> On Fri, Oct 4, 2013 at 9:12 AM, chengkai liang  wrote:
>>  I have download recent version puppet.3.3.0.msi from PuppetLab and trying 
>> to install it on Windows 7.  The MSI package throws out the following error 
>> message,
>> 
>> 
>> 
>> This also happen on Puppet enterprise MSI package.  So I wonder if anybody 
>> encounter this problem, and what's the solution for it?
>> 
>> Thanks,
>> Chengkai
>> 
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to puppet-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to puppet-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/puppet-users.
>> For more options, visit https://groups.google.com/groups/opt_out.
>> 
>> 
>> 
>> -- 
>> Rob Reynolds
>> Developer, Puppet Labs
>> 
>> Join us at PuppetConf 2014, September 23-24 in San Francisco
>> 
>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "Puppet Users" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/puppet-users/kWt1ll3zYic/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> puppet-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to puppet-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/puppet-users.
>> For more options, visit https://groups.google.com/groups/opt_out.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Puppet Dynamic Environments Setup

2013-10-08 Thread chengkai liang
It seems that instead of add the following line in [master], they have to be in 
[agent] for dynamic environment to work.  So the document does not reflect what 
PE 3.x is.

On Oct 8, 2013, at 7:52 AM, wilddog64  wrote:

> So I follow this document to setup the puppet dynamic environment, and my 
> puppet.conf for dynamic environment settings looks like this,
> 
> # Setup dynamic environments with R10k
> environment = production
> manifest= $confdir/environments/$environment/manifests/default.pp
> modulepath  = 
> $confdir/environments/$environment/modules:$confdir/environments/$environment/dist:/opt/puppet/share/puppet/modules/
> 
> I used r10k to deploy environments to /etc/puppetlabs/puppet/environments, 
> and it looks like this,
> 
> /etc/puppetlabs/puppet/environments
> └── atlassian_automation
> ├── manfests
> └── modules
> ├── apache_config
> ├── concat
> ├── custom_facts
> ├── firewall
> ├── hiera-config
> ├── inifile
> ├── iptables
> ├── ntp
> ├── stdlib
> └── vision_config
> 
> Now I have a node that registered to this puppet master, and I triggered an 
> agent like this,
> 
> puppet agent -t --environment atlassian_automation
> 
> While there are some catalogs being synced down to the node, the custom 
> modules I wrote above do not get copied over to my node.  I check the 
> puppetmaster.access.log at /var/log/pe-httpd, and I saw these lines,
> 
> 10.10.20.55 - - [08/Oct/2013:07:46:35 -0700] "GET 
> /atlassian_automation/file_content/plugins/facter/apache_info.rb HTTP/1.1" 
> 200 329
> 10.10.20.55 - - [08/Oct/2013:07:46:35 -0700] "GET 
> /atlassian_automation/file_content/plugins/facter/mysql_jdbc_info.rb 
> HTTP/1.1" 200 756
> 10.10.20.55 - - [08/Oct/2013:07:46:35 -0700] "GET 
> /atlassian_automation/file_content/plugins/facter/concat_basedir.rb HTTP/1.1" 
> 200 220
> 10.10.20.55 - - [08/Oct/2013:07:46:35 -0700] "GET 
> /atlassian_automation/file_content/plugins/facter/concat_basedir.rb HTTP/1.1" 
> 200 220
> 10.10.20.55 - - [08/Oct/2013:07:46:35 -0700] "GET 
> /atlassian_automation/file_content/plugins/puppet/util/firewall.rb HTTP/1.1" 
> 200 5982
> 10.10.20.55 - - [08/Oct/2013:07:46:35 -0700] "GET 
> /atlassian_automation/file_content/plugins/puppet/util/firewall.rb HTTP/1.1" 
> 200 5982
> 10.10.20.55 - - [08/Oct/2013:07:46:35 -0700] "GET 
> /atlassian_automation/file_content/plugins/puppet/provider/firewall/iptables.rb
>  HTTP/1.1" 200 11225
> 10.10.20.55 - - [08/Oct/2013:07:46:35 -0700] "GET 
> /atlassian_automation/file_content/plugins/puppet/provider/firewall/iptables.rb
>  HTTP/1.1" 200 11225
> 10.10.20.55 - - [08/Oct/2013:07:46:36 -0700] "GET 
> /atlassian_automation/file_content/plugins/facter/php_info.rb HTTP/1.1" 200 
> 737
> 10.10.20.55 - - [08/Oct/2013:07:46:36 -0700] "GET 
> /atlassian_automation/file_content/plugins/puppet/type/firewall.rb HTTP/1.1" 
> 200 22694
> 10.10.20.55 - - [08/Oct/2013:07:46:37 -0700] "GET 
> /atlassian_automation/file_content/plugins/puppet/type/firewall.rb HTTP/1.1" 
> 200 22694
> 10.10.20.55 - - [08/Oct/2013:07:46:40 -0700] "POST 
> /atlassian_automation/catalog/chillyhilly.local HTTP/1.1" 200 25398
> 10.10.20.55 - - [08/Oct/2013:07:46:42 -0700] "GET 
> /atlassian_automation/file_metadatas/modules/pe_mcollective/plugins?links=manage&recurse=true&&&checksum_type=md5
>  HTTP/1.1" 200 20592
> 10.10.20.55 - - [08/Oct/2013:07:46:43 -0700] "PUT 
> /atlassian_automation/report/chillyhilly.local HTTP/1.1" 200 26
> 10.10.20.55 - - [08/Oct/2013:07:46:56 -0700] "GET 
> /atlassian_automation/node/chillyhilly.local? HTTP/1.1" 200 4237
> 10.10.20.55 - - [08/Oct/2013:07:46:57 -0700] "GET 
> /atlassian_automation/file_metadatas/plugins?links=manage&recurse=true&&ignore=---+%0A++-+%22.svn%22%0A++-+CVS%0A++-+%22.git%22&checksum_type=md5
>  HTT
> P/1.1" 200 50066
> 10.10.20.55 - - [08/Oct/2013:07:47:00 -0700] "POST 
> /atlassian_automation/catalog/chillyhilly.local HTTP/1.1" 200 25398
> 10.10.20.55 - - [08/Oct/2013:07:47:01 -0700] "GET 
> /atlassian_automation/file_metadatas/modules/pe_mcollective/plugins?links=manage&recurse=true&&&checksum_type=md5
>  HTTP/1.1" 200 20592
> 
> It looks like puppet master realize the dynamic environment settings, but why 
> my modules does not get down and applied?  Any thought?
> 
> Thanks,
> Chengkai
> 
> 
> 
> 
> -- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "Puppet Users" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/puppet-users/UkVUMnHvZWE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Gr

[Puppet Users] parameters to a defined type from the puppet console

2013-10-08 Thread AMARASINGHAM, Chandra
Hi,



I would like to use a defined type and enter parameters from the puppet 
console.  So far I can only use defined types in a class because the puppet 
console only seems to allow assigning configuration via classes.  This means 
that I can use the same class with different parameters for the same 
node...which is why I wanted to use a defined type.  Is there any way around 
this?



Kind Regards

Chandra

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Puppet Dynamic Environments Setup

2013-10-08 Thread wilddog64
So I follow this 
documentto 
setup the puppet dynamic environment, and my puppet.conf for dynamic 
environment settings looks like this,

# Setup dynamic environments with R10k
environment = production
manifest= $confdir/environments/$environment/manifests/default.pp
modulepath  = 
$confdir/environments/$environment/modules:$confdir/environments/$environment/dist:/opt/puppet/share/puppet/modules/

I used r10k to deploy environments to /etc/puppetlabs/puppet/environments, 
and it looks like this,

/etc/puppetlabs/puppet/environments
└── atlassian_automation
├── manfests
└── modules
├── apache_config
├── concat
├── custom_facts
├── firewall
├── hiera-config
├── inifile
├── iptables
├── ntp
├── stdlib
└── vision_config

Now I have a node that registered to this puppet master, and I triggered an 
agent like this,

puppet agent -t --environment atlassian_automation

While there are some catalogs being synced down to the node, the custom 
modules I wrote above do not get copied over to my node.  I check the 
puppetmaster.access.log at /var/log/pe-httpd, and I saw these lines,

10.10.20.55 - - [08/Oct/2013:07:46:35 -0700] "GET 
/atlassian_automation/file_content/plugins/facter/apache_info.rb HTTP/1.1" 
200 329
10.10.20.55 - - [08/Oct/2013:07:46:35 -0700] "GET 
/atlassian_automation/file_content/plugins/facter/mysql_jdbc_info.rb 
HTTP/1.1" 200 756
10.10.20.55 - - [08/Oct/2013:07:46:35 -0700] "GET 
/atlassian_automation/file_content/plugins/facter/concat_basedir.rb 
HTTP/1.1" 200 220
10.10.20.55 - - [08/Oct/2013:07:46:35 -0700] "GET 
/atlassian_automation/file_content/plugins/facter/concat_basedir.rb 
HTTP/1.1" 200 220
10.10.20.55 - - [08/Oct/2013:07:46:35 -0700] "GET 
/atlassian_automation/file_content/plugins/puppet/util/firewall.rb 
HTTP/1.1" 200 5982
10.10.20.55 - - [08/Oct/2013:07:46:35 -0700] "GET 
/atlassian_automation/file_content/plugins/puppet/util/firewall.rb 
HTTP/1.1" 200 5982
10.10.20.55 - - [08/Oct/2013:07:46:35 -0700] "GET 
/atlassian_automation/file_content/plugins/puppet/provider/firewall/iptables.rb 
HTTP/1.1" 200 11225
10.10.20.55 - - [08/Oct/2013:07:46:35 -0700] "GET 
/atlassian_automation/file_content/plugins/puppet/provider/firewall/iptables.rb 
HTTP/1.1" 200 11225
10.10.20.55 - - [08/Oct/2013:07:46:36 -0700] "GET 
/atlassian_automation/file_content/plugins/facter/php_info.rb HTTP/1.1" 200 
737
10.10.20.55 - - [08/Oct/2013:07:46:36 -0700] "GET 
/atlassian_automation/file_content/plugins/puppet/type/firewall.rb 
HTTP/1.1" 200 22694
10.10.20.55 - - [08/Oct/2013:07:46:37 -0700] "GET 
/atlassian_automation/file_content/plugins/puppet/type/firewall.rb 
HTTP/1.1" 200 22694
10.10.20.55 - - [08/Oct/2013:07:46:40 -0700] "POST 
/atlassian_automation/catalog/chillyhilly.local HTTP/1.1" 200 25398
10.10.20.55 - - [08/Oct/2013:07:46:42 -0700] "GET 
/atlassian_automation/file_metadatas/modules/pe_mcollective/plugins?links=manage&recurse=true&&&checksum_type=md5
 
HTTP/1.1" 200 20592
10.10.20.55 - - [08/Oct/2013:07:46:43 -0700] "PUT 
/atlassian_automation/report/chillyhilly.local HTTP/1.1" 200 26
10.10.20.55 - - [08/Oct/2013:07:46:56 -0700] "GET 
/atlassian_automation/node/chillyhilly.local? HTTP/1.1" 200 4237
10.10.20.55 - - [08/Oct/2013:07:46:57 -0700] "GET 
/atlassian_automation/file_metadatas/plugins?links=manage&recurse=true&&ignore=---+%0A++-+%22.svn%22%0A++-+CVS%0A++-+%22.git%22&checksum_type=md5
 
HTT
P/1.1" 200 50066
10.10.20.55 - - [08/Oct/2013:07:47:00 -0700] "POST 
/atlassian_automation/catalog/chillyhilly.local HTTP/1.1" 200 25398
10.10.20.55 - - [08/Oct/2013:07:47:01 -0700] "GET 
/atlassian_automation/file_metadatas/modules/pe_mcollective/plugins?links=manage&recurse=true&&&checksum_type=md5
 
HTTP/1.1" 200 20592

It looks like puppet master realize the dynamic environment settings, but 
why my modules does not get down and applied?  Any thought?

Thanks,
Chengkai



-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] LogStash Book released

2013-10-08 Thread Worker Bee
I have the logstash book, it is excellent! Thank you!
Do you have any in-depth Kibana documentation ?

Thanks!



On Mon, Feb 4, 2013 at 10:56 AM, James Turnbull wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hi all
>
> I've just released 'The LogStash Book' (http://www.logstashbook.com/).
> It's a new book designed for SysAdmins, Operations staff, Developers and
> DevOps who are interested in deploying a log management solution using
> the open source tool LogStash (http://www.logstash.net/).
>
> It's available for sale on the site a PDF or ePUB:
>
> http://www.logstashbook.com/
>
> Or from Amazon.com as a Kindle ebook:
>
>
> http://www.amazon.com/gp/product/B00B9JQTCO/ref=as_li_ss_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=B00B9JQTCO&linkCode=as2&tag=puppet0e-20
>
> Given the overlap between Puppet folks and LogStash users I thought it
> might interest people.
>
> Regards
>
> James
>
> - -- Author of:
> * The LogStash Book (http://logstashbook.com)
> * Pro Puppet (http://tinyurl.com/ppuppet)
> * Pro Linux System Administration (http://tinyurl.com/linuxadmin)
> * Pro Nagios 2.0 (http://tinyurl.com/pronagios)
> * Hardening Linux (http://tinyurl.com/hardeninglinux)
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQEcBAEBAgAGBQJRD9oQAAoJECFa/lDkFHAye0sH/RTxDbsWHWIhENwZNnpYjdJo
> G+wazhFEZ4Bs+siImxbBCJwlLU9y9EbkEBnooA4aWRiMIK58uGi0ptTGRbzPdW5d
> Tvk6ufqkxlV5DcuRm1iDBJQf6LTkLwd1igwcHC5tXydloW7MpZgiZUU69jL7Ldye
> UzStaGIYiSN8HR8hhRB9aaKoIrlR16hpYRkKIBDKfHvFvPa/zK/coZrklQLwl+et
> nuwaY7TYAyvtPPKnJeHPNjQqhLXxq0rYZnu1aEhwwWlViL5GQKWLEzvxbrb2geWp
> aYBDX+n3l9hqpWHrbY3SN1csOA/RoPY1YEoKaE0OYNjUOsZ58u+W7ZBNjNXtLV4=
> =8fTs
> -END PGP SIGNATURE-
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Force Fact within manifest

2013-10-08 Thread Paul Oyston
For anyone else wanting to do something similar:

For now I've just used the postrun_command on the puppet agents so that the 
facts will be uploaded to the server once modifications have been made.

e.g. postrun_command "puppet facts upload"

This will then re-upload the facts once the puppet agent has run, giving it 
the most up to date information for anything querying PuppetDB. I really 
cannot understand for the life of me why this isn't the default 
functionality, it seems ludicrous that a tool designed to report facts back 
to the master would have out of date information once puppet has modified 
the system.

On Tuesday, 8 October 2013 10:31:17 UTC+1, Paul Oyston wrote:
>
> Hi Wolf,
>
> Thanks for that diagram, that's incredibly helpful.
>
> It seems a bit of an oversight not to allow facts to be updated during the 
> manifest phase since manifests are making changes to the system and 
> therefore potentially modifying facts during their run. I might look into 
> modifying the agent run so that facts can be updated during the manifest 
> phase using a custom function of some description.
>
> I was looking into calling exec to use "puppet facts upload". But this for 
> some reason errors out during the puppet run even after auth.conf has been 
> modified to allow the save call from nodes, it does work directly on the 
> command line though which I assume is something to do with a lock or 
> environment variable that differs during the agent run.
>
> On Monday, 7 October 2013 15:36:01 UTC+1, Wolf Noble wrote:
>>
>> Hi Paul,
>>
>> Here's a diagram showing how the puppet run process flows:
>> http://www.aosabook.org/images/puppet/TimingDiagram.png
>>
>> as you can see, facter is run exactly once, before the catalog is created.
>>
>> facter is not invoked again until the next run. I suppose you could have 
>> your sshkey resource notify the puppet service, which would subsequently 
>> trigger another run.
>>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Re: Still no nagios joy

2013-10-08 Thread David Thompson

On 10/4/13 1:39 PM, Deepak Giridharagopal wrote:


So, "puppet agent --test --environment production" fails to create
resources findable via REST (and in fact removes them if they're
present), but "puppet apply foo.pp" (with foo.pp containing the
statements above) makes them findable (and they show up in
nagios_hosts.cfg on the nagios server).


PuppetDB will only return resources for nodes which it haven't been
marked inactive...is it possible that's happened for some of your nodes?
Hitting http://localhost:8080/v2/nodes on your puppetdb server should
dump out everything puppetdb knows about your hosts, including when they
were deactivated (or null if they've not been deactivated).


All the nodes show up via the URL above with null deactivation dates.

--
David Thompson
Waisman Center Brain Imaging and Behavior Lab
1500 Highland Ave. Room T133
Madison, WI  53705-2280
(608) 265-6608
dthompson (at) waisman (dot) wisc (dot) edu

--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: user management define once an add if required on server

2013-10-08 Thread Andreas Dvorak
Hi,

there is a problem

If I want to add a second user with the same group to the same server I get 
this error:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Duplicate declaration: Group[baader] is already declared in file 
/etc/puppet/git/modules/accounts/manifests/virtual.pp at line 7; cannot 
redeclare on node vm6741.muc.baag
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

How can I solve this?

Andreas

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] user management define once an add if required on server

2013-10-08 Thread Andreas Dvorak
Hi Johan,

thank you for the hint with virtual resources.
Here is my solution

cat init.pp 
class accounts {
   @accounts::virtual {'test1': 
  comment => "test1",
  uid => "1056",
  gid => "880",
  group => "baader",
  shell => "/bin/bash",
  password => '$1$6hsRON8i7w5JncJDROnjh51',
  sshkeytype => "rsa",
  sshkey => "",
   }

   @accounts::virtual {'test2':
  comment => "test2",
  uid => "1058",
  gid => "880",
  group => "baader",
  shell => "/bin/bash",
  password => '$1$RuV4YCYT$KXDWuNtU9B1',
  sshkeytype => "rsa",
  sshkey => "",
   }
}

cat virtual.pp 
define accounts::virtual ( $comment, $uid, $group, $gid, $password, $shell, 
$sshkeytype, $sshkey) {
   $username = $title

   group { $group:
  gid => "$gid",
  ensure => present,
   }

   user { $username:
  ensure => present,
  comment => "$comment",
  uid => "$uid",
  gid => "$gid",
  shell => "$shell",
  home => "/home/$username",
  managehome => true,
  forcelocal => true,
  password => "$password",
  require => Group["$group"],
   }

   ssh_authorized_key { $username:
  user => "$username",
  type => "$sshkeytype",
  key => "$sshkey",
  require => User["$username"],
   }
}

node 'vm6741.muc.baag' inherits base {
   include accounts
   realize (Accounts::Virtual['test2'])
}

Best regards
Andreas


-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] user management define once an add if required on server

2013-10-08 Thread Johan De Wit

Have a look at virtual resources.  When needed, you can realize them.
The puppet cookbook has a chapter explaining this

On 10/08/2013 01:15 PM, Andreas Dvorak wrote:

Dear all

I am looking for a solution for a module to define alle possible user 
and then install the one or more user from that module if needed on a 
server, but not all of them.
My idea is something like this. Can I define a user in the nodes.pp at 
a special Server to install that user?


init.pp
class admin_user::group {
   group { "group1":
  gid => "888",
  ensure => present,
   }
}

class admin_user {
   include admin_user::group, admin_user::list
}

list.pp with many user like this

class admin_user::list {
   admin_user::useradd { "test1":
  comment => "test1",
  uid => "1032",
  gid => "888",
  shell => "/bin/bash",
  password => '$6$QMhC7iyQ$CeUQnyZRaqzUp1/jkH61SaE7gz/',
  sshkeytype => "rsa",
  sshkey => 
"B3NzaC1yc2EBIwAAA4gZcD7cxU7Yu2Gs4iL5bycu1nSb0/U4rGLe5OipRtqkwkfk93KX/i6N8=",

   }

   admin_user::useradd { "test2":
  comment => "test2",
  uid => "2012",
  gid => "888",
  shell => "/bin/bash",
  password => '$6$0vY.Ob.b$uF0JMxjptxEq9gj72KrU7CqB7ez0gCt6fAB1',
  sshkeytype => "rsa",
  sshkey => 
"B3NzaC1yc2EAA/QtjZcPsaAhdZMsNU9xJ0Hb1VX3+vaAX1pA4F1Lq87ZBrZxrTS2F0G7hHJDffhqwlYoWfl1755hWeNeNZWQBcF"

   }
}

and useradd.pp
define admin_user::useradd ( $comment, $uid, $group, $gid, $password, 
$shell, $sshkeytype, $sshkey) {

   include admin_user::group
   $username = $title

   user { $username:
  ensure => present,
  comment => "$comment",
  uid => "$uid",
  gid => "$gid",
  shell => "$shell",
  home => "/home/$username",
  managehome => true,
  forcelocal => true,
  password => "$password",
  require => Group["baaderadm"],
   }

   ssh_authorized_key { $username:
  user => "$username",
  type => "$sshkeytype",
  key => "$sshkey",
  require => User["$username"],
   }
}

nodes.pp

node 'vm6742.muc.baag' inherits base {
   $user = "test1"
   include jre17_32bit
}

Maybe I need to split the list.pp in separate files for every user, 
but I do not know how to request a specific user.

Maybe something like that: include addmin_user::test1

I could create a modul for every user and add it to a server, but I 
think that is not a good solution.


Best regards
Andreas

--
You received this message because you are subscribed to the Google 
Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to puppet-users+unsubscr...@googlegroups.com.

To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.



--
Johan De Wit

Open Source Consultant

Red Hat Certified Engineer (805008667232363)
Puppet Certified Professional 2013 (PCP006)
_
 
Open-Future Phone +32 (0)2/255 70 70

Zavelstraat 72  Fax   +32 (0)2/255 70 71
3071 KORTENBERG Mobile+32 (0)474/42 40 73
BELGIUM http://www.open-future.be
_
 



Next Events:
Extending Puppet Training 2013 | 
http://www.open-future.be/extending-puppet-training-8-till-11th-october
Puppet Fundamentals Training | 
http://www.open-future.be/puppet-fundamentals-training-15-till-17th-october
Puppet Advanced Training | 
https://www.open-future.be/puppet-advanced-training-12-till-14th-november
Zabbix Certified Training | 
http://www.open-future.be/zabbix-certified-training-18-till-20th-november
Zabbix Large Environments Training | 
http://www.open-future.be/zabbix-large-environments-training-21-till-22nd-november
Puppet Fundamentals Training | 
http://www.open-future.be/puppet-fundamentals-training-10-till-12th-december
Subscribe to our newsletter | http://eepurl.com/BUG8H

--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] user management define once an add if required on server

2013-10-08 Thread Andreas Dvorak
Dear all

I am looking for a solution for a module to define alle possible user and 
then install the one or more user from that module if needed on a server, 
but not all of them.
My idea is something like this. Can I define a user in the nodes.pp at a 
special Server to install that user?

init.pp
class admin_user::group {
   group { "group1":
  gid => "888",
  ensure => present,
   }
}

class admin_user {
   include admin_user::group, admin_user::list
}

list.pp with many user like this

class admin_user::list {
   admin_user::useradd { "test1":
  comment => "test1",
  uid => "1032",
  gid => "888",
  shell => "/bin/bash",
  password => '$6$QMhC7iyQ$CeUQnyZRaqzUp1/jkH61SaE7gz/',
  sshkeytype => "rsa",
  sshkey => 
"B3NzaC1yc2EBIwAAA4gZcD7cxU7Yu2Gs4iL5bycu1nSb0/U4rGLe5OipRtqkwkfk93KX/i6N8=",
   }

   admin_user::useradd { "test2":
  comment => "test2",
  uid => "2012",
  gid => "888",
  shell => "/bin/bash",
  password => '$6$0vY.Ob.b$uF0JMxjptxEq9gj72KrU7CqB7ez0gCt6fAB1',
  sshkeytype => "rsa",
  sshkey => 
"B3NzaC1yc2EAA/QtjZcPsaAhdZMsNU9xJ0Hb1VX3+vaAX1pA4F1Lq87ZBrZxrTS2F0G7hHJDffhqwlYoWfl1755hWeNeNZWQBcF"
   }
}

and useradd.pp
define admin_user::useradd ( $comment, $uid, $group, $gid, $password, 
$shell, $sshkeytype, $sshkey) {
   include admin_user::group
   $username = $title

   user { $username:
  ensure => present,
  comment => "$comment",
  uid => "$uid",
  gid => "$gid",
  shell => "$shell",
  home => "/home/$username",
  managehome => true,
  forcelocal => true,
  password => "$password",
  require => Group["baaderadm"],
   }

   ssh_authorized_key { $username:
  user => "$username",
  type => "$sshkeytype",
  key => "$sshkey",
  require => User["$username"],
   }
}

nodes.pp

node 'vm6742.muc.baag' inherits base {
   $user = "test1"
   include jre17_32bit
}

Maybe I need to split the list.pp in separate files for every user, but I 
do not know how to request a specific user.
Maybe something like that: include addmin_user::test1

I could create a modul for every user and add it to a server, but I think 
that is not a good solution.

Best regards
Andreas

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Force Fact within manifest

2013-10-08 Thread Paul Oyston
Hi Wolf,

Thanks for that diagram, that's incredibly helpful.

It seems a bit of an oversight not to allow facts to be updated during the 
manifest phase since manifests are making changes to the system and 
therefore potentially modifying facts during their run. I might look into 
modifying the agent run so that facts can be updated during the manifest 
phase using a custom function of some description.

I was looking into calling exec to use "puppet facts upload". But this for 
some reason errors out during the puppet run even after auth.conf has been 
modified to allow the save call from nodes, it does work directly on the 
command line though which I assume is something to do with a lock or 
environment variable that differs during the agent run.

On Monday, 7 October 2013 15:36:01 UTC+1, Wolf Noble wrote:
>
> Hi Paul,
>
> Here's a diagram showing how the puppet run process flows:
> http://www.aosabook.org/images/puppet/TimingDiagram.png
>
> as you can see, facter is run exactly once, before the catalog is created.
>
> facter is not invoked again until the next run. I suppose you could have 
> your sshkey resource notify the puppet service, which would subsequently 
> trigger another run.
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] rspec and overriding :facts per context

2013-10-08 Thread Johan De Wit

Hi Dan,

Thx for the tip !

Just what i was looking for.

I will delve into the spec files here, i can learn a lot of them

grts

jo

On 10/08/2013 01:25 AM, Dan Bode wrote:

I do this with params.merge! in a before block:

here is an example:

https://github.com/stackforge/puppet-openstack/blob/master/spec/classes/openstack_cinder_all_spec.rb#L61


On Mon, Oct 7, 2013 at 6:26 AM, Johan De Wit > wrote:


Hi,

I'm looking for a way to avoid repeating all necessary facts to
make the catalog compile.

I'm using the let function for passing needed facts:

Now I have to repeat all facts in every context to make it work.
 Is there a way to do something like :


describe 'x' do
  let(:facts) {{ :x => 'x',: y => 'y', .., :many => 'more' , z
=> 'z' }}

  it {}  //test using default facts

  context 'x has other value' do
let(:x) { 'overruled value' }
 > is still using  the facts :x => 'x'
  end

  context 'y has other value' do
let(:params)  {{ :y => 'overruled' }}
   => all other params are gone, only :y exists
  end
end

Only when i repeat all facts, in every context, it works as
should, but i would like tot ovoid repeating  this in every context.

Any hints on where to look for a solution are welcome.

I have looked at before(:each) .. but still no working solution

Thx

Johan

-- 
Johan De Wit


Open Source Consultant

Red Hat Certified Engineer (805008667232363)
Puppet Certified Professional 2013 (PCP006)
_
 Open-Future Phone +32 (0)2/255 70 70

Zavelstraat 72  Fax +32 (0)2/255 70 71

3071 KORTENBERG Mobile +32 (0)474/42 40 73

BELGIUM http://www.open-future.be
_

Next Events:
Extending Puppet Training 2013 |
http://www.open-future.be/extending-puppet-training-8-till-11th-october
Puppet Fundamentals Training |
http://www.open-future.be/puppet-fundamentals-training-15-till-17th-october
Puppet Advanced Training |
https://www.open-future.be/puppet-advanced-training-12-till-14th-november
Zabbix Certified Training |
http://www.open-future.be/zabbix-certified-training-18-till-20th-november
Zabbix Large Environments Training |

http://www.open-future.be/zabbix-large-environments-training-21-till-22nd-november
Puppet Fundamentals Training |
http://www.open-future.be/puppet-fundamentals-training-10-till-12th-december
Subscribe to our newsletter | http://eepurl.com/BUG8H

-- 
You received this message because you are subscribed to the Google

Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to puppet-users+unsubscr...@googlegroups.com
.
To post to this group, send email to puppet-users@googlegroups.com
.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


--
You received this message because you are subscribed to the Google 
Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to puppet-users+unsubscr...@googlegroups.com.

To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.



--
Johan De Wit

Open Source Consultant

Red Hat Certified Engineer (805008667232363)
Puppet Certified Professional 2013 (PCP006)
_
 
Open-Future Phone +32 (0)2/255 70 70

Zavelstraat 72  Fax   +32 (0)2/255 70 71
3071 KORTENBERG Mobile+32 (0)474/42 40 73
BELGIUM http://www.open-future.be
_
 



Next Events:
Extending Puppet Training 2013 | 
http://www.open-future.be/extending-puppet-training-8-till-11th-october
Puppet Fundamentals Training | 
http://www.open-future.be/puppet-fundamentals-training-15-till-17th-october
Puppet Advanced Training | 
https://www.open-future.be/puppet-advanced-training-12-till-14th-november
Zabbix Certified Training | 
http://www.open-future.be/zabbix-certified-training-18-till-20th-november
Zabbix Large Environments Training | 
http://www.open-future.be/zabbix-large-environments-training-21-till-22nd-november
Puppet Fundamentals Training | 
http://www.open-future.be/puppet-fundamentals-training-10-till-12th-december
Subscribe to our newsletter | http://eepurl.com/BUG8H

--
You received this message because you are subscribed to the 

[Puppet Users] Re: Puppet controling Network Interfaces OS:CentOS 5.x

2013-10-08 Thread Rahul Khengare
Hi James,
You can take a look on network modules present on puppet forge,
1. https://forge.puppetlabs.com/adrien/network
2. https://forge.puppetlabs.com/razorsedge/network

hope this will help.

Thanks and Regards,
Rahul Khengare,
NTTDATA OSS Center, Pune, India.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.