[Puppet Users] Re: Problem on live-management - Node list missing - User ->Find Resources not working

2013-04-04 Thread Lukas Wenning
I too am facing the same problem 

output from /var/log/pe-httpd/error.log http://pastebin.com/2x0NZUg1

Am Sonntag, 31. März 2013 00:13:00 UTC+1 schrieb Juan Pablo Baudoin:
>
> Hello
>   I'm testing Puppet Enterprise 2.7 and I'm having the following problem.
>
> When I go to live-management, the node list sometimes is missing. 
>
>
> 
>
>
> This behavior is random, but when It happend I find the following error on 
> the logs:
>
> ==> pe-httpd/error.log <==
> INFO Sat Mar 30 20:04:09 -0300 2013: memcached saving 
> ["raw_agent_inventory"] [4940e0b29c08b35a29d4e4b0c63d1304] -> 
> [[# @results={:data=>{:agents=>[{:agent=>"discovery", :license=>"Apache 
> License, Version 2", :version=>"unknown", :url=>"unknown", 
> :description=>"unknown", :name=>"discovery", :author=>"R.I.Pienaar  >", :] [3631]
> INFO Sat Mar 30 20:04:09 -0300 2013: memcached retrieving ["empty_filter"] 
> [7bc4614f5252e68308196a74a0cac980] => [nil] [3]
> Stomp::Error::NoCurrentConnection - no current connection exists:
>  /opt/puppet/lib/gems/1.8/gems/stomp-1.2.3/lib/stomp/connection.rb:334:in 
> `publish'
>  /opt/puppet/libexec/mcollective/mcollective/connector/stomp.rb:189:in 
> `send'
>  /opt/puppet/lib/site_ruby/1.8/mcollective/client.rb:65:in `sendreq'
>  /opt/puppet/lib/ruby/1.8/timeout.rb:67:in `timeout'
>
>
> When the list appears, and I try to use the "Find Resources" buton under 
> "User",  It stay wiht the message: "Finding user resources"
>
>
> 
>
>
>

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




[Puppet Users] Puppet Live Management Not Working

2013-04-04 Thread Sam Oehlert
Hi I'm new to puppet. Just installed the master and one agent. I'm having 
issues with Live Management though. Any time I try to do anything through 
there it just sits and waits for a long time and never does anything.

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




[Puppet Users] Trouble with puppetdb on ubuntu when using passenger

2013-04-04 Thread warchildwts
I am trying to get an environment setup with the following (currently two 
differenet servers):
* A puppet master running on ubuntu 12.04 with passenger
* A puppetdb server managed via puppet using postgresql (installed locally) 
on ubuntu 12.04

I have installed all of this so far using the puppetlabs repository and 
have had some amount of success, even though the tools seem to be full of 
configuration bugs (the ssl config scripts do NOT work correctly, I had to 
manually regenerate all of the certificates, keystore & truststore 
manuallually).  

After getting all of that done, I am stuck with another error when trying 
to run *puppet agent -t* on the master:
Error: /Stage[main]/Puppetdb::Master::Config/Service[puppetmaster]: Could 
not evaluate: Could not find init script or upstart conf file for 
'puppetmaster'

Since I'm using passenger, puppetdb should be trying to restart apache 
instead of puppetmaster, but I can't figure out how to tell it to use 
apache instead of puppetmaster, and have not been able to find anything in 
the documentation about how to configure this.

>From what I read, this should be a fairly normal environment that is easy 
to setup, which has been far from the truth...

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




Re: [Puppet Users] Grouping hosts for stage deployment

2013-04-04 Thread ForumUser
Hi Nathan,

I have read the this URL but one thing concerns me: what if each 
environment consists different servers (as it should be) ?
How to deal with it using git ?

On Tuesday, 2 April 2013 23:36:43 UTC+1, Nathan Valentine wrote:
>
> Hi, 
>
> You probably want to look at implementing a simple deployment pipeline 
> using Puppet environments and Git branches. Here's a URL for getting 
> started:
>
> https://puppetlabs.com/blog/git-workflow-and-puppet-environments/
>
>
>
> On Tue, Apr 2, 2013 at 9:27 AM, ForumUser 
> > wrote:
>
>> Hi all,
>>
>> I am new in puppet world so please excuse my lack of knowledge ...
>>
>> I am going to use puppet to manage our hosts but because my lack of 
>> knowledge whether I deploy configuration changes the right way
>> I would like to deploy them first on some hosts, then wait a few days, 
>> then on another group of hosts, wait a few days etc.
>> So it would be good to group all nodes into groups - something like 
>> (pseudo-code):
>>
>> group pre-testing {
>> host02.domain
>> host-other.domain
>> <... 10 other hosts ...>
>> }
>>
>> group testing {
>> host115.domain
>> host-other-10.domain
>> <... 50 other hosts ...>
>> }
>>
>> group pre-production {
>> host-spare.domain
>> <... 35 other hosts ...>
>> }
>>
>> group production {
>> host-main.domain
>> <... 135 other hosts ...>
>> }
>>
>> and then apply the change on just "pre-testing", wait a few days, apply 
>> on just "testing", wait a few days and then apply on "pre-production" etc.
>> (sort of deployment in stages).
>> I am not able to group nodes based on application running on it nor 
>> hardware architecture - the environment is mixed
>> so I need to put this particular node to this particular group etc
>>
>> How would you organise that approach in puppet ?
>>
>> Thanks in advanced
>>
>>  -- 
>> 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?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>
>
> -- 
> ---
> Nathan Valentine - nat...@puppetlabs.com 
> Puppet Labs Professional Services
> GV: 415.504.2173
> Skype: nrvale0
>
> *Join us at PuppetConf 2013, August 22-23 in San Francisco - *
> http://bit.ly/pupconf13
>  

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




Re: [Puppet Users] Trouble with puppetdb on ubuntu when using passenger

2013-04-04 Thread Ken Barber
> I have installed all of this so far using the puppetlabs repository and have
> had some amount of success, even though the tools seem to be full of
> configuration bugs (the ssl config scripts do NOT work correctly, I had to
> manually regenerate all of the certificates, keystore & truststore
> manuallually).

Did you run puppet on the host first? Its a gotcha, we use the
certificates from a previous Puppet agent run to create the JKS files
in question. Its mentioned in Step 1 here, but some people miss that
step: http://docs.puppetlabs.com/puppetdb/1.1/install_from_packages.html

> After getting all of that done, I am stuck with another error when trying to
> run puppet agent -t on the master:
> Error: /Stage[main]/Puppetdb::Master::Config/Service[puppetmaster]: Could
> not evaluate: Could not find init script or upstart conf file for
> 'puppetmaster'
>
> Since I'm using passenger, puppetdb should be trying to restart apache
> instead of puppetmaster, but I can't figure out how to tell it to use apache
> instead of puppetmaster, and have not been able to find anything in the
> documentation about how to configure this.
>
> From what I read, this should be a fairly normal environment that is easy to
> setup, which has been far from the truth...

When you initialize the puppetdb::master::config class, you should
specify the service:

class { 'puppetdb::master::config':
  puppet_service_name => 'apache2',
}

That will force it to use the 'apache2' service instead of
'puppetmaster' for the restart. There are other parameters that can be
overridden if desired, they are detailed here:
http://forge.puppetlabs.com/puppetlabs/puppetdb#usage

ken.

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




[Puppet Users] Re: [Puppet-dev] Announce: Hiera 1.2.0 Available

2013-04-04 Thread Erik Dalén
On Thursday 4 April 2013 at 02:39, Matthaus Owens wrote:
> 
> ## Hiera 1.2.0 Release Notes ##
> 
> # Features
>  
> Add deep-merge feature to backend lookups
>  
> - Config option :merge_behavior => :native|:deep|:deeper
> - Add optional requirement on deep_merge gem to support
> :deep and :deeper options
> - Update Yaml backend to use Backend.merge_answer
> - Update Json backend to use Backend.merge_answer

So if I understood it correctly the difference is when the values are 
unmergeable and :deeper will give the value from the higher (more specific) 
hierarchy level while :deep will instead give the value from the lower (less 
specific) hierarchy level. Correct?

I don't really see the point of the :deep option then as the point of hiera is 
to give the most specific answer for the node in question.

But could be nice to at least log a warning or something when this happens.
And also document the two options a bit more :)
> (#17434) Detect loops in recursive lookup
>  
> The recursive lookup functionality was vulnerable to infinite recursion
> when the values ended up referring to each other. This keeps track of
> the names that have been seen in order to stop a loop from occuring. The
> behavior for this was extracted to a class so that it didn't clutter the
> logic of variable interpolation. The extracted class also specifically
> pushes and pops on an internal array in order to limit the amount of
> garbage created during these operations. This modification should be
> safe so long a new Hiera::RecursiveLookup is used for every parse that
> is done and it doesn't get shared in any manner.
>  
> (#17434) Support recursive interpolation
>  
> The original code for interpolation had, hidden somewhere in its depths,
> supported recursive expansion of interpolations. This adds that support
> back in.

So, is this for expansion of a variable that gives another string that should 
do variable expansion?

Not recursive hiera lookups? (which would be really nice, especially in 
backends that don't support references)

--  
Erik Dalén



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




Re: [Puppet Users] Custom facts not working

2013-04-04 Thread Codfather
Good point John, though you must remember a lot of users utilise cron to 
drive the puppet run's on standalone and agents. 

So this environment variable is important , especially for cloud based 
deployments that don't use a puppet master.

Certainly with Ubuntu servers in standalone mode, I have found that unless 
this is set, the custom facts are not loaded properly.

Cheers

Nick

On Wednesday, 3 April 2013 16:23:41 UTC+2, jcbollinger wrote:
>
>
>
> On Wednesday, April 3, 2013 2:44:22 AM UTC-5, Codfather wrote:
>>
>> Worth noting that if you set this environment variable in one of your 
>> shell environment config files , like .bashrc, you would need to export it.
>>
>> Like this 
>>
>> export FACTERLIB=/var/lib/puppet/lib/facter
>>
>>
> True, but it's even more worth noting that you should not assume that 
> shell configuration files will be involved in any way in setting up the 
> environment in which Facter or Puppet runs, unless you launch them manually 
> from an interactive shell.  Even then, you will find that Puppet is 
> parsimonious about the environment it provides to child processes, so 
> putting a variable in the agent's environment does not necessarily imply 
> that Facter will see it when run by the agent.
>
>
> 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Coding style best practise

2013-04-04 Thread Thomas Bendler
Hi @all,

I've started rewriting some of my modules to achieve separation of logic
and data. So I did some standard layout with init.pp and params.pp for
default values and parametrized classes for individual configuration like
this:

class example (
  $parameter1 = hiera('example::parameter1', $example::params::parameter1),
  $parameter2 = hiera('example::parameter2', $example::params::parameter2))
inherits example::params {
# Some coding
}

I
s this approach generic enough or will a different coding style be a
better approach with more use cases in mind? What do you think, any
suggestions?


Regards Thomas

-- 
Linux ... enjoy the ride!

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




Re: [Puppet Users] Coding style best practise

2013-04-04 Thread Nikola Petrov
Strangely enough, I lately started to move my params out of params
classes and into the init class. I really prefer to have example::param1
in my hiera instead of the example::params::param1. Will be glad to
hear what the params class actually buys you as a pattern.

For me the params class makes more sense when you don't have hiera or
ENC in place.  I remember using it because it was used as a standard and
I found it as a "nice" pattern on the internet.

Will be glad to hear more on this one too so +1

-- 
Nikola

On Thu, Apr 04, 2013 at 12:38:47PM +0200, Thomas Bendler wrote:
> Hi @all,
> 
> I've started rewriting some of my modules to achieve separation of logic
> and data. So I did some standard layout with init.pp and params.pp for
> default values and parametrized classes for individual configuration like
> this:
> 
> class example (
>   $parameter1 = hiera('example::parameter1', $example::params::parameter1),
>   $parameter2 = hiera('example::parameter2', $example::params::parameter2))
> inherits example::params {
> # Some coding
> }
> 
> I
> s this approach generic enough or will a different coding style be a
> better approach with more use cases in mind? What do you think, any
> suggestions?
> 
> 
> Regards Thomas
> 
> -- 
> Linux ... enjoy the ride!
> 
> -- 
> 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Puppet and OVO/ITO/OML

2013-04-04 Thread roeez
Hi Stefan,
I know it's an old post, but I'll be happy to hear more about how you're 
doing the agent installations with puppet, and maybe even get some code 
from you if it's possible. :)
Is there an option to contact you?

On Monday, November 21, 2011 8:21:33 PM UTC+2, Stefan Schulte wrote:
>
> At $WORK we currently use HP Operations Manager (aka ITO aka OVO aka
> OML...) to monitor our infrastructure.
>
> Because adding new nodes and configuring them can be time consuming and
> painful I'd like to know: Is anyone using the same product and how much
> / what exactly do you do with puppet?
>
> We currently install the agent software on Linux and Unix with puppet off
> an NFS share using an exec resource. This tends to be a lot more stable
> than doing the remote installation the product itself offers. Puppet can
> now also do the patching of the agents. I also started to write some custom
> types which will hopefully automate things a bit more.
>
> If you want to try them they are available here:
> https://github.com/stschulte/puppet-hpom
>
> So are you using HP OM and what does puppet do in that area?
>
> -Stefan
>
>
-- 
This message may contain confidential and/or privileged information. 
If you are not the addressee or authorized to receive this on behalf of the 
addressee you must not use, copy, disclose or take action based on this 
message or any information herein. 
If you have received this message in error, please advise the sender 
immediately by reply email and delete this message. Thank you.

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




[Puppet Users] File resource without ensure

2013-04-04 Thread cmon
Hi all,

if I define a file resource without specifying an ensure parameter, it 
seems to behave like ensure => present was specified.
I'm trying to require a file only when a command is executed, using 
something like this:

file{'myfile':
path => '/tmp/myfile',
source => "puppet:///modules/myexample/myfile",
}

exec { "myexec":
command => "/usr/local/bin/do_something -f /tmp/myfile",
onlyif => "/usr/local/bin/mytest",
require => [
   File["myfile"],
   ];
}

but it always creates myfile, regardless to mytest.
Is there a way to bind the creation to the onlyif test?

Thanks

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




[Puppet Users] Unable to set MySQL root password

2013-04-04 Thread Bob
Hi,

Using this module https://forge.puppetlabs.com/puppetlabs/mysql as 
described on documentation:

class { 'mysql::server':
  config_hash => { 'root_password' => 'foo' }
}


But, couldn't set password after logging getting error: Access denied for 
user 'root'@'localhost' (using password: YES)

System:Ubuntu 12.10

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




Re: [Puppet Users] Re: Beta release of puppetdbquery module 1.0

2013-04-04 Thread Erik Dalén
I've expanded the README a bit now and release 1.0.0-pre2 which should make it 
a bit easier to use.

It only supports queries over SSL and uses the Puppet HTTP methods for making 
connections. So if your Nginx uses a external CA cert you might be running into 
bug #15561 http://projects.puppetlabs.com/issues/15561 .

In the new 1.0.0-pre2 I've added the ability to use other kinds of HTTP 
connection objects though and use a regular one in the find-nodes binary, so 
you can try that instead of the puppet face if you are still getting SSL 
errors.  

--  
Erik Dalén


On Thursday 28 March 2013 at 17:31, Stephen Price wrote:

> Guys, Can you expand the README to describe where this should be run from? 
> I've been trying to use it as a Puppet Face from different hosts, including 
> directly on the PuppetDB server, to no avail. I keep getting 'bad request' or 
> SSL cert errors. My PuppetDB is running on localhost:8080 with Nginx (with 
> SSL) as the frontend. It'd be nice if this Face was usable from any Puppet 
> node, or at least from the Puppet Master.
>  
> On Monday, March 4, 2013 7:59:30 AM UTC-8, Erik Dalén wrote:
> > I've released version 1.0.0-pre1 of the dalen-puppetdbquery module, it 
> > includes the old functions against the PuppetDB api version 1.0. But also 
> > some entirely new functions that will query the PuppetDB api v2.0 (in 
> > puppetdb 1.1 and up).  
> >  
> > These new functions borrow the syntax from Dan Bode's ruby-puppetdb, but 
> > are entirely rewritten to make use of the 2.0 API.  
> >  
> > It now uses a lexer and parser written in rex & racc (ruby versions of lex 
> > & yacc) to compile a high level query language into PuppetDB queries.  
> >  
> > An example of a high level query would be:  
> > Class[Apache]{service_enable=true} and (osfamily=Redhat or osfamily=Debian) 
> >  
> >  
> > That would find any host with the apache class (notice though that class 
> > names have to be capitalized in queries) with the parameter service_enable 
> > => true and osfamily red hat or debian. It does normal operator precedence, 
> > so a parenthesis is required around that or-statement.  
> >  
> > The three new query functions are:  
> > * query_nodes  
> > * query_facts  
> > * query_resources  
> >  
> > So far only query_nodes and query_facts accept the new query language. In 
> > all three functions an array argument instead of string will be treated as 
> > a "raw" puppetdb query.  
> >  
> > Anyway, please test it and send me feedback (dalen on freenode). The old 
> > functions are left intact but deprecated, so it shouldn't affect any 
> > existing code using the older functions.  
> >  
> > --  
> > Erik Dalén  
>  
> --  
> 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 
> (mailto:puppet-users+unsubscr...@googlegroups.com).
> To post to this group, send email to puppet-users@googlegroups.com 
> (mailto: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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Unable to set MySQL root password

2013-04-04 Thread Felix Frank
Hi,

just took a peek at the code. Note that you need to specify the
old_root_password if one is set, otherwise puppet cannot modify the system.

What's the output of a puppet agent run?

Regards,
Felix

On 04/04/2013 02:33 PM, Bob wrote:
> Hi,
> 
> Using this module https://forge.puppetlabs.com/puppetlabs/mysql as
> described on documentation:
> 
> |class { 'mysql::server':
>   config_hash => { 'root_password' => 'foo' }
> }|
> 
> 
> But, couldn't set password after logging getting error: Access denied
> for user 'root'@'localhost' (using password: YES)

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




[Puppet Users] Re: puppet dashboard enc default group

2013-04-04 Thread vioilly
Does anyone know if this works? I have tested it and it is not working for 
me but I see this:

http://projects.puppetlabs.com/issues/4412


Cheers,
Oli

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




[Puppet Users] Using Puppet for Application package installation

2013-04-04 Thread Dhaval
Hello Guys,

i want to know, can we use puppet to install application packages ( not 
system packages ) .. if yes how , if someone can through some light ..

my requirement is

1) application team can create package on their own and update in yum repo 
( without root )
2) application team can install package on their own ( without root ) to 
the directories mention in rpm ..

let me know if anyone is aware of similar things available ?

Thanks in advance ...

Regards,
D

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




Re: [Puppet Users] Unable to set MySQL root password

2013-04-04 Thread Bob
Hi Frank,

Here is output:

# puppet agent --test --server=node0
info: Caching catalog for node2
info: Applying configuration version '1365082883'
notice: /Stage[main]/Mysql::Server/Package[mysql-server]/ensure: ensure 
changed 'purged' to 'present'
notice: /Stage[main]/Mysql/Package[mysql_client]/ensure: ensure changed 
'purged' to 'present'
notice: /Stage[main]/Mysql::Config/File[/etc/mysql/my.cnf]/content: 
--- /etc/mysql/my.cnf2013-01-16 15:47:04.0 -0500
+++ /tmp/puppet-file20130404-24456-fxnutx-02013-04-04 
09:42:06.187898921 -0400
@@ -1,127 +1,41 @@
-#
-# The MySQL database server configuration file.
...

...

info: FileBucket got a duplicate file {md5}77f15d6c87f9c136c4efcda072017f71
info: /Stage[main]/Mysql::Config/File[/etc/mysql/my.cnf]: Filebucketed 
/etc/mysql/my.cnf to puppet with sum 77f15d6c87f9c136c4efcda072017f71
notice: /Stage[main]/Mysql::Config/File[/etc/mysql/my.cnf]/content: content 
changed '{md5}77f15d6c87f9c136c4efcda072017f71' to 
'{md5}d9e035104d0794fd82604e6c0ae8d715'
info: /Stage[main]/Mysql::Config/File[/etc/mysql/my.cnf]: Scheduling 
refresh of Exec[mysqld-restart]
notice: /Stage[main]/Mysql::Config/Exec[set_mysql_rootpw]/returns: 
mysqladmin: connect to server at 'localhost' failed
notice: /Stage[main]/Mysql::Config/Exec[set_mysql_rootpw]/returns: error: 
'Access denied for user 'root'@'localhost' (using password: NO)'
err: /Stage[main]/Mysql::Config/Exec[set_mysql_rootpw]/returns: change from 
notrun to 0 failed: mysqladmin -u root  password 'foo' returned 1 instead 
of one of [0] at /etc/puppet/modules/mysql/manifests/config.pp:107
notice: /Stage[main]/Mysql::Config/File[/root/.my.cnf]: Dependency 
Exec[set_mysql_rootpw] has failures: true
warning: /Stage[main]/Mysql::Config/File[/root/.my.cnf]: Skipping because 
of failed dependencies
notice: /Stage[main]/Mysql::Config/Exec[mysqld-restart]: Dependency 
Exec[set_mysql_rootpw] has failures: true
warning: /Stage[main]/Mysql::Config/Exec[mysqld-restart]: Skipping because 
of failed dependencies
notice: /Stage[main]/Mysql::Config/Exec[mysqld-restart]: Triggered 
'refresh' from 1 events
notice: Finished catalog run in 50.84 seconds

четверг, 4 апреля 2013 г., 18:09:57 UTC+5 пользователь Felix.Frank написал:
>
> Hi, 
>
> just took a peek at the code. Note that you need to specify the 
> old_root_password if one is set, otherwise puppet cannot modify the 
> system. 
>
> What's the output of a puppet agent run? 
>
> Regards, 
> Felix 
>
> On 04/04/2013 02:33 PM, Bob wrote: 
> > Hi, 
> > 
> > Using this module https://forge.puppetlabs.com/puppetlabs/mysql as 
> > described on documentation: 
> > 
> > |class { 'mysql::server': 
> >   config_hash => { 'root_password' => 'foo' } 
> > }| 
> > 
> > 
> > But, couldn't set password after logging getting error: Access denied 
> > for user 'root'@'localhost' (using password: YES) 
>

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




[Puppet Users] Re: Using single hiera hash for two create_resources, and mounting filesystems

2013-04-04 Thread jcbollinger


On Wednesday, April 3, 2013 3:18:55 PM UTC-5, Kubes wrote:
>
> I am trying to use the same hiera hash to create the mount point and 
> mounts.  (Would be nice if mount could create the mount points using 3.1.1)
>
>
> My plan was to define create_mount_points and use create_resources with 
> the same hash, and just though away what I dont use  maybe there is a 
> better means?
>
>
> Here is the mount class:
>
> class fstab::mounts ( $config = undef ) {
>   $defaults = {
> atboot   => true,
> ensure   => 'mounted',
>   }
>   $hiera_config = hiera_hash('fstab::mounts', undef)
>   if $hiera_config {
>   create_resources(fstab::create_mount_points, $hiera_config )
>   create_resources(mount, $hiera_config, $defaults)
>   }
> }
>
> the define
>
> define fstab::create_mount_points ( $config = undef ) {
>   file{ $name:
>  ensure  => directory,
>  owner   => 'root',
>  group   => 'root',
>}
> }
>
> and the hiera yaml
>
> fstab::mounts:
>   '/mnt/test':
> ensure:  'mounted'
> device:  '/dev/sdi'
> atboot:  'true'
> fstype:  'ext4'
> options: 'defaults'
>
>
> How do I just pass the name/title from the hash?  I get Error 400 on 
> SERVER: Invalid parameter ensure.  I look like create_resources oversites 
> all the setting for create_mount_points?
>
> Any thoughts?  Or a better means?
>
> Thanks!
>
>

I think it's a fine idea to use one hash to drive management of both the 
mount and its mount point.  For create_resources(), however, the keys of 
the inner hash must all correspond to parameters of the target resource 
type, so you cannot normally pass the same hash in multiple 
create_resources() calls.  One way to approach this would be to create a 
defined type that models mount point + mount, giving it all the parameters 
it needs to cover both:

define fstab::mount_and_mountpoint(
  $device = undef,
  $fstype = undef,
  $owner = 'root',
  $group = 'root',
  $mode = '0755',
  $options = 'defaults',
  $atboot = true,
  $pass = '0',
  $dump = '0',
  $remounts = true,
  $ensure = 'mounted'
) {

  case $ensure {
'absent': {
  file { $title: ensure => 'absent' }
  mount { $title:
  ensure => 'absent',
  before => File[$title]
  }
},

'present', 'unmounted', 'mounted': {
  file { $title:
ensure => 'directory',
owner => $owner,
group => $group,
mode => $mode
  }

  mount { $title:
  ensure => $ensure,
  device => $device,
  fstype => $fstype,
  options => $options,
  atboot => $atboot,
  pass => $pass,
  dump => $dump,
  remounts => $remounts,
  require => File[$title]
  }
},

default: {
  fail("Unexpected ensure value '$ensure'")
}
  }

}

Then use create_resources() to create instances of the defined type, 
instead of to create the component resources directly.  Note that this also 
takes care of the fine point that if you ensure 'absent' then the mount and 
mount point resources need to be applied in the opposite order to the one 
that must otherwise be used.  You also get default parameter values from 
the defined type, which may be an advantage if you don't like the 
underlying resources' defaults.

Important point: do be aware that mounts and mount points are a tricky 
issue because the operating system actively hides the distinction between 
the mount point itself and the root of the mounted filesystem.  The File 
resource may be applied to either, depending on whether anything is mounted 
on the mount point when the File is applied.  If you want finer control in 
that area then you will need to write a native custom type and provider 
instead of a defined type.


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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Unable to set MySQL root password

2013-04-04 Thread Felix Frank
On 04/04/2013 03:48 PM, Bob wrote:
> notice: /Stage[main]/Mysql::Config/Exec[set_mysql_rootpw]/returns:
> mysqladmin: connect to server at 'localhost' failed
> notice: /Stage[main]/Mysql::Config/Exec[set_mysql_rootpw]/returns:
> error: 'Access denied for user 'root'@'localhost' (using password: NO)'
> err: /Stage[main]/Mysql::Config/Exec[set_mysql_rootpw]/returns: change
> from notrun to 0 failed: mysqladmin -u root  password 'foo' returned 1
> instead of one of [0] at /etc/puppet/modules/mysql/manifests/config.pp:107

Yes, it doesn't work.

Puppet needs your existing root password.

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




Re: [Puppet Users] Unable to set MySQL root password

2013-04-04 Thread Bob
MySQL was purged before running puppet script with command: apt-get purge 
mysql\*
So I can't input root password as it's fresh install.

четверг, 4 апреля 2013 г., 18:52:15 UTC+5 пользователь Felix.Frank написал:

> On 04/04/2013 03:48 PM, Bob wrote: 
> > notice: /Stage[main]/Mysql::Config/Exec[set_mysql_rootpw]/returns: 
> > mysqladmin: connect to server at 'localhost' failed 
> > notice: /Stage[main]/Mysql::Config/Exec[set_mysql_rootpw]/returns: 
> > error: 'Access denied for user 'root'@'localhost' (using password: NO)' 
> > err: /Stage[main]/Mysql::Config/Exec[set_mysql_rootpw]/returns: change 
> > from notrun to 0 failed: mysqladmin -u root  password 'foo' returned 1 
> > instead of one of [0] at 
> /etc/puppet/modules/mysql/manifests/config.pp:107 
>
> Yes, it doesn't work. 
>
> Puppet needs your existing root password. 
>

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




[Puppet Users] Re: defining "roles" (and hiera)

2013-04-04 Thread jcbollinger


On Wednesday, April 3, 2013 9:06:58 AM UTC-5, Kubes wrote:
>
> What is the best means to "assign" nodes to a "role"
>
> I have review http://www.craigdunn.org/2012/05/239/  also view a post 
> recently with people posting their hirea configs and most of them used a 
> role or server_role, etc
>
> In our environment, servers(node) are named by roles, eg:
>web01.prod.domain.com
>db01.prod.domain.com
>etc
>
> Our nodes.pp
>
> node /db\d{2}.(dev|stage|prod).domain.com/ {
>   include profile::database_server
> }
>
> Would like to have this as the hiera config:
> :hierarchy:
>   - %{environment}/%{module_name}/%{fqdn}
>   - %{environment}/%{module_name}/%{role}
>   - %{environment}/%{module_name}/common
>
> I see a few options:
>
>1. Extend out enc to set a global variable "role"
>2. Assign a node variable "role"
>3. Custom fact
>4. other?
>
>
> What is the best practice for handling roles with hiera?
>
> Thanks!
>


I take you to be asking how to communicate the role information embedded in 
your nodes' names to hiera, so as to enable hiera to interpolate it into 
the hierarchy definition.  You probably should not use a custom fact 
because (i) that cedes control to the node, and (ii) the information is 
already being provided by some of the standard facts.  Either an 
ENC-provided global variable or a node variable should work, but your case 
is so simple that I would go with "other".

Specifically, I would at this at the top of your site.pp, outside any node 
definition:
  $role = regsubst($hostname, '^([^0-9]+).*$', '\1')

That will extract the initial string of non-digits from the node's hostname 
and assign it to variable $role.  It will do it once for all (so you don't 
need to do it in each node definition), and it does not rely on an ENC.


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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Unable to set MySQL root password

2013-04-04 Thread Felix Frank
I don't know about Ubuntu, but Debian will store the inital root
password you've entered once in the config database. It may get re-used
when puppet installs the mysql server.

Point in fact: MySQL won't accept a password-less root login.

The safe route will be for you to start with skip-grant and unset the
root password.
Or, you know - rebuild the system from scratch ;-)

On 04/04/2013 03:56 PM, Bob wrote:
> MySQL was purged before running puppet script with command: apt-get
> purge mysql\*
> So I can't input root password as it's fresh install.

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




[Puppet Users] using if statements inside custom resource

2013-04-04 Thread Karen Almog
Hi,

I am trying to write a manifest that iterates through an array to create 
and maintain application users.
The list of users is passed to the manifest from init.pp in the following 
fashion:

*$app_users = [ at1,et1,at2,et2 ]*

The users.pp manifest then reads the array to create the users:

* define appuser {
user { $name:   
ensure   => 'present',
comment  => "Application User - $name",
gid  => 'app',
home => "/apps/$app/$name",
shell=> '/usr/bin/bash',
  }
 }
 
 appuser  { $app_users: }
*
This solution worked very well with another module I wrote, but in this 
case the home directory path includes a variable, that depends on the user 
name.

Adding the following if statement inside the resource issues an error:

*if $name =~ /^(et|ep)/ {
 $app = "echos"
 notice('app is $app') 
 }*

*Syntax error at 'if'; expected '}' at .../users.pp:9 *

I read somewhere that you cannot place an if statement inside a resource, 
and in that case, what are my options?
We're using puppet master version 2.7.19 (Puppet Enterprise 2.7.0).


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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: puppet dashboard enc default group

2013-04-04 Thread vioilly
I found another way of doing this. A workaround but I found that I could 
add all the nodes to a default group via a rake task as follows:

*sudo -u puppet-dashboard RAILS_ENV=production rake -f  
/usr/share/puppet-dashboard/Rakefile nodegroup:add_all_nodes group=default
*
I am running that rake task via jenkins on a scheduled basis*.*

Unless anyone else has a better way, that will do for now.* *If you do know 
if that feature request got implemented, then please reply*
*

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




[Puppet Users] Re: File resource without ensure

2013-04-04 Thread jcbollinger


On Thursday, April 4, 2013 5:44:40 AM UTC-5, carlo montanari wrote:
>
> Hi all,
>
> if I define a file resource without specifying an ensure parameter, it 
> seems to behave like ensure => present was specified.
>


Yes, that's the default.

 

> I'm trying to require a file only when a command is executed, using 
> something like this:
>
> file{'myfile':
> path => '/tmp/myfile',
> source => "puppet:///modules/myexample/myfile",
> }
>
> exec { "myexec":
> command => "/usr/local/bin/do_something -f /tmp/myfile",
> onlyif => "/usr/local/bin/mytest",
> require => [
>File["myfile"],
>];
> }
>
> but it always creates myfile, regardless to mytest.
>


Yes, it's a managed file.  The require just directs Puppet to apply it 
before attempting to apply the Exec.
 

Is there a way to bind the creation to the onlyif test?
>
>
It depends.

Puppet will not apply one resource in the middle of applying a different 
one.  Specifically, it will not under any circumstances apply a File 
between evaluating the Exec's 'onlyif' test and running its command.

If the file can be applied conditionally on success of the whole Exec then 
just making the File 'require' the Exec should do the trick.  There's an 
important caveat here, however: the overall Exec succeeds (without running 
the command) when the onlyif test fails, so that probably doesn't achieve 
what you want.

The best you can do might be to turn the onlyif test into a custom fact.  
That will cause it to run much earlier (before any resources are applied), 
and it will make the result available in your manifests, so that you can 
declare both the File and Exec only if the test succeeded.


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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Coding style best practise

2013-04-04 Thread jcbollinger


On Thursday, April 4, 2013 5:38:47 AM UTC-5, thbe wrote:
>
> Hi @all,
>
> I've started rewriting some of my modules to achieve separation of logic 
> and data. So I did some standard layout with init.pp and params.pp for 
> default values and parametrized classes for individual configuration like 
> this:
>
> class example (
>   $parameter1 = hiera('example::parameter1', $example::params::parameter1
> ),
>   $parameter2 = hiera('example::parameter2', $example::params::parameter2
> ))
> inherits example::params {
> # Some coding
> }
>
> I
> s this approach generic enough or will a different coding style be a 
> better approach with more use cases in mind? What do you think, any 
> suggestions?
>
>

Code following that template should work equally well in any Puppet from 
v2.6 onward, provided that hiera is installed.  (Hiera is built-in for 
Puppet 3, but it is a separate add-on to Puppet 2).

However, if you are going to go so far as to specify explicit hiera() calls 
for your default values, then I would recommend you just dump class 
parameterization altogether, and if you do so then you can also avoid class 
inheritance (or use it, where needed, for its real purpose):

class example {
  include 'example::params'
  $parameter1 = hiera('example::parameter1', $example::params::parameter1)
  $parameter2 = hiera('example::parameter2', $example::params::parameter2)
# Some coding
}

That loses you the alternative of expressing class data directly in your 
class declarations, but doing so is problematic and always has been.

As for whether default values should be drawn from a separate class in the 
first place, that's partially a question of the usage and meaning of those 
parameters.  If no other class relies on them then I don't see what is 
gained by extracting them to a separate class -- as far as I'm concerned, 
that just obfuscates.  And in most cases probably no other class SHOULD 
rely on those defaults: what they really want is more likely to be 
$example::parameter1, etc..

And that may itself be a reason to prefer the non-parameterized form if 
compatibility with Puppet 2 is desired: it is my vague (and possibly wrong) 
recollection that in some versions of Puppet class parameters could not be 
accessed from other classes (unlike ordinary class variables).

If you don't care about Puppet 2, on the other hand, then explicit hiera 
calls for your parameter defaults are overkill, and possibly even 
redundant.  The non-parameterized form, on the other hand, is no better or 
worse in Puppet 3 than in Puppet 2.


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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Custom facts not working

2013-04-04 Thread jcbollinger


On Thursday, April 4, 2013 5:12:21 AM UTC-5, Codfather wrote:
>
> Good point John, though you must remember a lot of users utilise cron to 
> drive the puppet run's on standalone and agents. 



I'm well aware of that.
 

>
> So this environment variable is important , especially for cloud based 
> deployments that don't use a puppet master.
>


The variable is important, but for most cron implementations, .bashrc is 
not.  Most crons take care to provide an exceedingly sparse environment to 
the commands they spawn, much as Puppet does.  If you want your cron jobs 
to have that environment variable set then you should use their crontab 
entries to make it so, not .bashrc.  If you have a cron that doesn't 
require you to do so then you should find a more secure implementation.


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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Re: Beta release of puppetdbquery module 1.0

2013-04-04 Thread Stephen Price
Thanks for the update. I ended up having to run a modified version of the 
find-nodes script locally on my PuppetDB host, connecting to localhost:8080 
without SSL. Any other connection (remotely to 'puppetdb', locally to port 
8081) gave me a "400: bad request". For the record, nginx is using the 
PuppetDB host's key and cert that was generated on the Puppet Master during 
the node's initialization (in /var/lib/puppet/ssl/...).

This is definitely a great set of functions though. Makes queries a lot 
easier. I hope it's eventually included as a Face in the official package.

On Thursday, April 4, 2013 6:08:30 AM UTC-7, Erik Dalén wrote:
>
> I've expanded the README a bit now and release 1.0.0-pre2 which should 
> make it a bit easier to use. 
>
> It only supports queries over SSL and uses the Puppet HTTP methods for 
> making connections. So if your Nginx uses a external CA cert you might be 
> running into bug #15561 http://projects.puppetlabs.com/issues/15561 . 
>
> In the new 1.0.0-pre2 I've added the ability to use other kinds of HTTP 
> connection objects though and use a regular one in the find-nodes binary, 
> so you can try that instead of the puppet face if you are still getting SSL 
> errors.   
>
> --   
> Erik Dalén 
>
>
> On Thursday 28 March 2013 at 17:31, Stephen Price wrote: 
>
> > Guys, Can you expand the README to describe where this should be run 
> from? I've been trying to use it as a Puppet Face from different hosts, 
> including directly on the PuppetDB server, to no avail. I keep getting 'bad 
> request' or SSL cert errors. My PuppetDB is running on localhost:8080 with 
> Nginx (with SSL) as the frontend. It'd be nice if this Face was usable from 
> any Puppet node, or at least from the Puppet Master. 
> >   
> > On Monday, March 4, 2013 7:59:30 AM UTC-8, Erik Dalén wrote: 
> > > I've released version 1.0.0-pre1 of the dalen-puppetdbquery module, it 
> includes the old functions against the PuppetDB api version 1.0. But also 
> some entirely new functions that will query the PuppetDB api v2.0 (in 
> puppetdb 1.1 and up).   
> > >   
> > > These new functions borrow the syntax from Dan Bode's ruby-puppetdb, 
> but are entirely rewritten to make use of the 2.0 API.   
> > >   
> > > It now uses a lexer and parser written in rex & racc (ruby versions of 
> lex & yacc) to compile a high level query language into PuppetDB queries.   
> > >   
> > > An example of a high level query would be:   
> > > Class[Apache]{service_enable=true} and (osfamily=Redhat or 
> osfamily=Debian)   
> > >   
> > > That would find any host with the apache class (notice though that 
> class names have to be capitalized in queries) with the parameter 
> service_enable => true and osfamily red hat or debian. It does normal 
> operator precedence, so a parenthesis is required around that or-statement. 
>   
> > >   
> > > The three new query functions are:   
> > > * query_nodes   
> > > * query_facts   
> > > * query_resources   
> > >   
> > > So far only query_nodes and query_facts accept the new query language. 
> In all three functions an array argument instead of string will be treated 
> as a "raw" puppetdb query.   
> > >   
> > > Anyway, please test it and send me feedback (dalen on freenode). The 
> old functions are left intact but deprecated, so it shouldn't affect any 
> existing code using the older functions.   
> > >   
> > > --   
> > > Erik Dalén   
> >   
> > --   
> > 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  (mailto:
> puppet-users+unsubscr...@googlegroups.com ). 
> > To post to this group, send email to 
> > puppet...@googlegroups.com(mailto:
> puppet...@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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] replacing mkdir -p

2013-04-04 Thread Mike Power
Puppet right now requires every element of a path to have an individual 
file definition.  This makes it had to take an arbitrary path as a 
parameter.  You are forced to require your client to make the entire path 
structure for you or instead you use an exec resource and call mkdir -p.  
Using an exec resource does not generate an File resources so autorequire 
does not work.

I didn't like this, I wanted to be able to once specify a path and have 
puppet do that autorequire as needed.

Something like:
path {"/blah/blah/blah/and/blah":
}


In order to make this happen I would have to manually define each file:
file {"/blah/":
ensure  => directory,
}

file {"/blah/blah/":
ensure  => directory,
}

file {"/blah/blah/blah/":
ensure  => directory,
}

file {"/blah/blah/blah/and/":
ensure  => directory,
}

file {"/blah/blah/blah/and/blah/":
ensure  => directory,
}

Of course there is a short hand for this:
file {["/blah/", "/blah/blah/", "/blah/blah/blah/", 
"/blah/blah/blah/and/","/blah/blah/blah/and/blah/"]:
ensure  => directory,
}

Then it occurred to me I could parse the path and produce the array of 
elements needed.  Something like:
$path = "/blah/blah/blah/and/blah"
$file_list = split($path, $file_separator)
$paths = inline_template('<% parent = nil %><%=@file_list.collect{ 
|file| parent.nil? ? parent = "#{@file_separator}":parent = 
"#{parent}#{file}#{@file_separator}"}.join(@path_separator) %>')
$path_list = split($paths, $path_separator)
file{$path_list:
ensure  => directory,
}

This works great once.  Then you get errors like:
Error: Duplicate declaration: File[/]

If there anyway to trim down the produced array by removing the resources 
that already exist?







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




[Puppet Users] Re: Announce: Hiera 1.2.0 Available

2013-04-04 Thread Nick Fagerlund


On Wednesday, April 3, 2013 9:42:12 PM UTC-7, Ellison Marks wrote:
>
>
>
> On a slightly related note, is the function documentation going to get an 
> update soon? All three hiera functions are still listed as "undocumented". 
> They do have fairly complete documentation in 
> http://docs.puppetlabs.com/hiera/1/index.html, so perhaps something could 
> be borrowed from there.
>
>
>
Yeah, those are getting real doc strings in Puppet 3.2, which will start 
getting preview releases very soon now (i.e. probably a week or two). 

Now that I think about it, we could probably just patch the 3.1.1 reference 
to include the new strings in the meantime. I'll go do that. 

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




Re: [Puppet Users] Re: [Puppet-dev] Announce: Hiera 1.2.0 Available

2013-04-04 Thread Jeff McCune
On Thu, Apr 4, 2013 at 3:02 AM, Erik Dalén wrote:

> On Thursday 4 April 2013 at 02:39, Matthaus Owens wrote:
> > 
> > ## Hiera 1.2.0 Release Notes ##
> > 
> > # Features
> >
> > Add deep-merge feature to backend lookups
> >
> > - Config option :merge_behavior => :native|:deep|:deeper
> > - Add optional requirement on deep_merge gem to support
> > :deep and :deeper options
> > - Update Yaml backend to use Backend.merge_answer
> > - Update Json backend to use Backend.merge_answer
>
> So if I understood it correctly the difference is when the values are
> unmergeable and :deeper will give the value from the higher (more specific)
> hierarchy level while :deep will instead give the value from the lower
> (less specific) hierarchy level. Correct?
>

I'm not sure if this merge behavior has anything to do with the hierarchy
levels.  The setting determines how the same value found in multiple
backends, (e.g. JSON and YAML) are handled.  I agree, there's lots of room
for improvement regarding the documentation of this.  I also regret letting
the options be called "deep" and "deeper" since they really don't relate to
depth, but instead they relate to the ordering of the back ends.

When using "deep," backends that are listed at the top in the `:backends:`
configuration array will take precedence over later backends when multiple
backends return a value and the values are of different types (can't be
merged).

When using "deeper," backends that are listed after other backends that
return a value for the same key will take precedence.

I guess this could be better said as, when using deep, the first backend to
return a value will take precedence over other back ends that also return
values that cannot be merged.  When using deeper, the last backend to
return a value will take precedence over other back ends that return values
that cannot be merged.

Ugh.  Clear as mud.


> I don't really see the point of the :deep option then as the point of
> hiera is to give the most specific answer for the node in question.
>

yeah, deep and deeper don't really have anything to do with the hierarchy.
 They only affect the value when multiple backends are being used and the
values cannot be merged across backends.


> But could be nice to at least log a warning or something when this happens.
> And also document the two options a bit more :)
>

Agreed!  Are you interested in submitting a patch?  The code in question is
at:
https://github.com/puppetlabs/hiera/blob/1.2.0/lib/hiera/backend.rb#L151-L160

and:

https://github.com/puppetlabs/hiera/blob/1.2.0/lib/hiera/backend.rb#L193

Hope this helps,
-Jeff

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




Re: [Puppet Users] Re: [Puppet-dev] Announce: Hiera 1.2.0 Available

2013-04-04 Thread Jeff McCune
On Thu, Apr 4, 2013 at 10:50 AM, Jeff McCune  wrote:

> On Thu, Apr 4, 2013 at 3:02 AM, Erik Dalén wrote:
>
>> On Thursday 4 April 2013 at 02:39, Matthaus Owens wrote:
>> > 
>> > ## Hiera 1.2.0 Release Notes ##
>> > 
>> > # Features
>> >
>> > Add deep-merge feature to backend lookups
>> >
>> > - Config option :merge_behavior => :native|:deep|:deeper
>> > - Add optional requirement on deep_merge gem to support
>> > :deep and :deeper options
>> > - Update Yaml backend to use Backend.merge_answer
>> > - Update Json backend to use Backend.merge_answer
>>
>> So if I understood it correctly the difference is when the values are
>> unmergeable and :deeper will give the value from the higher (more specific)
>> hierarchy level while :deep will instead give the value from the lower
>> (less specific) hierarchy level. Correct?
>>
>
> I'm not sure if this merge behavior has anything to do with the hierarchy
> levels.
>

Hrm, no...  I'm wrong.

The YAML and JSON backends use the same precedence behavior as well:

https://github.com/puppetlabs/hiera/blob/1.2.0/lib/hiera/backend/yaml_backend.rb#L49
https://github.com/puppetlabs/hiera/blob/1.2.0/lib/hiera/backend/json_backend.rb#L45

So you're correct, deep will keep the first answer found in the hierarchy
if later values are of different types.  Deeper will keep the last answer
found in the hierarchy if later values are of different types.

-Jeff

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




Re: [Puppet Users] Encrypt Passwords in Manifests

2013-04-04 Thread James Matthews
Thanks Guys, will check these out next week

Jim

Sent from my iPhone

On 4 Apr 2013, at 06:34, Gabriel Filion  wrote:

> Hi there,
> 
> On 04/03/2013 09:18 AM, jim wrote:
>> I mainly use Puppet for managing windows hosts, and what to know they
>> best way to either encrypt passwords in manifests or where to store them
>> so they are encrypted and reference them as in a variable etc ? (if that
>> makes sense)
>> 
>> e.g.
>> 
>> class roles::base::users {
>> user { 'Administrator':
>> ensure => present,
>> password   => 'Please_hide_me;01',
>> }
> 
> You might want to have a look at trocla which was developped for that
> purpose:
> 
> https://github.com/duritong/trocla
> 
> with the puppet integration module:
> 
> https://github.com/duritong/puppet-trocla
> 
> -- 
> Gabriel Filion
> 

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




[Puppet Users] Re: Puppet Live Management Not Working

2013-04-04 Thread Bogdan Eugen
Hi there,

I have the same problem and I didn't find yet a bugfix or even the cause. I 
suspect the jvm on the master. What version of PE do you use ?
Mine is 2.8 the latest.

On Wednesday, April 3, 2013 8:53:09 PM UTC+2, Sam Oehlert wrote:
>
> Hi I'm new to puppet. Just installed the master and one agent. I'm having 
> issues with Live Management though. Any time I try to do anything through 
> there it just sits and waits for a long time and never does anything.
>
>

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




[Puppet Users] Solutions to Learning Puppet Exercises?

2013-04-04 Thread HassanzDaName
Hello Everyone in the Puppet World,

I'm fairly new to Puppet.  I'm still learning the basics.  I actually just 
got done completing the learning section covering variables, conditionals, 
& facts over on this page: <
http://docs.puppetlabs.com/learning/variables.html>


Here's my situation... I've completed the exercises near the bottom of the 
page.  I'm not sure if my manifests are right or not.  Am I writing the 
code properly?  Do I have the concept down?  It is hard to tell.  Is there 
a place online we can find solutions?  Would anyone be willing to look over 
my code?  


ANY help would be greatly appreciated!

For the first exercise:  Use the $operatingsystem fact to write a manifest 
that installs a build environment on Debian-based (“debian,” “ubuntu”) and 
Enterprise Linux-based (“centos,” “redhat”) machines. (Both types of system 
require the gcc package, but Debian-type systems also require 
build-essential.)

I have attached a screenshot of my code here...

Have I done this correctly?  Is anything missing?  Thank you 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


<>

[Puppet Users] Help me (fully) clear out stored configs from PuppetDB Postgresql

2013-04-04 Thread Michael O'Dea
Hi all,

I recently started using the Nagios resources to populate a monitoring 
server.  I cycle hosts fairly quickly in my environment so already I've had 
five hosts come and go from under Nagios.  After a fair amount of searching 
I discovered "puppet node deactivate" and performed same on the removed 
hosts -- I'm still trying to figure out how to make that part of the 
process going forward -- but somehow only one of my five hosts ended up 
being removed from my Nagios configs.  I am using resource { purge => true 
} for the affected resource types.  

So here's where I'm at -- if I run puppet node status  on any of 
these missing hosts, they appear as "deactivated".  If I clear out my 
nagios config files and re-run puppet agent, the nodes and their services 
(I did have an exported nagios_service resource when these hosts were 
alive, which I've since removed -- in case that matters) will re-appear. 
 I've tried *puppet node clean*, *puppet node destroy*, *puppet node 
deactivate*, with and without terminus=puppetdb.  I can see in the puppetdb 
log that it has received multiple deactivate commands for these hosts. 
 Nonetheless, the items are still appearing when the nagios host performs a 
collection.  I've got to put an end to that! 

An example of puppet node status for one of the affected:

# puppet node status [badnodename]
[badnodename]
Deactivated at 2013-04-03T23:00:55.349Z
No catalog received
No facts received


One interesting bit.  First, when I run puppet agent --test, during catalog 
compilation I _was_ seeing the following for all four affected hosts:  

warning: Nagios_service check_ssh_[badhost] found in both naginator and 
naginator; skipping the naginator version


Out of frustration, I disabled storedconfigurations on the puppet master 
and restarted it.  After a few catalogs had processed, I updated Nagios 
after manually purging the hosts file.  As expected, all my host and 
service definitions disappeared.  I then re-enabled storedconfigurations, 
fingers-crossed that the old host defs would be gone -- to my dismay, they 
reappeared on the *second* catalog run after I brought stored_configs back 
online.  Now, I no longer get the error message above, but I do still get 
the deactivated hosts and associated services.  

At this point, I'd be happy to simply wipe all of my existing stored 
configurations, as I suspect these four hosts have gotten themselves into 
some kind of limbo.  However, while the instructions for removing stored 
config data from the old MySQL puppet db is quite straightforward, it 
doesn't seem to map to the postgresql DB schema, and I can't find any 
advice on how to go about wiping it there.  I'd prefer not to just scrap my 
database, but I'm getting closer to that point.

Any help would be appreciated.

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




[Puppet Users] Error 400 on SERVER: allocator undefined for Proc

2013-04-04 Thread Vlados Vladosov
Usual, after change some parameters in yaml, and run puppet, i got this 
error.

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


Debug: Using settings: adding file resource 'classfile': 
'File[/var/lib/puppet/classes.txt]{:loglevel=>:debug, :links   
=>:follow, :ensure=>:file, :backup=>false, :owner=>"root", :mode=>"640", 
:path=>"/var/lib/puppet/classes.txt"}'
Debug: Using settings: adding file resource 'clientbucketdir': 
'File[/var/lib/puppet/clientbucket]{:loglevel=>:debug,
:links=>:follow, :ensure=>:directory, :backup=>false, :mode=>"750", 
:path=>"/var/lib/puppet/clientbucket"}'
Debug: Failed to load library 'ldap' for feature 'ldap'
Debug: Puppet::Type::User::ProviderLdap: feature ldap is missing
Debug: Puppet::Type::User::ProviderUser_role_add: file roleadd does not exist
Debug: Puppet::Type::User::ProviderPw: file pw does not exist
Debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dsimport 
does not exist
Debug: Using settings: adding file resource 'localcacert': 
'File[/var/lib/puppet/ssl/certs/ca.pem]{:loglevel=>:debug,
:links=>:follow, :ensure=>:file, :backup=>false, :owner=>"puppet", 
:mode=>"644", :path=>"/var/lib/puppet/ssl/certs/c   a.pem"}'
Debug: Using settings: adding file resource 'hostcrl': 
'File[/var/lib/puppet/ssl/crl.pem]{:loglevel=>:debug, :links=>   
:follow, :ensure=>:file, :backup=>false, :owner=>"puppet", :mode=>"644", 
:path=>"/var/lib/puppet/ssl/crl.pem"}'
Debug: Using settings: adding file resource 'lastrunfile': 
'File[/var/lib/puppet/state/last_run_summary.yaml]{:loglev   
el=>:debug, :links=>:follow, :ensure=>:file, :backup=>false, :mode=>"644", 
:path=>"/var/lib/puppet/state/last_run_sum   mary.yaml"}'
Debug: Failed to load library 'ldap' for feature 'ldap'
Debug: Puppet::Type::Group::ProviderLdap: feature ldap is missing
Debug: Puppet::Type::Group::ProviderPw: file pw does not exist
Debug: Puppet::Type::Group::ProviderDirectoryservice: file /usr/bin/dscl does 
not exist
Debug: Using settings: adding file resource 'logdir': 
'File[/var/log/puppet]{:loglevel=>:debug, :links=>:follow, :gro   
up=>"puppet", :ensure=>:directory, :backup=>false, :owner=>"puppet", 
:mode=>"750", :path=>"/var/log/puppet"}'
Debug: Using settings: adding file resource 'certdir': 
'File[/var/lib/puppet/ssl/certs]{:loglevel=>:debug, :links=>:f   
ollow, :ensure=>:directory, :backup=>false, :owner=>"puppet", 
:path=>"/var/lib/puppet/ssl/certs"}'
Debug: Using settings: adding file resource 'graphdir': 
'File[/var/lib/puppet/state/graphs]{:loglevel=>:debug, :links   
=>:follow, :ensure=>:directory, :backup=>false, 
:path=>"/var/lib/puppet/state/graphs"}'
Debug: Using settings: adding file resource 'requestdir': 
'File[/var/lib/puppet/ssl/certificate_requests]{:loglevel=>   
:debug, :links=>:follow, :ensure=>:directory, :backup=>false, :owner=>"puppet", 
:path=>"/var/lib/puppet/ssl/certifica   te_requests"}'
Debug: Using settings: adding file resource 'clientyamldir': 
'File[/var/lib/puppet/client_yaml]{:loglevel=>:debug, :l   
inks=>:follow, :ensure=>:directory, :backup=>false, :mode=>"750", 
:path=>"/var/lib/puppet/client_yaml"}'
Debug: Using settings: adding file resource 'hostprivkey': 
'File[/var/lib/puppet/ssl/private_keys/vlados-test.fabrika   
nt2.test.pem]{:loglevel=>:debug, :links=>:follow, :ensure=>:file, 
:backup=>false, :owner=>"puppet", :mode=>"600", :pa   
th=>"/var/lib/puppet/ssl/private_keys/vlados-test.fabrikant2.test.pem"}'
Debug: Using settings: adding file resource 'resourcefile': 
'File[/var/lib/puppet/state/resources.txt]{:loglevel=>:de   bug, 
:links=>:follow, :ensure=>:file, :backup=>false, :owner=>"root", :mode=>"640", 
:path=>"/var/lib/puppet/state/res   ources.txt"}'
Debug: Using settings: adding file resource 'lastrunreport': 
'File[/var/lib/puppet/state/last_run_report.yaml]{:logle   
vel=>:debug, :links=>:follow, :ensure=>:file, :backup=>false, :mode=>"640", 
:path=>"/var/lib/puppet/state/last_run_re   port.yaml"}'
Debug: Using settings: adding file resource 'httplog': 
'File[/var/log/puppet/http.log]{:loglevel=>:debug, :links=>:fo   
llow, :ensure=>:file, :backup=>false, :owner=>"root", :mode=>"640", 
:path=>"/var/log/puppet/http.log"}'
Debug: Using settings: adding file resource 'confdir': 
'File[/etc/puppet]{:loglevel=>:debug, :links=>:follow, :ensure   
=>:directory, :backup=>false, :path=>"/etc/puppet"}'
Debug: Usi

[Puppet Users] Re: Error 400 on SERVER: allocator undefined for Proc

2013-04-04 Thread Vlados Vladosov
After 30-60 min this error is gone.

четверг, 4 апреля 2013 г., 23:50:11 UTC+4 пользователь Vlados Vladosov 
написал:
>
> Usual, after change some parameters in yaml, and run puppet, i got this 
> error.
>
>

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




[Puppet Users] Re: Help me (fully) clear out stored configs from PuppetDB Postgresql

2013-04-04 Thread Michael O'Dea
< exasperated sigh >

So, the hosts in question have, as part of their unique hostnames, a small 
hex string which is in uppercase.  In the Nagios view where I was seeing 
these offline hosts, the hostname's case was preserved.  Within PuppetDB 
however, the hostname is all lowercase.  As a consequence, these hosts were 
not removed because instead of deactivating that host, a *new* certname 
entry was created, with my mixed-case value, and *that* entry was marked as 
deactivated.  The actual host was still humming right along.

Well, I guess I learned something.  Technically there's a bug there -- but 
I've lost a whole day on this issue so I'm going to refrain from reporting 
it at the moment.  Hope this helps someone else.  If you're deactivating a 
host with a capital letter, odds are good you're not deactivating what you 
think you're deactivating.  


On Thursday, April 4, 2013 3:19:00 PM UTC-4, Michael O'Dea wrote:
>
> Hi all,
>
> I recently started using the Nagios resources to populate a monitoring 
> server.  I cycle hosts fairly quickly in my environment so already I've had 
> five hosts come and go from under Nagios.  After a fair amount of searching 
> I discovered "puppet node deactivate" and performed same on the removed 
> hosts -- I'm still trying to figure out how to make that part of the 
> process going forward -- but somehow only one of my five hosts ended up 
> being removed from my Nagios configs.  I am using resource { purge => true 
> } for the affected resource types.  
>
> So here's where I'm at -- if I run puppet node status  on any of 
> these missing hosts, they appear as "deactivated".  If I clear out my 
> nagios config files and re-run puppet agent, the nodes and their services 
> (I did have an exported nagios_service resource when these hosts were 
> alive, which I've since removed -- in case that matters) will re-appear. 
>  I've tried *puppet node clean*, *puppet node destroy*, *puppet node 
> deactivate*, with and without terminus=puppetdb.  I can see in the 
> puppetdb log that it has received multiple deactivate commands for these 
> hosts.  Nonetheless, the items are still appearing when the nagios host 
> performs a collection.  I've got to put an end to that! 
>
> An example of puppet node status for one of the affected:
>
> # puppet node status [badnodename]
> [badnodename]
> Deactivated at 2013-04-03T23:00:55.349Z
> No catalog received
> No facts received
>
>
> One interesting bit.  First, when I run puppet agent --test, during 
> catalog compilation I _was_ seeing the following for all four affected 
> hosts:  
>
> warning: Nagios_service check_ssh_[badhost] found in both naginator and 
> naginator; skipping the naginator version
>
>
> Out of frustration, I disabled storedconfigurations on the puppet master 
> and restarted it.  After a few catalogs had processed, I updated Nagios 
> after manually purging the hosts file.  As expected, all my host and 
> service definitions disappeared.  I then re-enabled storedconfigurations, 
> fingers-crossed that the old host defs would be gone -- to my dismay, they 
> reappeared on the *second* catalog run after I brought stored_configs back 
> online.  Now, I no longer get the error message above, but I do still get 
> the deactivated hosts and associated services.  
>
> At this point, I'd be happy to simply wipe all of my existing stored 
> configurations, as I suspect these four hosts have gotten themselves into 
> some kind of limbo.  However, while the instructions for removing stored 
> config data from the old MySQL puppet db is quite straightforward, it 
> doesn't seem to map to the postgresql DB schema, and I can't find any 
> advice on how to go about wiping it there.  I'd prefer not to just scrap my 
> database, but I'm getting closer to that point.
>
> Any help would be appreciated.
>

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




[Puppet Users] Re: replacing mkdir -p

2013-04-04 Thread Mike Power
Actually I found if I created a resource between path and file called 
element, I could give it a unique name.  Then inside the body I could check 
to see if the File is declared, if not I could declare it.  

On Thursday, April 4, 2013 9:23:54 AM UTC-7, Mike Power wrote:
>
> Puppet right now requires every element of a path to have an individual 
> file definition.  This makes it had to take an arbitrary path as a 
> parameter.  You are forced to require your client to make the entire path 
> structure for you or instead you use an exec resource and call mkdir -p.  
> Using an exec resource does not generate an File resources so autorequire 
> does not work.
>
> I didn't like this, I wanted to be able to once specify a path and have 
> puppet do that autorequire as needed.
>
> Something like:
> path {"/blah/blah/blah/and/blah":
> }
>
>
> In order to make this happen I would have to manually define each file:
> file {"/blah/":
> ensure  => directory,
> }
>
> file {"/blah/blah/":
> ensure  => directory,
> }
>
> file {"/blah/blah/blah/":
> ensure  => directory,
> }
>
> file {"/blah/blah/blah/and/":
> ensure  => directory,
> }
>
> file {"/blah/blah/blah/and/blah/":
> ensure  => directory,
> }
>
> Of course there is a short hand for this:
> file {["/blah/", "/blah/blah/", "/blah/blah/blah/", 
> "/blah/blah/blah/and/","/blah/blah/blah/and/blah/"]:
> ensure  => directory,
> }
>
> Then it occurred to me I could parse the path and produce the array of 
> elements needed.  Something like:
> $path = "/blah/blah/blah/and/blah"
> $file_list = split($path, $file_separator)
> $paths = inline_template('<% parent = nil %><%=@file_list.collect{ 
> |file| parent.nil? ? parent = "#{@file_separator}":parent = 
> "#{parent}#{file}#{@file_separator}"}.join(@path_separator) %>')
> $path_list = split($paths, $path_separator)
> file{$path_list:
> ensure  => directory,
> }
>
> This works great once.  Then you get errors like:
> Error: Duplicate declaration: File[/]
>
> If there anyway to trim down the produced array by removing the resources 
> that already exist?
>
>
>
>
>
>
>
>

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




[Puppet Users] New to Puppet

2013-04-04 Thread HassanzDaName
Hello Everyone,


I'm a new Puppet user.  I'm still learning the ropes by going through the 
documentation available at docs.puppetlabs.com.  


Does anyone know where one might be able to find solutions to the exercises 
that they have posted?  I have worked on a few of them but I'm not sure if 
I'm writing my manifests correctly or not...


Any help would greatly be appreciated.  Thanks again!

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




Re: [Puppet Users] Re: Help me (fully) clear out stored configs from PuppetDB Postgresql

2013-04-04 Thread Ken Barber
Yeah, sounds like a bug Michael or at least something we can improve
upon - DNS is case insensitive: https://tools.ietf.org/rfc/rfc4343.txt
- but to make things more complex you can override what the node name
is in Puppet (ie. node_name_fact and node_name_value), so I can only
imagine the fun debates on such an issue :-).

Raise a bug though, and we'll ponder the problem:

https://projects.puppetlabs.com/projects/puppetdb/issues/new

ken.

On Thu, Apr 4, 2013 at 9:08 PM, Michael O'Dea  wrote:
> < exasperated sigh >
>
> So, the hosts in question have, as part of their unique hostnames, a small
> hex string which is in uppercase.  In the Nagios view where I was seeing
> these offline hosts, the hostname's case was preserved.  Within PuppetDB
> however, the hostname is all lowercase.  As a consequence, these hosts were
> not removed because instead of deactivating that host, a new certname entry
> was created, with my mixed-case value, and that entry was marked as
> deactivated.  The actual host was still humming right along.
>
> Well, I guess I learned something.  Technically there's a bug there -- but
> I've lost a whole day on this issue so I'm going to refrain from reporting
> it at the moment.  Hope this helps someone else.  If you're deactivating a
> host with a capital letter, odds are good you're not deactivating what you
> think you're deactivating.
>
>
> On Thursday, April 4, 2013 3:19:00 PM UTC-4, Michael O'Dea wrote:
>>
>> Hi all,
>>
>> I recently started using the Nagios resources to populate a monitoring
>> server.  I cycle hosts fairly quickly in my environment so already I've had
>> five hosts come and go from under Nagios.  After a fair amount of searching
>> I discovered "puppet node deactivate" and performed same on the removed
>> hosts -- I'm still trying to figure out how to make that part of the process
>> going forward -- but somehow only one of my five hosts ended up being
>> removed from my Nagios configs.  I am using resource { purge => true } for
>> the affected resource types.
>>
>> So here's where I'm at -- if I run puppet node status  on any of
>> these missing hosts, they appear as "deactivated".  If I clear out my nagios
>> config files and re-run puppet agent, the nodes and their services (I did
>> have an exported nagios_service resource when these hosts were alive, which
>> I've since removed -- in case that matters) will re-appear.  I've tried
>> puppet node clean, puppet node destroy, puppet node deactivate, with and
>> without terminus=puppetdb.  I can see in the puppetdb log that it has
>> received multiple deactivate commands for these hosts.  Nonetheless, the
>> items are still appearing when the nagios host performs a collection.  I've
>> got to put an end to that!
>>
>> An example of puppet node status for one of the affected:
>>
>> # puppet node status [badnodename]
>> [badnodename]
>> Deactivated at 2013-04-03T23:00:55.349Z
>> No catalog received
>> No facts received
>>
>>
>> One interesting bit.  First, when I run puppet agent --test, during
>> catalog compilation I _was_ seeing the following for all four affected
>> hosts:
>>
>> warning: Nagios_service check_ssh_[badhost] found in both naginator and
>> naginator; skipping the naginator version
>>
>>
>> Out of frustration, I disabled storedconfigurations on the puppet master
>> and restarted it.  After a few catalogs had processed, I updated Nagios
>> after manually purging the hosts file.  As expected, all my host and service
>> definitions disappeared.  I then re-enabled storedconfigurations,
>> fingers-crossed that the old host defs would be gone -- to my dismay, they
>> reappeared on the *second* catalog run after I brought stored_configs back
>> online.  Now, I no longer get the error message above, but I do still get
>> the deactivated hosts and associated services.
>>
>> At this point, I'd be happy to simply wipe all of my existing stored
>> configurations, as I suspect these four hosts have gotten themselves into
>> some kind of limbo.  However, while the instructions for removing stored
>> config data from the old MySQL puppet db is quite straightforward, it
>> doesn't seem to map to the postgresql DB schema, and I can't find any advice
>> on how to go about wiping it there.  I'd prefer not to just scrap my
>> database, but I'm getting closer to that point.
>>
>> Any help would be appreciated.
>
> --
> 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, se

Re: [Puppet Users] Using Puppet for Application package installation

2013-04-04 Thread Peter Brown
If you have them in a yum repository just add the repo to your node and
install it the usual way with package.

Or do you want to manage the packages in the custom yum repository?


On 4 April 2013 23:39, Dhaval  wrote:

> Hello Guys,
>
> i want to know, can we use puppet to install application packages ( not
> system packages ) .. if yes how , if someone can through some light ..
>
> my requirement is
>
> 1) application team can create package on their own and update in yum repo
> ( without root )
> 2) application team can install package on their own ( without root ) to
> the directories mention in rpm ..
>
> let me know if anyone is aware of similar things available ?
>
> Thanks in advance ...
>
> Regards,
> D
>
> --
> 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Help me (fully) clear out stored configs from PuppetDB Postgresql

2013-04-04 Thread Nick Lewis
On Thursday, April 4, 2013 1:08:06 PM UTC-7, Michael O'Dea wrote:

> < exasperated sigh >
>
> So, the hosts in question have, as part of their unique hostnames, a small 
> hex string which is in uppercase.  In the Nagios view where I was seeing 
> these offline hosts, the hostname's case was preserved.  Within PuppetDB 
> however, the hostname is all lowercase.  As a consequence, these hosts were 
> not removed because instead of deactivating that host, a *new* certname 
> entry was created, with my mixed-case value, and *that* entry was marked 
> as deactivated.  The actual host was still humming right along.
>
> Well, I guess I learned something.  Technically there's a bug there -- but 
> I've lost a whole day on this issue so I'm going to refrain from reporting 
> it at the moment.  Hope this helps someone else.  If you're deactivating a 
> host with a capital letter, odds are good you're not deactivating what you 
> think you're deactivating.  
>
>
I'll join in that exasperated sigh with you. :) This issue pops up fairly 
commonly (albeit usually with hostname vs. fqdn). I remember a conversation 
on irc about having the `puppet node deactivate` command first check if the 
node exists. It could then fail if the node doesn't (because you probably 
just got the name wrong), or have an option to force (if for some reason 
you want to proactively tell PuppetDB a node exists, but is inactive). 
Potentially, we could also perform a regex query and make suggestions. I'm 
not sure what happened with that idea, but I guess it didn't go anywhere. 
At any rate, I think the frustration of accidentally deactivating the wrong 
nodes far outweighs whatever rationale someone might have for deactivating 
a node that doesn't exist. This needs to change.

I'm sorry for your trouble. I'll make sure to follow up on making that 
change, this time.
 

>
> On Thursday, April 4, 2013 3:19:00 PM UTC-4, Michael O'Dea wrote:
>>
>> Hi all,
>>
>> I recently started using the Nagios resources to populate a monitoring 
>> server.  I cycle hosts fairly quickly in my environment so already I've had 
>> five hosts come and go from under Nagios.  After a fair amount of searching 
>> I discovered "puppet node deactivate" and performed same on the removed 
>> hosts -- I'm still trying to figure out how to make that part of the 
>> process going forward -- but somehow only one of my five hosts ended up 
>> being removed from my Nagios configs.  I am using resource { purge => true 
>> } for the affected resource types.  
>>
>> So here's where I'm at -- if I run puppet node status  on any of 
>> these missing hosts, they appear as "deactivated".  If I clear out my 
>> nagios config files and re-run puppet agent, the nodes and their services 
>> (I did have an exported nagios_service resource when these hosts were 
>> alive, which I've since removed -- in case that matters) will re-appear. 
>>  I've tried *puppet node clean*, *puppet node destroy*, *puppet node 
>> deactivate*, with and without terminus=puppetdb.  I can see in the 
>> puppetdb log that it has received multiple deactivate commands for these 
>> hosts.  Nonetheless, the items are still appearing when the nagios host 
>> performs a collection.  I've got to put an end to that! 
>>
>> An example of puppet node status for one of the affected:
>>
>> # puppet node status [badnodename]
>> [badnodename]
>> Deactivated at 2013-04-03T23:00:55.349Z
>> No catalog received
>> No facts received
>>
>>
>> One interesting bit.  First, when I run puppet agent --test, during 
>> catalog compilation I _was_ seeing the following for all four affected 
>> hosts:  
>>
>> warning: Nagios_service check_ssh_[badhost] found in both naginator and 
>> naginator; skipping the naginator version
>>
>>
>> Out of frustration, I disabled storedconfigurations on the puppet master 
>> and restarted it.  After a few catalogs had processed, I updated Nagios 
>> after manually purging the hosts file.  As expected, all my host and 
>> service definitions disappeared.  I then re-enabled storedconfigurations, 
>> fingers-crossed that the old host defs would be gone -- to my dismay, they 
>> reappeared on the *second* catalog run after I brought stored_configs back 
>> online.  Now, I no longer get the error message above, but I do still get 
>> the deactivated hosts and associated services.  
>>
>> At this point, I'd be happy to simply wipe all of my existing stored 
>> configurations, as I suspect these four hosts have gotten themselves into 
>> some kind of limbo.  However, while the instructions for removing stored 
>> config data from the old MySQL puppet db is quite straightforward, it 
>> doesn't seem to map to the postgresql DB schema, and I can't find any 
>> advice on how to go about wiping it there.  I'd prefer not to just scrap my 
>> database, but I'm getting closer to that point.
>>
>> Any help would be appreciated.
>>
>

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

[Puppet Users] dependancies needed for tag skipped classes?

2013-04-04 Thread Kubes
All

I am running puppet with tags to skip most of the manifest, and to just to 
install the admin users...  but it seems that entire manifest 

puppet agent --test --tags User::Admins --debug

this fails with 
   err: /Stage[main]/Ruby::Install/Package[rubygem-colored]: Provider gem 
is not functional on this host


   1. Why is this being applied?  Does not match the tags  users vs ruby?
   2. Also the manifest "requires" that gem be installed prior?


puppet v2.7.18


  package { 'ruby':
ensure  => latest,
  }
  package { 'rubygems':
ensure  => latest,
require => Package['ruby'],
  }
  package { 'rubygem-colored':
ensure  => latest,
name=> 'colored',
provider=> 'gem',
require => Package['ruby','rubygems'],
  }

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




[Puppet Users] Problems with Puppet installer on Ubuntu 12.04 LTS

2013-04-04 Thread Robertico Gonzalez
Hi,

My platform is Ubuntu 12.04.  The hostname is puppet and this is a Virtual 
Machine in Vmware 5.0.  
This is a lab server and it is behind a proxy.  I am having a problem with 
the installer.  Any
ideas what is going on?

root@puppet:/home/rbgonza/puppet/puppet-enterprise-2.8.0-all# 
./puppet-enterprise-installer

Puppet Enterprise v2.8.0 installer

Puppet Enterprise documentation can be found at 
http://links.puppetlabs.com/puppet_enterprise_2.8_documentation


STEP 1: SELECT AND CONFIGURE ROLES

   This installer will offer to install the puppet master, console, cloud 
provisioner, and puppet agent
   roles.

-> puppet master

   The puppet master serves configurations to a group of puppet agent 
nodes. This role also provides
   MCollective's message queue and client interface. It should be installed 
on a robust, dedicated server.

?? Install puppet master? [y/N] y

-> cloud provisioner

   The cloud provisioner can create and bootstrap new machine instances and 
add them to your Puppet
   infrastructure. It should be installed on a trusted node where site 
administrators have shell access.

?? Install the cloud provisioner? [y/N] y

-> console

   The console is a web interface for viewing reports, classifying nodes, 
directly managing resources,
   controlling Puppet runs, and invoking MCollective agents. It should 
usually be installed on the puppet
   master server, but can also installed separately.

?? Install the console? [Y/n] y

-> puppet agent

   The puppet agent role is automatically installed with the console, 
puppet master, and cloud provisioner
   roles.

?? The puppet master's certificate will contain a unique name ("certname"); 
this should be the main DNS name
   at which it can be reliably reached. Puppet master's certname? [Default: 
puppet]
?? The puppet master's certificate can contain DNS aliases; agent nodes 
will only trust the master if they
   reach it at its certname or one of these official aliases. Puppet 
master's DNS aliases (comma-separated
   list)? [Default: puppet]
?? Admin email address (will be used as account name) for accessing the 
console interface? email
?? Password for user email (minimum 8 characters)?
Confirm Password:

   The console requires an SMTP server to email account information to 
users.
?? What is the name of your SMTP server? mail.yahoo.com
?? The console requires a MySQL database server. Install a new database 
server from your operating system's
   repository and setup the console? [Y/n] y

-> Vendor Packages

   The installer has detected that Puppet Enterprise requires additional 
packages from your operating system
   vendor's repositories, and can automatically install them. If you choose 
not to install these packages
   automatically, the installer will exit so you can install them manually.

   Additional vendor packages required for installation:
   * curl
   * libapr1
   * libaprutil1
   * libaprutil1-dbd-sqlite3
   * libaprutil1-ldap
   * libreadline5
   * mysql-client
   * mysql-common
   * mysql-server
   * openjdk-6-jre-headless

?? Install these packages automatically? [Y/n] y

-> Convenience Links

   The selected Puppet software will be installed into "/opt/puppet", which 
may not be included in your
   default shell PATH. For ease of use, this installer can create symbolic 
links to these executables in
   "/usr/local/bin".

?? Create symbolic links to Puppet executables in "/usr/local/bin"? [Y/n] y


STEP 2: CONFIRM PLAN

You have selected to install the following components (and their 
dependencies)
* Puppet Master
* Console
* Cloud Provisioner
* Puppet Agent

?? Perform installation? [Y/n] y
## Saved answers to file: ./answers.lastrun.puppet

##
 
Saved answers to file: /etc/puppetlabs/installer/answers.install
Warning: overwriting 
/etc/puppetlabs/facter/facts.d/puppet_enterprise_installer.txt
Creating Backup: 
/etc/puppetlabs/facter/facts.d/puppet_enterprise_installer.txt.bak


STEP 3: INSTALL PACKAGES

## Installing packages from repositories...

bzip2: Data integrity error when decompressing.
Input file = (stdin), output file = (stdout)

It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.

You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.

W: Failed to fetch 
http://us.archive.ubuntu.com/ubuntu/dists/precise/restricted/sourc

[Puppet Users] ./puppet-enterprise-installer error on Ubunt 12.04 LTS

2013-04-04 Thread Robertico Gonzalez
Hi,

I am trying to install Puppet on a master node, but I am getting some 
errors.  

My platform is Ubuntu 12.04 LTS.  The hostname is puppet and this is a 
Virtual Machine in Vmware 5.0.  This is a lab server and it is behind a 
proxy.

root@puppet:/home/rbgonza/puppet/puppet-enterprise-2.8.0-all# 
./puppet-enterprise-installer

Puppet Enterprise v2.8.0 installer

Puppet Enterprise documentation can be found at 
http://links.puppetlabs.com/puppet_enterprise_2.8_documentation


STEP 1: SELECT AND CONFIGURE ROLES

   This installer will offer to install the puppet master, console, cloud 
provisioner, and puppet agent
   roles.

-> puppet master

   The puppet master serves configurations to a group of puppet agent 
nodes. This role also provides
   MCollective's message queue and client interface. It should be installed 
on a robust, dedicated server.

?? Install puppet master? [y/N] y

-> cloud provisioner

   The cloud provisioner can create and bootstrap new machine instances and 
add them to your Puppet
   infrastructure. It should be installed on a trusted node where site 
administrators have shell access.

?? Install the cloud provisioner? [y/N] y

-> console

   The console is a web interface for viewing reports, classifying nodes, 
directly managing resources,
   controlling Puppet runs, and invoking MCollective agents. It should 
usually be installed on the puppet
   master server, but can also installed separately.

?? Install the console? [Y/n] y

-> puppet agent

   The puppet agent role is automatically installed with the console, 
puppet master, and cloud provisioner
   roles.

?? The puppet master's certificate will contain a unique name ("certname"); 
this should be the main DNS name
   at which it can be reliably reached. Puppet master's certname? [Default: 
puppet]
?? The puppet master's certificate can contain DNS aliases; agent nodes 
will only trust the master if they
   reach it at its certname or one of these official aliases. Puppet 
master's DNS aliases (comma-separated
   list)? [Default: puppet]
?? Admin email address (will be used as account name) for accessing the 
console interface? em...@company.com
?? Password for user em...@company.com (minimum 8 characters)?
Confirm Password:

   The console requires an SMTP server to email account information to 
users.
?? What is the name of your SMTP server? mail.yahoo.com
?? The console requires a MySQL database server. Install a new database 
server from your operating system's
   repository and setup the console? [Y/n] y

-> Vendor Packages

   The installer has detected that Puppet Enterprise requires additional 
packages from your operating system
   vendor's repositories, and can automatically install them. If you choose 
not to install these packages
   automatically, the installer will exit so you can install them manually.

   Additional vendor packages required for installation:
   * curl
   * libapr1
   * libaprutil1
   * libaprutil1-dbd-sqlite3
   * libaprutil1-ldap
   * libreadline5
   * mysql-client
   * mysql-common
   * mysql-server
   * openjdk-6-jre-headless

?? Install these packages automatically? [Y/n] y

-> Convenience Links

   The selected Puppet software will be installed into "/opt/puppet", which 
may not be included in your
   default shell PATH. For ease of use, this installer can create symbolic 
links to these executables in
   "/usr/local/bin".

?? Create symbolic links to Puppet executables in "/usr/local/bin"? [Y/n] y


STEP 2: CONFIRM PLAN

You have selected to install the following components (and their 
dependencies)
* Puppet Master
* Console
* Cloud Provisioner
* Puppet Agent

?? Perform installation? [Y/n] y
## Saved answers to file: ./answers.lastrun.puppet

##
 
Saved answers to file: /etc/puppetlabs/installer/answers.install
Warning: overwriting 
/etc/puppetlabs/facter/facts.d/puppet_enterprise_installer.txt
Creating Backup: 
/etc/puppetlabs/facter/facts.d/puppet_enterprise_installer.txt.bak


STEP 3: INSTALL PACKAGES

## Installing packages from repositories...

bzip2: Data integrity error when decompressing.
Input file = (stdin), output file = (stdout)

It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.

You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.

W: Failed to fetch 
http://us.archive.ubuntu.com/

[Puppet Users] Re: Problem on live-management - Node list missing - User ->Find Resources not working

2013-04-04 Thread Lukas Wenning
I went on freenode to ask for help and they recommended me to downgrade.

Downgrading to version 2.6 did the trick for me: 
https://s3.amazonaws.com/pe-builds/released/2.8.0/puppet-enterprise-2.8.0-debian-6-amd64.tar.gz

i can now see the nodes, and even refresh the user resources. also i don`t 
see the described error anymore

Am Sonntag, 31. März 2013 00:13:00 UTC+1 schrieb Juan Pablo Baudoin:
>
> Hello
>   I'm testing Puppet Enterprise 2.7 and I'm having the following problem.
>
> When I go to live-management, the node list sometimes is missing. 
>
>
> 
>
>
> This behavior is random, but when It happend I find the following error on 
> the logs:
>
> ==> pe-httpd/error.log <==
> INFO Sat Mar 30 20:04:09 -0300 2013: memcached saving 
> ["raw_agent_inventory"] [4940e0b29c08b35a29d4e4b0c63d1304] -> 
> [[# @results={:data=>{:agents=>[{:agent=>"discovery", :license=>"Apache 
> License, Version 2", :version=>"unknown", :url=>"unknown", 
> :description=>"unknown", :name=>"discovery", :author=>"R.I.Pienaar  >", :] [3631]
> INFO Sat Mar 30 20:04:09 -0300 2013: memcached retrieving ["empty_filter"] 
> [7bc4614f5252e68308196a74a0cac980] => [nil] [3]
> Stomp::Error::NoCurrentConnection - no current connection exists:
>  /opt/puppet/lib/gems/1.8/gems/stomp-1.2.3/lib/stomp/connection.rb:334:in 
> `publish'
>  /opt/puppet/libexec/mcollective/mcollective/connector/stomp.rb:189:in 
> `send'
>  /opt/puppet/lib/site_ruby/1.8/mcollective/client.rb:65:in `sendreq'
>  /opt/puppet/lib/ruby/1.8/timeout.rb:67:in `timeout'
>
>
> When the list appears, and I try to use the "Find Resources" buton under 
> "User",  It stay wiht the message: "Finding user resources"
>
>
> 
>
>
>

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