[Puppet Users] Question about Deferred functions

2020-07-06 Thread Vincent Lamers
Hi All,

as I understood a Deferred function is invoked as the first part of
enforcing a catalog. 

I have a deferred function which depends on the results of a certain
resource. So I have to make sure the resource is applied before the
deferred function is executed.
Unfortunately a require function doesn't solve this.

How do I accomplish that? 

regards,
Vincent Lamers

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/e6fd7208cae846df4d3e6c7931ec92646be9da8f.camel%40atcomputing.nl.


Re: [Puppet Users] Referencing Deferred functions in Puppet Code or Hiera YAML

2020-01-24 Thread Vincent Lamers
isn't better not to return a Sensitive data in vault_lookup.rb (just plain 
text), but wrap the Deferred function with Sensitive?
Like this:
$secret_lookup = Sensitive(Deferred('vault_lookup::lookup', ["secret/
client.example.com", 'https://puppet.example.com:8228']))

notify {mysql_root: 
  message => Deferred('get', [$secret_lookup.unwrap, 'mysql_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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/78981ba9-05a1-461a-8e41-24a512f5b5db%40googlegroups.com.


Re: [Puppet Users] Re: [ACTION] Changes to release package links

2019-05-15 Thread Bob Vincent
First sign of breakage: https://tickets.puppetlabs.com/browse/BKR-1590

Fixed here: https://github.com/puppetlabs/beaker-puppet/pull/113

On Monday, May 6, 2019 at 6:16:25 PM UTC-4, Molly Waggett wrote:
>
> Hey folks,
>
> REMINDER that the repository path changes* will take effect next week, on 
> Tuesday, 
> May 14.
>
> Please make sure any custom tooling using these paths has been updated.
>
> If you have any questions or concerns, please reply-all to this email.
>
> Thanks!
>
> * in case you forgot, changes include:
>
> 1. yum release packages will be removed from nested directories on 
> yum.puppet.com (e.g. yum.puppet.com/puppet6/
> puppet6-release-el-7.noarch.rpm
>
> --> yum.puppet.com/puppet6-release-el-7.noarch.rpm).
>
> PLEASE NOTE that these are actually symlinks to release packages that live 
> inside their respective repositories, so package updates can be applied via 
> your package manager, like any other package.
>
> 2. links to nightly release packages will be removed from {yum,apt}.
> puppet.com.
> 3. PC1 (and older) packages will be moved to release-archives.puppet.com. 
> This includes puppet-agent 1.10.x and puppet 4.x.
>
> On Tue, Apr 23, 2019 at 9:13 AM Molly Waggett  > wrote:
>
>> Hi John,
>>
>> The top-level release packages are actually symlinks to release packages 
>> that *are* inside their respective repositories. When we publish new 
>> release packages, we update those links so that users don't have to bump 
>> version numbers in any tooling that installs these repositories.
>>
>> Thanks!
>>
>> On Tue, Apr 23, 2019 at 6:21 AM jcbollinger > > wrote:
>>
>>>
>>>
>>> On Monday, April 22, 2019 at 4:31:09 PM UTC-5, Molly Waggett wrote:

 1. Release packages (for all active streams) will live at the top level 
 only. 

 This change only affects yum.puppet.com (and nightlies.puppet.com/yum), 
 giving us consistency with the layout on apt.puppet.com. Currently, 
 yum release packages live inside their corresponding repo directory, e.g. 
 yum.puppet.com/puppet6/puppet6-release-fedora-28.noarch.rpm 
 . 
 THESE WILL BE REMOVED. 

 Here are some examples of where you will be able to find release 
 packages:

 Old: yum.puppet.com/puppet6/puppet6-release-el-7.noarch.rpm

 New: yum.puppet.com/puppet6-release-el-7.noarch.rpm


>>> It is conventional for repository release packages to be inside their 
>>> repositories so that repository configuration updates can be published and 
>>> applied via the same mechanism that is used for ordinary packages.  Even if 
>>> this is a capability that Puppet rarely uses, it seems ill-considered to 
>>> give it up.  The desire for consistency could be as well served by moving 
>>> the other release packages into their repos, or by making the release 
>>> packages consistently  available in both places.
>>>
>>>
>>> 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...@googlegroups.com .
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/puppet-users/c711eeca-239c-4022-8f4b-55f9ea577c8d%40googlegroups.com
>>>  
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> -- 
>> *Molly Waggett*
>> she/her/hers
>> Release Engineer @ Puppet, Inc.
>>
>
>
> -- 
> *Molly Waggett*
> she/her/hers
> Release Engineer @ Puppet, Inc.
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/8607ae27-d495-4aaf-b113-e263dad063dd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Need help for configuring / migrating from Puppet 3.8 to Puppet 6.x

2019-04-17 Thread Bob Vincent
I believe the hierarchy should proceed from most-specific to most-general;
therefore "common.yaml" should be the last, not the first, item in the list.

On Wed, Apr 17, 2019 at 9:42 AM Matthias Steffens 
wrote:

> Hi everybody!
>
> I've the task to migrate our existing puppet installation from Puppet 3.8
> to Puppet 6.x and my colleague gave me the following tasks to do this:
>
> - Hiera: all nodes should be configurable via hiera --> as with our
> currently installed version which has the following configuration:
>
> ---
> :hierarchy:
>   - "nodes/%{::fqdn}"
>   - common
> :backends:
>   - yaml
> :yaml:
>   :datadir: "/etc/puppet/environments/%{::environment}/hieradata"
>
> - integrate to hiera-levels: 1. One for "common" (valid for all nodes of
> the env) ---> have a look at the code above
>  2. One per Client-Name
>
> - NTP should be configured - the IP addresses of the NTP servers on the
> "common" should be taken over and overwritten by the "Node-Config" if
> necessary
>
> - under /var/tmp/ the directory "common" should be created uniformly
>
> - For each node, create a file under "/var/tmp/common" that has the
> hostname (FQDN) of the respective node. The content of the file should be
> the configured NTP-server.
>
> Especially at the last point I have problems to implement this with puppet.
>
> So far I've done the following:
>
> - Created the *site.pp* under*
> /etc/puppetlabs/code/environments/production/manifests *with the
> following content:
>
> Code hier eingeben...node default {
>   class { 'ntp':
> servers => [
>   'nist-time-server.eoni.com',
>   'nist1-lv.ustiming.org',
>   'ntp-nist.ldsbc.edu'
> ],
> service_enable => true,
> service_ensure => 'running',
>   }
>   file { '/var/tmp/common':
> ensure => 'directory'
>   }
>
> }
>
> - Create an *hiera.yaml* under */etc/puppetlabs/puppet* with the
> following content:
>
> ---
> # Hiera 5 Global configuration file
>
> version: 5
>
> defaults:
>   datadir: "/etc/puppet/environments/%{::environment}/hieradata"
>   data_hash: yaml_data
> hierarchy:
>  - name: "Common"
>path: "common.yaml"
>data_hash: yaml_data
>
>  - name: "Clients"
>path: "nodes/%{::fqdn}"
> # hierarchy: []
>
> Hope, all of you can give me good tipps how I can solve my taks!
>
> Thanks a lot for your help :)
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/9e64de29-f7c9-4c51-996f-41aec7843911%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/9e64de29-f7c9-4c51-996f-41aec7843911%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Robert August Vincent, II
*(pronounced "Bob" or "Bob-Vee")*
The web is like usenet, but
the elephants are untrained.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAB1pdZY25u0TGGRoXgj1YvPVvv11Y4%2B8vLYDFiSB4_PYG1ZwFg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Problems testing branching using rspec-puppet with hiera

2019-04-17 Thread Bob Vincent
Thanks for the reference.   Note that RuboCop had a problem with the style; 
I'll push a patch presently.

On Wednesday, February 17, 2016 at 10:30:06 AM UTC-5, Trevor Vaughan wrote:
>
> Hi Joseph,
>
> You can see how we do it in SIMP using this reference spec_helper.rb 
> https://github.com/simp/pupmod-simp-simplib/blob/master/spec/spec_helper.rb
> .
>
> The way it's set up allows you to use variables to change your hieradata 
> on the fly and can use the context name to pick hiera data files 
> automatically.
>
> Thanks,
>
> Trevor
>
> On Wed, Feb 17, 2016 at 10:11 AM, Joseph Wilkicki  > wrote:
>
>> It isn't really feasible to convert to a class parameter since I'm 
>> testing profiles which, as I understand it, should not be using class 
>> parameters.  I've since found a solution that seems like it might work; 
>>  I've been working on other topics for a bit, but when I get back to it 
>> I'll post some example code to this thread in the hopes that others might 
>> find it useful.
>>
>> On Tue, Feb 16, 2016 at 5:27 PM, Felix Frank <
>> felix...@alumni.tu-berlin.de > wrote:
>>
>>> Hi,
>>>
>>> I don't really have an answer for you, but would it be a feasible 
>>> workaround for you to convert your variable lookup into a class parameter 
>>> that is looked up implicitly? This way, you can just exploit rspec-puppet's 
>>> own facilities for providing test input, and need not perform the whole 
>>> Hiera dance (it's supposed to be a unit test, after all - you're grazing 
>>> integration test level there).
>>>
>>> HTH,
>>> Felix
>>>
>>>
>>> On 01/27/2016 11:27 PM, jwil...@gmail.com  wrote:
>>>
>>> Hi all! 
>>>
>>> I've been banging my head against this for the past couple of days and 
>>> I'm pretty stuck.  I've started implementing rspec tests for a class that 
>>> uses a hiera lookup and then uses the looked up value to control part of 
>>> its logic.  A simplified version:
>>>
>>> class mytest {
>>>   
>>>  $mycondition = hiera('my::condition')
>>>
>>>  if $mycondition {
>>>  ...
>>>  }
>>>
>>> }
>>>
>>>
>>> My spec_helper looks like this:
>>>
>>> require 'rubygems'
>>> require 'puppetlabs_spec_helper/module_spec_helper'
>>>
>>>
>>> RSpec.configure do |c|
>>>   c.hiera_config = 'spec/fixtures/hiera/hiera.yaml'
>>> end
>>>
>>> So far, so standard.   What I want to be able to test, obviously, is 
>>> making sure that when $mycondition is true, the resources in the if 
>>> statement are added to the catalog, and if $mycondition is false, they 
>>> aren't.
>>>
>>> So, my spec in spec/classes/mytest_spec.rb looks like this:
>>>
>>> require 'spec_helper'
>>>
>>> describe 'mytest' do
>>>
>>>   let(:node) { 'truecondition' }
>>>   if {
>>> should compile
>>>   }
>>>
>>> end
>>>
>>> My hiera.yaml file looks like this:
>>>
>>> ---
>>>  :backends:
>>> - yaml
>>>  :yaml:
>>>:datadir: 'spec/fixtures/hieradata'
>>>  :hierarchy:
>>>- "%{::fqdn}"
>>>
>>> and my spec/fixtures/hieradata/truecondition.yaml looks like this:
>>>
>>> ---
>>>   my::condition: false
>>>
>>>
>>> With this setup, my spec class returns an error:
>>>
>>> Failures:
>>>
>>>   1) mytest should compile into a catalogue
>>> without dependency cycles
>>>  Failure/Error: should compile
>>>error during compilation: Evaluation Error: Error while 
>>> evaluating a Func
>>> tion Call, Could not find data item my::condition in any Hiera data file
>>>  and no default supplied at 
>>> C:/puppet/mytest/spec/fixtures/modules/mytest/manifests/init.pp:3:22 on 
>>> node truecondition
>>>  # ./spec/classes/mytest_spec.rb:7:in `block (2 levels) in
>>> '
>>>
>>> Finished in 0.4212 seconds (files took 2.42 seconds to load)
>>> 1 example, 1 failure
>>>
>>> Ultimately, I thought I could specify a different context for each state 
>>> of $mycondition: true and false, so my test would look like:
>>>
>>>
>>> require 'spec_helper'
>>>
>>> describe 'mytest' do
>>>context "with mycondition => true" do
>>>let(:node) { 'truecondition' }
>>>if {
>>> should compile
>>>}
>>>end
>>>
>>>context "with mycondition => false" do
>>>let(:node) { 'falsecondition' }
>>>if {
>>> should compile
>>>}
>>>end
>>>
>>> end
>>>
>>> I tried having my contexts set a fact that hiera could use to select 
>>> which yaml file it got data from: didn't work.  I tried having a different 
>>> hiera.yaml file, one for true and one for false, that would load a 
>>> different common.yaml (since common.yaml seems to work, but nothing else), 
>>> and that didn't work.  The example above was the last thing I tried, since 
>>> rspec-puppet is supposed to provide the fqdn fact, so I thought setting the 
>>> node might help it switch. Failure on all sides!
>>>
>>> I'm trying to do this because we've tried to write our profiles 
>>> following the practice of doing hiera lookups instead of class parameters, 
>>> as recommended here:  
>>> 

[Puppet Users] Re: Issues with Hiera command line usage with fact parameters

2017-02-23 Thread Vincent Deygas
Hi,

Very old thread but if someone else is redirected here by a google search...
In my case, I used:

$ cat facts.yaml
---
  '::fqdn': "creator.mgnt.local"

And it worked.

Regards,
Vincent.

Le jeudi 9 janvier 2014 11:29:34 UTC, Peter a écrit :
>
> Hi List,
>
> I am experimenting with different hiera hierarchy's through the hiera 
> command line.  I am passing in different facts to simulate different nodes. 
>  In the beginning I would manually pass them in as parameters on the 
> command line after a while when I wanted to pass in more and more facts I 
> decided to use the YAML scope file option.
>
> This does not seem to work when I use the :: notation in the hieral.yaml 
> under the hierarchy.  I have simplified my hierarchy to demonstrate the 
> issue.  The relevant files look like:
>
> **
> $ ls -R
> .:
> facts.yaml  hiera.yaml  hieradata
>
> ./hieradata:
> common.yaml  node
>
> ./hieradata/node:
> creator.mgnt.local.yaml
>
> **
>  $ cat hiera.yaml
> ---
> :backends:
>   - yaml
> :yaml:
>   :datadir: ./hieradata
> :hierarchy:
>   - "node/%{::fqdn}"
>   - common
>
> **
> $ cat hieradata/common.yaml
> ---
> ip: '192.168.0.1'
>
>
> **
> $ cat hieradata/node/creator.mgnt.local.yaml
> ---
> ip: '10.0.0.1'
>
> **
> $ cat facts.yaml
> ---
>   fqdn: "creator.mgnt.local"
>
> If I manually pass the facts on the command line it works
>
> $ hiera -c hiera.yaml ip ::fqdn=creator.mgnt.local -d
> DEBUG: 2014-01-09 22:19:48 +1100: Hiera YAML backend starting
> DEBUG: 2014-01-09 22:19:48 +1100: Looking up ip in YAML backend
> DEBUG: 2014-01-09 22:19:48 +1100: Looking for data source 
> node/creator.mgnt.local
> DEBUG: 2014-01-09 22:19:48 +1100: Found ip in node/creator.mgnt.local
> 10.0.0.1
>
>
> However if I use a file which contains the facts it doesn't work
>
> $ hiera -c hiera.yaml ip -y facts.yaml -d
> DEBUG: 2014-01-09 22:26:31 +1100: Hiera YAML backend starting
> DEBUG: 2014-01-09 22:26:31 +1100: Looking up ip in YAML backend
> DEBUG: 2014-01-09 22:26:31 +1100: Looking for data source common
> DEBUG: 2014-01-09 22:26:31 +1100: Found ip in common
> 192.168.0.1
>
> In the facts file I have have tried it also declaring it like "::fqdn" but 
> that also does not work.  Is there an option to bring the factor variables 
> into the global scope?
>
> Thanks,
>
> Peter
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/0d63878c-e53a-4d9b-88a2-711777d1fc1b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Error: Failed to submit 'deactivate node' command

2015-05-20 Thread Vincent Weathers
I finally figured out what this was. In my puppetmaster's
 /etc/puppet.conf

file, I needed to declare 

certname = puppet-sys

in the [main], [master], and [agent] sections.

We do not use FQDN's in our puppet environment due to weird DNS stuff. So, 
we use the shortnames only. PuppetDB was not able to take commands from the 
puppetmaster due to the the fact that the shortname wasn't declared in all 
three sections. It was trying to use the FQDN.



On Wednesday, May 20, 2015 at 6:19:18 AM UTC-5, Thomas Müller wrote:



 Am Mittwoch, 20. Mai 2015 07:15:07 UTC+2 schrieb Vincent Weathers:

 This may have been asked before, but I'm having problems clearing out 
 nodes from puppetdb.

 Some background info:

 OS:

 [root@puppet-sys puppet]# cat /etc/redhat-release
 Scientific Linux release 6.6 (Carbon)

 Puppet version:

 [root@puppet-sys puppet]# puppet -V
 3.7.5

 PuppetDB version: 2.3.4

 Puppetboard version: 0.0.4

 Basically, everything seems to work just fine when executing puppet runs 
 and reporting to puppetboard. However, when I try to deactivate a node so 
 that it no longer appears in the puppetdb reports, I get this error:

 [root@puppet-sys puppet]# puppet node deactivate sys-docs

 Error: Failed to submit 'deactivate node' command for sys-docs to 
 PuppetDB at puppet-sys.example.com:8081: SSL_connect SYSCALL returned=5 
 errno=0 state=SSLv3 read finished A

 Error: Try 'puppet help node deactivate' for usage


 puppet node deactivate sends a command to PuppetDB to set a node to 
 inactive. It won't delete it from the PuppetDB. The error message IMHO 
 means it can't verify SSL certificates. is puppet-sys.example.com 
 http://puppet-sys.example.com:8081/ your puppetdb server and it really 
 works for submitting reports?
  


 I can run 
 puppet cert clean certname

 commands to clean out certs just fine.


 This only operates on the certificate files and does not connect to 
 PuppetDB.

  


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/3e0ef799-ef78-4a8c-ae1b-97c4813dab8b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Error: Failed to submit 'deactivate node' command

2015-05-19 Thread Vincent Weathers
This may have been asked before, but I'm having problems clearing out nodes 
from puppetdb.

Some background info:

OS:

[root@puppet-sys puppet]# cat /etc/redhat-release
Scientific Linux release 6.6 (Carbon)

Puppet version:

[root@puppet-sys puppet]# puppet -V
3.7.5

PuppetDB version: 2.3.4

Puppetboard version: 0.0.4

Basically, everything seems to work just fine when executing puppet runs 
and reporting to puppetboard. However, when I try to deactivate a node so 
that it no longer appears in the puppetdb reports, I get this error:

[root@puppet-sys puppet]# puppet node deactivate sys-docs

Error: Failed to submit 'deactivate node' command for sys-docs to PuppetDB 
at puppet-sys.example.com:8081: SSL_connect SYSCALL returned=5 errno=0 
state=SSLv3 read finished A

Error: Try 'puppet help node deactivate' for usage


I can run 
puppet cert clean certname

commands to clean out certs just fine.



-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/3e7577fb-bd04-47b4-bb57-db5953017356%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Exporting custom fact to PuppetDB ok with command but KO with daemon

2014-11-27 Thread Vincent Miszczak
Hello,

Nearly everything is in the title.

When I manually run a puppet agent --test on a host (let's say host1) 
that export @@something, I can get something on another host (let's say 
host2) and I'm happy.

Later, when the daemon on host1 runs, it still exports @@something but 
custom facts are empty instead of having their value.

What am I missing ?

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/8419198e-ac4c-4065-a1b2-235e68e8f4e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] export concat::fragments does not work

2014-10-06 Thread Vincent Miszczak
Hello,
I need to export concat::fragment on some nodes and gather the results on 
some other.

To create the export I do something like :
@@concat::fragment{/myfile-$fqdn:
   target=/myfile
}

but on the export node I get : 
Invalid relationship [...] because Exec[concat_/myfile] doesn't seem to be 
in the catalog.

I don't want/need to declare a concat for /myfile, because I would need 
the required filesystem layout for the final file. I just want to export 
fragments.

Am I missing something ?


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/dfaecacf-11f8-426f-90d1-11c266f3c2c0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: require broken with create_resources() ?

2014-08-21 Thread Vincent Miszczak
I've done some tests :

Foreman really just reply a YAML hash with the class name and its 
parameters (there is a viewer, it just output what it should).

I've been trying parse order issue (myclass is output after 
applications), but having anotherclass that come before, it does not 
work.
I've been trying type issue, by refering something else than a class, still 
does not work.

It looks like there is a difference in this case between the ENC subsystem 
and Hiera :/



-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/4a330be0-e6c9-4ae3-b0d9-726222ba7736%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] require broken with create_resources() ?

2014-08-20 Thread Vincent Miszczak
Hello,

I have a define like this :

define application::install($root,$url,$user=root)
{
 include git
 #Puppet wants a command to start with /something...
 $cmd=/bin/echo 1{ cd $root||mkdir $rootcd $root ; }git clone -b 
prod $url .
 $unless=/bin/ls -alh $root |grep '.git'


 exec{$cmd:
 command=$cmd,
 unless=$unless,
 user=$user, 
 require=Package[git]
 }
}


being called with a class :

class applications($apps)
{
  create_resources(application::install,$apps)
}


and 
$apps = { 
   test = {
 url= https://mygitrepos/myapp.git;,
 root= /opt/apps/myapp,
 user=root,
 require=Class[myclass],
   }
}


class myclass is included by some other module

I get :

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Invalid relationship: Application::Install[test] { require = 
Class[myclass] }, because Class[myclass] doesn't seem to be in the catalog

but the class *is* really included.

For instance, if I do not require in $apps but require in the exec{}, it 
will work just fine. Ofc I won't do this because I need things to be 
dynamic.

Expected behavior is it should work, unless I missed something.

Any help welcome.





-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/4a25b0c0-64a6-4b4d-bdd6-cf13a0ed5738%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: require broken with create_resources() ?

2014-08-20 Thread Vincent Miszczak
I've simplified things a bit in the description to make it easy to read.

I don't really have 
$apps = { 
   test = {
 url= https://mygitrepos/myapp.git;,
 root= /opt/apps/myapp,
 user=root,
 require=Class[myclass],
   }
}


Instead, I pass a YAML hash through an ENC (Foreman to be precise):
test: 
 url: https://mygitrepos/myapp.git;
 root:/opt/apps/myapp
 user: root
 require: Class[myclass]


I finally understand this won't work because this is expanded to 
require=Class[myclass] instead of require=Class[myclass].
I was mislead by the error message that does not have any quote to 
distinguish strings from the rest.

As suggested in the previous post doing :
requirement: myclass

and having into 
define application::install($root,$url,$user=root,$requirement=undef)

exec{$cmd:
 command=$cmd,
 unless=$unless,
 user=$user, 
 require=[Package[git],Class[$requirement]]
 }

This is not as powerful as what I intended first (because I'm restricted to 
class, not all types I want), but for now, this is enough for my precise 
problem.

Thank you very much guys! 




-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/ad337de7-b1e7-403f-9ec4-f2c4558c9d03%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] external_nodes setting with Environments

2014-08-07 Thread Vincent Bernat
On Friday, February 25, 2011 2:10:13 PM UTC+1, Thomas Bellman wrote:

 On 2011-02-25 13:27, Dave Augustus wrote:

  I have added the following in my puppetmaster.conf file:
  
  [production]
  manifest = $vardir/env/production/manifests/site.pp
  modulepath = 
 $vardir/env/production/modules:$vardir/env/common/modules
  [test]
  manifest = $vardir/env/test/manifests/site.pp
  modulepath = $vardir/env/test/modules:$vardir/env/common/modules
  [development]
  manifest = $vardir/env/development/manifests/site.pp
  modulepath = 
 $vardir/env/development/modules:$vardir/env/common/modules
  
  On each client, in puppet.conf:
  
  [main]
  environment = test
  
  The end result is 3 sets of manifests and modules. I then can move a
  module between the environments as needed.

 But you can't have different versions of the external node classifier
 script in your environments.  You can't try out a new version of that
 in development, while still having the tried and trusted version
 running in production.

 Unless you go for a wrapper script that just digs out the environment
 from /var/lib/puppet/yaml/facts/NODENAME.yaml and execs the script
 that belongs to that environment.  And except for the part of digging
 through a YAML file, it is a pretty easy thing to do, but it is a tiny
 bit ugly.


I am digging out this old topic. Has anything changed? I have tried the 
above method but unfortunately, /var/lib/puppet/yaml/facts/NODENAME.yaml is 
only updated after classification. On first run, there is no such file. 
There is nothing udpated in /var/lib/puppet on first run that would get us 
the right environment. The classifier is run without any environment 
variable.

Since 2011, is there anything new for this?



-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/b3b42ab8-f17a-461e-b29d-070780c24454%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Dynamically assign files to hiera hierarchy

2014-05-02 Thread Vincent Miszczak
Hi,

I'd like to add things dynamically to :hierarchy: when I use hiera.

I'd like to be able to do the following :

in site.pp:
hiera_roles()

hiera_roles() would search in hiera for something like :

mynode.yaml:
roles:
 - roles/appserver
 - roles/databaseserver

and I could have :

roles/appserver.yaml:
classes:
 - appserver


roles/databaseserver.yaml:
classes:
 - databaseserver

So my node is not limited to one role, but to any number of roles I decide. 
You know, sometime you have nodes acting as appservers or databaseservers 
and sometimes they do both.

Interpolation tokens in hiera.yaml could have been nice but arrays are not 
properly expanded in context of hiera. 
I've been looking at the code and this should be pretty straightforward to 
do so but I really don't get how to write Ruby code. This looks over 
complicated regarding other language I know such as Python/Java.

I just want a custom function hiera_roles() append to the hierarchy array 
used by Puppet.

Could someone help with writing this custom function ?

Regards,

Vincent


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/76bf3faa-e889-4e70-86fd-404fa0846e00%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Dynamically assign files to hiera hierarchy

2014-05-02 Thread Vincent Miszczak
I finally did it my self.
For sure I hate Ruby.

This custom function will add values from arbitrary keys (must be arrays) 
at the beginning of hierarchy
For my example, I have just included hiera_hook(roles) in site.pp to 
achieve to behavior I described previously.


module Puppet::Parser::Functions
  newfunction(:hiera_hook) do |*args|
require 'puppet/indirector/data_binding/hiera'
require 'hiera'
require 'hiera/scope'
require 'puppet'

key, default, override = HieraPuppet.parse_args(args)
value=HieraPuppet.lookup(key, default, self, override, 
:priority)

hierarchy=Puppet::DataBinding::Hiera.hiera().config[:hierarchy]
value.each do |val|
if not hierarchy.include?(val)
hierarchy.insert(0,val)
end
end
  end
end



Le vendredi 2 mai 2014 16:11:51 UTC+2, Vincent Miszczak a écrit :

 Hi,

 I'd like to add things dynamically to :hierarchy: when I use hiera.

 I'd like to be able to do the following :

 in site.pp:
 hiera_roles()

 hiera_roles() would search in hiera for something like :

 mynode.yaml:
 roles:
  - roles/appserver
  - roles/databaseserver

 and I could have :

 roles/appserver.yaml:
 classes:
  - appserver


 roles/databaseserver.yaml:
 classes:
  - databaseserver

 So my node is not limited to one role, but to any number of roles I 
 decide. You know, sometime you have nodes acting as appservers or 
 databaseservers and sometimes they do both.

 Interpolation tokens in hiera.yaml could have been nice but arrays are not 
 properly expanded in context of hiera. 
 I've been looking at the code and this should be pretty straightforward to 
 do so but I really don't get how to write Ruby code. This looks over 
 complicated regarding other language I know such as Python/Java.

 I just want a custom function hiera_roles() append to the hierarchy array 
 used by Puppet.

 Could someone help with writing this custom function ?

 Regards,

 Vincent




-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/6c4cf202-62ea-4c20-b927-75ac17c8a81f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: Dynamically assign files to hiera hierarchy

2014-05-02 Thread Vincent Miszczak
Hi,

Well I did this in a lab with one node.
I used like this :

*site.pp:*
hiera_hook(roles)
hiera_include(classes)

so my :hierearchy: looked like:

:hierarchy:
 - roles/appserver
 - roles/databaseserver
 - ...
 - common

I suppose the is not enough because subsequent calls will have the hooks 
registered.

Basically what I want it to be able to have a dynamic hierarchy for each 
node, for managing groups.

If I use a single role for a node(can be achieved by hiera(role) and 
%{role}), I have to write 3 roles : app,database,appanddatabase and put 
classes in them. Then, when I change the settings for database, I have to 
write the changes in every role somethinganddatabase = error prone.
If I use a wrapper class for each role that encapsulate the settings, when 
I change settings, I'm writting Puppet code while I want to do this with 
hiera (not the same guys behind).

Well, I still have to think about it.

Any help is welcome.


Le vendredi 2 mai 2014 18:53:57 UTC+2, Felix.Frank a écrit :

 On 05/02/2014 06:43 PM, Vincent Miszczak wrote: 
  For my example, I have just included hiera_hook(roles) in site.pp to 
  achieve to behavior I described previously. 

 Uhuh. 

 How is this used? Does it actually affect subsequent hiera() calls? 


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/683f983f-eba7-491e-9fdb-1fcb54e8917d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] [mcollective] mc does not discover any nodes

2013-10-10 Thread Vincent Nawrocki
Hi all !

I'm working on mcollective for a few days and I have a problem using agents.

I'm on CentOS 6.4, using activeMQ 5.8.0 and mcollective 2.2.4.

I Installed the service agent using yum on the client :
yum install mcollective-service-common

I can see it in the doc list using mco plugin doc.

But now I want to use it and nodes never respond :

--
[root@poste306 puppet]# mco ping
poste306.s11.pfd time=161.65 ms
poste302.s11.pfd time=163.25 ms
poste304.s11.pfd time=166.48 ms
 ping statistics 
3 replies max: 166.48 min: 161.65 avg: 163.79

[root@poste306 puppet]# mco rpc service status service=httpd
Discovering hosts using the mc method for 2 second(s)  0

No request sent, we did not discover any nodes.

---

I don't see what's wrong. No input in the mcollective.log file. Nothing on 
both servers and client sides.

I appreciate any help or hint about this issue.

Regards,
Vincent.

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


[Puppet Users] Re: Cloud provisionner on CentOS 6 issue

2013-09-19 Thread Vincent Nawrocki
Hi !

I finally found the solution using a previous version of the nokogiri gem.
All the installation procedure is explained on 
http://nokogiri.org/tutorials/installing_nokogiri.html
I needed to install some libxml packages with yum in order to install the 
version 1.5.10 which is running on ruby 1.8.7
Then I easily installed the Fog gem.

Everything works fine now.
I still have a question : I'm working with the open source version of 
puppet and I can't use puppet node_aws install ..., is this normal ? It 
doesn't even appear in the 'puppet help node_aws'.

Thanks in advance !
 Vincent

Le mercredi 18 septembre 2013 11:18:43 UTC+2, Vincent Nawrocki a écrit :

 Hi !

 I am currently testing puppet on CentOS 6 and I wish to test the cloud 
 provisioner tool.
 The problem is the following : I can't use fog because of ruby version 
 issue.

 The system : CentOS 6.4 with Ruby 1.8.7 (last version for CentOS)

 What I did to get the problem :
 install puppet-server
 install module puppetlabs-cloud_provisioner
 Trying install Fog -v 0.7.2 (cloud service library in ruby) but a 
 dependence of it need a newer version of ruby (at least 1.9.2).
 So I installed RVM and then ruby 1.9.2 to be able to install fog and all 
 its dependencies, it worked fine.
 Install guid gem (required by cloud_provisioner)

 Then I did : export RUBYLIB=/etc/puppet/modules/cloud_provisioner/lib:$RUBYLIB

 After this, PuppetLabs suggests to test if the installation worked fine by 
 executing :
 # puppet help node_aws

 Here is the result :
 [root@poste403 ~]# puppet help node_aws
 /usr/local/rvm/gems/ruby-1.9.2-p320/gems/nokogiri-1.6.0/lib/nokogiri/nokogiri.so:
  [BUG] Segmentation fault
 ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
 Abandon (core dumped)

 I really don't understand why this.
 If anyone encountered this problem before, thanks for help.

 Vincent



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


[Puppet Users] Cloud provisionner on CentOS 6 issue

2013-09-18 Thread Vincent Nawrocki
Hi !

I am currently testing puppet on CentOS 6 and I wish to test the cloud 
provisioner tool.
The problem is the following : I can't use fog because of ruby version 
issue.

The system : CentOS 6.4 with Ruby 1.8.7 (last version for CentOS)

What I did to get the problem :
install puppet-server
install module puppetlabs-cloud_provisioner
Trying install Fog -v 0.7.2 (cloud service library in ruby) but a 
dependence of it need a newer version of ruby (at least 1.9.2).
So I installed RVM and then ruby 1.9.2 to be able to install fog and all 
its dependencies, it worked fine.
Install guid gem (required by cloud_provisioner)

Then I did : export RUBYLIB=/etc/puppet/modules/cloud_provisioner/lib:$RUBYLIB

After this, PuppetLabs suggests to test if the installation worked fine by 
executing :
# puppet help node_aws

Here is the result :
[root@poste403 ~]# puppet help node_aws
/usr/local/rvm/gems/ruby-1.9.2-p320/gems/nokogiri-1.6.0/lib/nokogiri/nokogiri.so:
 [BUG] Segmentation fault
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
Abandon (core dumped)

I really don't understand why this.
If anyone encountered this problem before, thanks for help.

Vincent

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


[Puppet Users] Debian multiarch

2013-08-09 Thread Vincent Reydet
Hi,

I used to install the ia32-libs package for debian Squeeze.

Things change with debian Wheezy and now this package doesn't exist anymore.
Here is the new procedure:

dpkg --add-architecture i386 # enable multi-arch
apt-get update
apt-get install libc6:i386 # install base 32bit libraries


How can I do the dpkg --add-architecture i386 properly with puppet ?

Thanks,

Vincent

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




[Puppet Users] Vancouver, BC, CA puppet meetup group

2013-05-29 Thread Vincent Janelle
I'm in the process of setting up a puppet meetup group, and am trying to 
attract members:

http://www.meetup.com/Vancouver-Puppet-Automation/

If you're in or near the Vancouver BC, Canada area and are interested in 
talking about puppet and things, sign up!  

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] Re: Puppet and ClusterSSH

2013-03-08 Thread Vincent Janelle
Dalen's written https://github.com/dalen/puppet-puppetdbquery which may be 
of some use.

On Friday, 8 March 2013 08:14:35 UTC-8, Jonathan Gazeley wrote:

 I use ClusterSSH for prodding my Puppet-managed servers occasionally. 
 I'd like a way of generating my .csshrc automatically so it always 
 includes new servers. I would also like this .csshrc to include 
 environment information, formatted like this: 

 environment1 = node1.test.com node2.test.com node3.test.com 
 environment2 = node4.test.com node5.test.com node6.test.com 

 I guess this can be accomplished with virtual resources, but I'm not 
 sure how. Each node should presumably check in and make itself known, 
 and one server will collect these resources and somehow apply a template 
 to write out the .csshrc file. Any ideas? 

 Thanks, 
 Jonathan 


-- 
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] Coverage reports of manifests

2012-12-25 Thread Vincent Janelle
Is there a way of determining spec testing reports of manifests?  I'm 
adding tests to an existing deployment and it'd be useful to find out what 
code isn't being tested.

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



Re: [Puppet Users] manage sudoers with augeas

2011-08-26 Thread vincent
How Can I detect why augeas doesn't treat them ?
How can I know if it is a lens failure ?
Does augeas have a debug mode ?



2011/8/25 Rob McBroom mailingli...@skurfer.com

 On Aug 25, 2011, at 9:35 AM, Vincent wrote:

  yes it was as root, why the ls /etc doesn't return the sudoers ?

 On Aug 25, 2011, at 9:23 AM, Rob McBroom wrote:

  If a file hasn’t been properly parsed by Augeas, it simply won’t show up.
 This could mean that the file has a syntax error, the file doesn’t exist,
 you don’t have permission to read the file, or it could imply a failure in
 the lens itself.


 --
 Rob McBroom
 http://www.skurfer.com/

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



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



[Puppet Users] manage sudoers with augeas

2011-08-25 Thread Vincent
Hello,

I am trying to use augeas via puppet,
augeas { mailops:
context = /files/etc/sudoers,
  changes = [
set spec[user = '%mail-ops']/user %mail-ops,
set spec[user = '%mail-ops']/host_group/host ALL,
set spec[user = '%mail-ops']/host_group/command[1] \/bin/su imail
\,
set spec[user = '%mail-ops']/host_group/command[1]/tag NOPASSWD,
  ],
}

the error :

err: /Stage[main]/Managesudo::mailops/Augeas[mailops]/returns: change
from need_to_run to 0 failed: Save failed with return code false

the augeas tool doesn't return anything when I am trying to get the
actual spec
augtool print /files/etc/sudoers
augtool

How can I test augtool ?

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



[Puppet Users] Re: manage sudoers with augeas

2011-08-25 Thread Vincent
yes it was as root, why the ls /etc doesn't return the sudoers ?


# augtool
augtool ls /files/etc/sudoers
augtool ls /files/etc/
modprobe.d/ = (none)
puppet/ = (none)
sysconfig/ = (none)
default/ = (none)
environment = (none)
ntp.conf/ = (none)
inittab/ = (none)
services/ = (none)
grub.conf/ = (none)
securetty/ = (none)
xinetd.d/ = (none)
hosts/ = (none)
exports = (none)
passwd/ = (none)
pam.d/ = (none)
cgrules.conf/ = (none)
postfix/ = (none)
krb5.conf/ = (none)
aliases/ = (none)
logrotate.conf/ = (none)
logrotate.d/ = (none)
sysctl.conf/ = (none)
fstab/ = (none)
ethers/ = (none)
group/ = (none)
yum/ = (none)
yum.conf/ = (none)
security/ = (none)
cgconfig.conf/ = (none)
ssh/ = (none)
crontab/ = (none)
cron.d/ = (none)
augtool
augtool


# ls -l /etc/sudoers
-rw-r- 1 root root 3797 Aug 25 14:04 /etc/sudoers


On Aug 25, 3:23 pm, Rob McBroom mailingli...@skurfer.com wrote:
 On Aug 25, 2011, at 9:05 AM, Vincent wrote:

  the augeas tool doesn't return anything when I am trying to get the
  actual spec
  augtool print /files/etc/sudoers
  augtool

  How can I test augtool ?

 Fromhttp://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Augeas

 “You can see which files Augeas has successfully parsed by running augtool ls 
 /files/ and drilling down from there. If a file hasn’t been properly parsed 
 by Augeas, it simply won’t show up. This could mean that the file has a 
 syntax error, the file doesn’t exist, you don’t have permission to read the 
 file, or it could imply a failure in the lens itself.”

 Are you running `augtool` as root?

 --
 Rob McBroom
 http://www.skurfer.com/

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



[Puppet Users] Resource Defaults and Virtual Resources

2011-08-23 Thread Vincent
Hello,

I am trying to set a defaults groups before realize virtual resource
(user)
The default value is not used,
is it possible to define the default groups at this level ?


User { groups = 'ops' }
realize(
User[vincent],
..


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



[Puppet Users] Re: puppet dashboard performance issue

2011-06-16 Thread Vincent
no other solution ?
Where this query is used in the code ?
Can we disable the query ?



On Apr 18, 12:49 am, Andrew Forgue andrew.for...@gmail.com wrote:
 I also tried to look at this; since it was causing me issues as well.  I had
 800,000 rows or so in the reports table but I accidentally corrupted it
 (kill -9) so I won't have that many for a few more days.

 I created the separate indexex for kind and status but MySQL didn't use
 them.  It uses indexes for everything except the report.status != failed and
 then it switches to a full table scan, even if the query is a simple select
 with only the where and no join.  The documentation for MySQL indexes says
 that if MySQL thinks not using an index will be better it will not use
 indexes.

 mysql explain select * from reports WHERE reports.status = 'failed';
 *** 1. row ***
            id: 1
   select_type: SIMPLE
         table: reports
          type: ref
 possible_keys: index_reports_on_status
           key: index_reports_on_status
       key_len: 258
           ref: const
          rows: 274
         Extra: Using where
 1 row in set (0.00 sec)

 mysql explain select * from reports WHERE reports.status != 'failed';
 *** 1. row ***
            id: 1
   select_type: SIMPLE
         table: reports
          type: ALL
 possible_keys: index_reports_on_status
           key: NULL
       key_len: NULL
           ref: NULL
          rows: 108828
         Extra: Using where
 1 row in set (0.00 sec)

 Presumably it's doing this because the number of rows that are != failed are
 the vast majority so a full table scan is actually faster.

 It looks like it's selecting all the reports, and then grouping so we get
 the latest one.  Doing a cartesian join and then grouping seems extremely
 slow.  I re-wrote the query to use a sub-select:

 select reports.*,nodes.* from nodes, (select node_id,max(time) from reports
 where reports.kind = 'apply' and reports.status != 'failed' GROUP by
 node_id) as reports WHERE reports.node_id = nodes.id;
 1424 rows in set (0.12 sec).

 So you're only getting the latest report and then the nodes for each.

 How fast does that query run?

 -Andrew

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



[Puppet Users] puppet dashboard error 500 when trying to view a report detail

2011-06-06 Thread vincent
Hello,

I have got an error 500 when I try to view a report in the dashboard

Here is the log :



ERROR: compiling
_run_haml_app47views47reports47_resource_statuses46html46haml_locals_object_report_resource_statuses
RAISED Input/output error
Function body:   def
_run_haml_app47views47reports47_resource_statuses46html46haml_locals_object_report_resource_statuses(local_assigns)
old_output_buffer = output_buffer;object =
local_assigns[:object];resource_statuses =
local_assigns[:resource_statuses];report =
local_assigns[:report];;begin;extend Haml::Helpers;_hamlout = @haml_buffer =
Haml::Buffer.new(@haml_buffer, {:autoclose=[meta, img, link, br,
hr, input, area, param, col, base], :ugly=true,
:escape_html=false, :encoding=nil, :preserve=[textarea, pre, code],
:attr_wrapper=', :format=:xhtml});_erbout =
_hamlout.buffer;__in_erb_template = true;; if
report.resource_statuses.present?;
_hamlout.buffer  div class='section'\nh3\nEvents\n;


_hamlout.open_tag(a, false, true, false, false, {}, false, false, nil,
(expand all),  :href = '#', :class = 'expand-all' );_hamlout.buffer 
/h3\ndiv class='section'\ndl class='expandable-list'\n;


 report.resource_statuses.sort_by(:time).each_with_index do |status,
index|;
_hamlout.open_tag(dt, false, false, false, false, {}, false, false, nil,
nil, :class = cycle( 'odd', 'even' ));_hamlout.buffer  div
class='expandable-list-item'\n;

 if status.events.empty?;
_hamlout.buffer  span class='non-expandable-bullet'#{status.name
}/span\n; else;
_hamlout.buffer  #{ link_to h(status.name), {}, {:class =
'expandable-link collapsed-link', :id = expand-#{index}}
}\n;end;_hamlout.buffer  /div\n; if status.file or status.line;
_hamlout.buffer  #{ (#{status.file}:#{status.line})
}\n;end;_hamlout.buffer  /dt\n;_hamlout.open_tag(dd, false, false,
false, false, {class=expandable collapsed}, false, false, nil, nil, :id
= expandable-#{index});_hamlout.buffer 
table\ntr\nthProperty/th\nthMessage/th\n/tr\n;



 status.events.each do |event|;
_hamlout.open_tag(tr, false, false, false, false, {}, false, false, nil,
nil, :class = status #{event.status});_hamlout.buffer  td#{
event.property
}/td\ntd#{popup_md5s( h event.message )
}/td\n/tr\n;end;_hamlout.buffer 
/table\n/dd\n;end;_hamlout.buffer 
/dl\n/div\n/div\n;end;_erbout;ensure;@haml_buffer =
@haml_buffer.upper;end;
  ensure
self.output_buffer = old_output_buffer
  end

Backtrace:
/usr/share/puppet-dashboard/app/views/reports/_resource_statuses.html.haml:25:in
`write'

ActionView::TemplateError (Input/output error) on line #25 of
app/views/reports/_resource_statuses.html.haml:
22:   - status.events.each do |event|
23: %tr{:class = status #{event.status}}
24:   %td= event.property
25:   %td= popup_md5s( h event.message )

app/views/reports/_resource_statuses.html.haml:25:in `write'


Rendering /usr/share/puppet-dashboard/public/500.html (500 Internal Server
Error)

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



[Puppet Users] Re: puppet dashboard performance issue

2011-04-12 Thread Vincent
I have increase the mysql like this but the queries takes still more
than 9sec for the first page.
any other suggestions for the mysql tuning ?

key_buffer=64M
sort_buffer=4M
query_cache_size = 20M
read_buffer_size=1M

  Node Load (9090.5ms)   SELECT `nodes`.* FROM `nodes` INNER JOIN
`reports` ON reports.node_id = nodes.id WHERE ((reports.kind = 'apply'
AND reports.status != 'failed') AND (`nodes`.`hidden` = 0)) GROUP BY
nodes.id
  Node Load (9082.9ms)   SELECT `nodes`.* FROM `nodes` INNER JOIN
`reports` ON reports.node_id = nodes.id WHERE ((reports.kind = 'apply'
AND reports.status = 'failed') AND (`nodes`.`hidden` = 0)) GROUP BY
nodes.id


On Apr 11, 4:19 pm, Vincent vlouvi...@gmail.com wrote:
 Thanks

 I have make the
 rake RAILS_ENV=production db:raw:optimize
 and  in the my.cnf
 query_cache_size = 2000

 Its really better

 Vincent

 On 11 avr, 14:26, Mohamed Lrhazi lrh...@gmail.com wrote:







  There's some rake tasks, and other things,  suggested 
  here:https://github.com/puppetlabs/puppet-dashboard

  On Mon, Apr 11, 2011 at 5:29 AM, Vincent vlouvi...@gmail.com wrote:
   Hello,

   since the last upgrade to V1.1.0
   The dashboard is very slow

   I notice this slow queries in the log :

    Node Load (14178.9ms)   SELECT `nodes`.* FROM `nodes` INNER JOIN
   `reports` ON reports.node_id = nodes.id WHERE ((reports.kind = 'apply'
   AND reports.status != 'failed') AND (`nodes`.`hidden` = 0)) GROUP BY
   nodes.id
    Node Load (13149.9ms)   SELECT `nodes`.* FROM `nodes` INNER JOIN
   `reports` ON reports.node_id = nodes.id WHERE ((reports.kind = 'apply'
   AND reports.status = 'failed') AND (`nodes`.`hidden` = 0)) GROUP BY
   nodes.id

   How can i optimize the DB ?

   Vincent

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

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



[Puppet Users] Re: puppet dashboard performance issue

2011-04-12 Thread Vincent
query on nodes or reports table are very quick, it s with this join
that the query is slow

Is an index missing ?



On Apr 12, 12:25 pm, Vincent vlouvi...@gmail.com wrote:
 I have increase the mysql like this but the queries takes still more
 than 9sec for the first page.
 any other suggestions for the mysql tuning ?

 key_buffer=64M
 sort_buffer=4M
 query_cache_size = 20M
 read_buffer_size=1M

   Node Load (9090.5ms)   SELECT `nodes`.* FROM `nodes` INNER JOIN
 `reports` ON reports.node_id = nodes.id WHERE ((reports.kind = 'apply'
 AND reports.status != 'failed') AND (`nodes`.`hidden` = 0)) GROUP BY
 nodes.id
   Node Load (9082.9ms)   SELECT `nodes`.* FROM `nodes` INNER JOIN
 `reports` ON reports.node_id = nodes.id WHERE ((reports.kind = 'apply'
 AND reports.status = 'failed') AND (`nodes`.`hidden` = 0)) GROUP BY
 nodes.id

 On Apr 11, 4:19 pm, Vincent vlouvi...@gmail.com wrote:







  Thanks

  I have make the
  rake RAILS_ENV=production db:raw:optimize
  and  in the my.cnf
  query_cache_size = 2000

  Its really better

  Vincent

  On 11 avr, 14:26, Mohamed Lrhazi lrh...@gmail.com wrote:

   There's some rake tasks, and other things,  suggested 
   here:https://github.com/puppetlabs/puppet-dashboard

   On Mon, Apr 11, 2011 at 5:29 AM, Vincent vlouvi...@gmail.com wrote:
Hello,

since the last upgrade to V1.1.0
The dashboard is very slow

I notice this slow queries in the log :

 Node Load (14178.9ms)   SELECT `nodes`.* FROM `nodes` INNER JOIN
`reports` ON reports.node_id = nodes.id WHERE ((reports.kind = 'apply'
AND reports.status != 'failed') AND (`nodes`.`hidden` = 0)) GROUP BY
nodes.id
 Node Load (13149.9ms)   SELECT `nodes`.* FROM `nodes` INNER JOIN
`reports` ON reports.node_id = nodes.id WHERE ((reports.kind = 'apply'
AND reports.status = 'failed') AND (`nodes`.`hidden` = 0)) GROUP BY
nodes.id

How can i optimize the DB ?

Vincent

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

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



[Puppet Users] Re: puppet dashboard performance issue

2011-04-12 Thread Vincent
I have noticed thaht when I remove ((reports.kind = ‘apply’ AND
reports.status = ‘failed’) part from the query, the query is very
quick.

mysql show index from reports from dashboard;
+-++--
+--+-+---+-+--
++--++-+
| Table   | Non_unique | Key_name
| Seq_in_index | Column_name | Collation | Cardinality | Sub_part |
Packed | Null | Index_type | Comment |
+-++--
+--+-+---+-+--
++--++-+
| reports |  0 | PRIMARY
|1 | id  | A |  112252 | NULL |
NULL   |  | BTREE  | |
| reports |  1 | index_reports_on_node_id
|1 | node_id | A | 652 | NULL |
NULL   | YES  | BTREE  | |
| reports |  1 | index_reports_on_time_and_node_id_and_status
|1 | time| A |  112252 | NULL |
NULL   | YES  | BTREE  | |
| reports |  1 | index_reports_on_time_and_node_id_and_status
|2 | node_id | A |  112252 | NULL |
NULL   | YES  | BTREE  | |
| reports |  1 | index_reports_on_time_and_node_id_and_status
|3 | status  | A |  112252 | NULL |
NULL   | YES  | BTREE  | |
+-++--
+--+-+---+-+--
++--++-+
5 rows in set (0.01 sec)



On Apr 12, 4:04 pm, Charles Johnson gm.johns...@gmail.com wrote:
 What indexes do you have on the respective tables?







 On Tue, Apr 12, 2011 at 5:25 AM, Vincent vlouvi...@gmail.com wrote:
  I have increase the mysql like this but the queries takes still more
  than 9sec for the first page.
  any other suggestions for the mysql tuning ?

  key_buffer=64M
  sort_buffer=4M
  query_cache_size = 20M
  read_buffer_size=1M

   Node Load (9090.5ms)   SELECT `nodes`.* FROM `nodes` INNER JOIN
  `reports` ON reports.node_id = nodes.id WHERE ((reports.kind = 'apply'
  AND reports.status != 'failed') AND (`nodes`.`hidden` = 0)) GROUP BY
  nodes.id
   Node Load (9082.9ms)   SELECT `nodes`.* FROM `nodes` INNER JOIN
  `reports` ON reports.node_id = nodes.id WHERE ((reports.kind = 'apply'
  AND reports.status = 'failed') AND (`nodes`.`hidden` = 0)) GROUP BY
  nodes.id

  On Apr 11, 4:19 pm, Vincent vlouvi...@gmail.com wrote:
   Thanks

   I have make the
   rake RAILS_ENV=production db:raw:optimize
   and  in the my.cnf
   query_cache_size = 2000

   Its really better

   Vincent

   On 11 avr, 14:26, Mohamed Lrhazi lrh...@gmail.com wrote:

There's some rake tasks, and other things,  suggested here:
 https://github.com/puppetlabs/puppet-dashboard

On Mon, Apr 11, 2011 at 5:29 AM, Vincent vlouvi...@gmail.com wrote:
 Hello,

 since the last upgrade to V1.1.0
 The dashboard is very slow

 I notice this slow queries in the log :

  Node Load (14178.9ms)   SELECT `nodes`.* FROM `nodes` INNER JOIN
 `reports` ON reports.node_id = nodes.id WHERE ((reports.kind =
  'apply'
 AND reports.status != 'failed') AND (`nodes`.`hidden` = 0)) GROUP BY
 nodes.id
  Node Load (13149.9ms)   SELECT `nodes`.* FROM `nodes` INNER JOIN
 `reports` ON reports.node_id = nodes.id WHERE ((reports.kind =
  'apply'
 AND reports.status = 'failed') AND (`nodes`.`hidden` = 0)) GROUP BY
 nodes.id

 How can i optimize the DB ?

 Vincent

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

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

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



Re: [Puppet Users] Re: puppet dashboard performance issue

2011-04-12 Thread vincent
here is the result , I don't know what to do :(

mysql explain SELECT `nodes`.* FROM `nodes` INNER JOIN `reports` ON
reports.node_id = nodes.id WHERE ((reports.kind = 'apply' AND reports.status
!= 'failed') AND (`nodes`.`hidden` = 0)) GROUP BY nodes.id;
++-+-+---+--+--+-++--+-+
| id | select_type | table   | type  | possible_keys| key
   | key_len | ref| rows | Extra   |
++-+-+---+--+--+-++--+-+
|  1 | SIMPLE  | nodes   | index | PRIMARY  | PRIMARY
   | 4   | NULL   |  573 | Using where |
|  1 | SIMPLE  | reports | ref   | index_reports_on_node_id |
index_reports_on_node_id | 5   | dashboard.nodes.id |  167 | Using where
|
++-+-+---+--+--+-++--+-+
2 rows in set (0.00 sec)

http://nodes.id/

2011/4/12 Charles Johnson gm.johns...@gmail.com

 You have a partial (i.e., three-part) index 'time', 'node_id', 'status'
 from which you appear to be selecting against only two parts. On the mysql
 command line run the query by hand preceded by the keywprd explain

 explain select nodes blah blah blah

 You should get back a listing that will let you see how the indexes are
 being used (or abused!). You may discover that in addition to the composite
 index you have that two additional indexes will help.

 ~Charles~


 On Tue, Apr 12, 2011 at 9:15 AM, Vincent vlouvi...@gmail.com wrote:

 I have noticed thaht when I remove ((reports.kind = ‘apply’ AND
 reports.status = ‘failed’) part from the query, the query is very
 quick.

 mysql show index from reports from dashboard;
 +-++--
 +--+-+---+-+--
 ++--++-+
 | Table   | Non_unique | Key_name
 | Seq_in_index | Column_name | Collation | Cardinality | Sub_part |
 Packed | Null | Index_type | Comment |
 +-++--
 +--+-+---+-+--
 ++--++-+
 | reports |  0 | PRIMARY
 |1 | id  | A |  112252 | NULL |
 NULL   |  | BTREE  | |
 | reports |  1 | index_reports_on_node_id
 |1 | node_id | A | 652 | NULL |
 NULL   | YES  | BTREE  | |
 | reports |  1 | index_reports_on_time_and_node_id_and_status
 |1 | time| A |  112252 | NULL |
 NULL   | YES  | BTREE  | |
 | reports |  1 | index_reports_on_time_and_node_id_and_status
 |2 | node_id | A |  112252 | NULL |
 NULL   | YES  | BTREE  | |
 | reports |  1 | index_reports_on_time_and_node_id_and_status
 |3 | status  | A |  112252 | NULL |
 NULL   | YES  | BTREE  | |
 +-++--
 +--+-+---+-+--
 ++--++-+
 5 rows in set (0.01 sec)



 On Apr 12, 4:04 pm, Charles Johnson gm.johns...@gmail.com wrote:
  What indexes do you have on the respective tables?
 
 
 
 
 
 
 
  On Tue, Apr 12, 2011 at 5:25 AM, Vincent vlouvi...@gmail.com wrote:
   I have increase the mysql like this but the queries takes still more
   than 9sec for the first page.
   any other suggestions for the mysql tuning ?
 
   key_buffer=64M
   sort_buffer=4M
   query_cache_size = 20M
   read_buffer_size=1M
 
Node Load (9090.5ms)   SELECT `nodes`.* FROM `nodes` INNER JOIN
   `reports` ON reports.node_id = nodes.id WHERE ((reports.kind =
 'apply'
   AND reports.status != 'failed') AND (`nodes`.`hidden` = 0)) GROUP BY
   nodes.id
Node Load (9082.9ms)   SELECT `nodes`.* FROM `nodes` INNER JOIN
   `reports` ON reports.node_id = nodes.id WHERE ((reports.kind =
 'apply'
   AND reports.status = 'failed') AND (`nodes`.`hidden` = 0)) GROUP BY
   nodes.id
 
   On Apr 11, 4:19 pm, Vincent vlouvi...@gmail.com wrote:
Thanks
 
I have make the
rake RAILS_ENV=production db:raw:optimize
and  in the my.cnf
query_cache_size = 2000
 
Its really better
 
Vincent
 
On 11 avr, 14:26, Mohamed Lrhazi lrh...@gmail.com wrote:
 
 There's some rake tasks, and other things,  suggested here:
  https://github.com/puppetlabs/puppet-dashboard
 
 On Mon, Apr 11, 2011 at 5:29 AM, Vincent vlouvi...@gmail.com
 wrote:
  Hello,
 
  since the last upgrade to V1.1.0
  The dashboard is very slow
 
  I notice

Re: [Puppet Users] Re: puppet dashboard performance issue

2011-04-12 Thread vincent
I have add an index
ALTER TABLE `reports` ADD INDEX `index_reports_on_kind_and_status` ( `kind`
, `status` )

it s better but maybe not perfect as the query is performed on each pages in
the dashboard

Thanks

Vincent

mysql explain SELECT `nodes`.* FROM `nodes` INNER JOIN `reports` ON
 reports.node_id = nodes.id WHERE ((reports.kind = 'apply' AND
reports.status  != 'failed') AND (`nodes`.`hidden` = 0)) GROUP BY nodes.id;
++-+-++---+--+-+---+---+--+
| id | select_type | table   | type   | possible_keys
  | key  | key_len | ref
  | rows  | Extra|
++-+-++---+--+-+---+---+--+
|  1 | SIMPLE  | reports | ref|
index_reports_on_node_id,index_reports_on_kind_and_status |
index_reports_on_kind_and_status | 768 | const |
19483 | Using where; Using temporary; Using filesort |
|  1 | SIMPLE  | nodes   | eq_ref | PRIMARY
  | PRIMARY  | 4   |
dashboard.reports.node_id | 1 | Using where
 |
++-+-++---+--+-+---+---+--+
2 rows in set (0.00 sec)

2011/4/12 Charles Johnson gm.johns...@gmail.com

 A couple of things to notice. First, only the nodes.id index and 
 index_reports_on_node_id
 index are used, and since index_reports_on_node_id is used as a ref type
 you will have 573 x 167 rows to examine (95,651 more or less) to produce the
 rows your sql finally fetches. You might --important: might-- be able to do
 better. There is an index: index_reports_on_time_and_node_id_and_status,
 which includes node_id and status, but is not used. Without hurting
 anything, and without changing the query you could create an index on
 reports.kind and reports.status. This might help if there are lots of
 different values for kind and status. For example, you generally do not want
 to create an index for a column where the only values are 'true' and
 'false', say. That effectively divides the table in half, and if you have a
 million rows, reducing a full scan to 500,000 may not help much.

 But anyway, if you know how to create indexes, this is what I would try
 first.

 Others probably have much better ideas. You might ping a mysql list as
 well.

 On Tue, Apr 12, 2011 at 11:26 AM, vincent vinc...@louviaux.com wrote:

 here is the result , I don't know what to do :(

 mysql explain SELECT `nodes`.* FROM `nodes` INNER JOIN `reports` ON
 reports.node_id = nodes.id WHERE ((reports.kind = 'apply' AND
 reports.status != 'failed') AND (`nodes`.`hidden` = 0)) GROUP BY nodes.id
 ;

 ++-+-+---+--+--+-++--+-+
 | id | select_type | table   | type  | possible_keys| key
  | key_len | ref| rows | Extra   |

 ++-+-+---+--+--+-++--+-+
 |  1 | SIMPLE  | nodes   | index | PRIMARY  | PRIMARY
  | 4   | NULL   |  573 | Using where |
 |  1 | SIMPLE  | reports | ref   | index_reports_on_node_id |
 index_reports_on_node_id | 5   | dashboard.nodes.id |  167 | Using
 where |

 ++-+-+---+--+--+-++--+-+
 2 rows in set (0.00 sec)

  http://nodes.id/

 2011/4/12 Charles Johnson gm.johns...@gmail.com

 You have a partial (i.e., three-part) index 'time', 'node_id', 'status'
 from which you appear to be selecting against only two parts. On the mysql
 command line run the query by hand preceded by the keywprd explain

 explain select nodes blah blah blah

 You should get back a listing that will let you see how the indexes are
 being used (or abused!). You may discover that in addition to the composite
 index you have that two additional indexes will help.

 ~Charles~


 On Tue, Apr 12, 2011 at 9:15 AM, Vincent vlouvi...@gmail.com wrote:

 I have noticed thaht when I remove ((reports.kind = ‘apply’ AND
 reports.status = ‘failed’) part from the query, the query is very
 quick.

 mysql show index from reports from dashboard

Re: [Puppet Users] Re: puppet dashboard performance issue

2011-04-12 Thread vincent
the rows are respectively 19450  and 1
So I have down from 95691 to 19450

with one index on kind and one on status , it s worst

it use only index_reports_on_kind and 1 X 58631 rows ..

mysql explain SELECT `nodes`.* FROM `nodes` INNER JOIN `reports` ON
 reports.node_id = nodes.id WHERE ((reports.kind = 'apply' AND
reports.status  != 'failed') AND (`nodes`.`hidden` = 0)) GROUP BY nodes.id;
++-+-+++---+-+---+---+--+
| id | select_type | table   | type   | possible_keys
   | key   | key_len | ref
| rows  | Extra|
++-+-+++---+-+---+---+--+
|  1 | SIMPLE  | reports | ref|
index_reports_on_node_id,index_reports_on_kind,index_reports_on_status |
index_reports_on_kind | 768 | const | 58631 | Using
where; Using temporary; Using filesort |
|  1 | SIMPLE  | nodes   | eq_ref | PRIMARY
   | PRIMARY   | 4   |
dashboard.reports.node_id | 1 | Using where
 |
++-+-+++---+-+---+---+--+
2 rows in set (0.00 sec)



2011/4/12 Charles Johnson gm.johns...@gmail.com

 Good try! But I was not clear. Try an index just for kind, and another
 separate index just for status. You are down to 4 x 768 (3072) from 95691.
 That is much better. Again, drop the create separate indexes for kind and
 status and  index_reports_on_kind_and_status .

 On Tue, Apr 12, 2011 at 2:11 PM, vincent vinc...@louviaux.com wrote:

 I have add an index
 ALTER TABLE `reports` ADD INDEX `index_reports_on_kind_and_status` (
 `kind` , `status` )

 it s better but maybe not perfect as the query is performed on each pages
 in the dashboard

 Thanks

 Vincent

 mysql explain SELECT `nodes`.* FROM `nodes` INNER JOIN `reports` ON
  reports.node_id = nodes.id WHERE ((reports.kind = 'apply' AND
 reports.status  != 'failed') AND (`nodes`.`hidden` = 0)) GROUP BY
 nodes.id;

 ++-+-++---+--+-+---+---+--+
 | id | select_type | table   | type   | possible_keys
 | key  | key_len | ref
 | rows  | Extra|

 ++-+-++---+--+-+---+---+--+
 |  1 | SIMPLE  | reports | ref|
 index_reports_on_node_id,index_reports_on_kind_and_status |
 index_reports_on_kind_and_status | 768 | const |
 19483 | Using where; Using temporary; Using filesort |
 |  1 | SIMPLE  | nodes   | eq_ref | PRIMARY
 | PRIMARY  | 4   |
 dashboard.reports.node_id | 1 | Using where
  |


 ++-+-++---+--+-+---+---+--+
 2 rows in set (0.00 sec)

 2011/4/12 Charles Johnson gm.johns...@gmail.com

  A couple of things to notice. First, only the nodes.id index and 
 index_reports_on_node_id
 index are used, and since index_reports_on_node_id is used as a ref type
 you will have 573 x 167 rows to examine (95,651 more or less) to produce the
 rows your sql finally fetches. You might --important: might-- be able to do
 better. There is an index: index_reports_on_time_and_node_id_and_status,
 which includes node_id and status, but is not used. Without hurting
 anything, and without changing the query you could create an index on
 reports.kind and reports.status. This might help if there are lots of
 different values for kind and status. For example, you generally do not want
 to create an index for a column where the only values are 'true' and
 'false', say. That effectively divides the table in half, and if you have a
 million rows, reducing a full scan to 500,000 may not help much.

 But anyway, if you know how to create indexes, this is what I would try
 first.

 Others probably have much better ideas. You might ping a mysql list as
 well

[Puppet Users] puppet dashboard performance issue

2011-04-11 Thread Vincent
Hello,

since the last upgrade to V1.1.0
The dashboard is very slow

I notice this slow queries in the log :

  Node Load (14178.9ms)   SELECT `nodes`.* FROM `nodes` INNER JOIN
`reports` ON reports.node_id = nodes.id WHERE ((reports.kind = 'apply'
AND reports.status != 'failed') AND (`nodes`.`hidden` = 0)) GROUP BY
nodes.id
  Node Load (13149.9ms)   SELECT `nodes`.* FROM `nodes` INNER JOIN
`reports` ON reports.node_id = nodes.id WHERE ((reports.kind = 'apply'
AND reports.status = 'failed') AND (`nodes`.`hidden` = 0)) GROUP BY
nodes.id


How can i optimize the DB ?

Vincent

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



[Puppet Users] Re: puppet dashboard performance issue

2011-04-11 Thread Vincent
Thanks

I have make the
rake RAILS_ENV=production db:raw:optimize
and  in the my.cnf
query_cache_size = 2000

Its really better

Vincent

On 11 avr, 14:26, Mohamed Lrhazi lrh...@gmail.com wrote:
 There's some rake tasks, and other things,  suggested 
 here:https://github.com/puppetlabs/puppet-dashboard







 On Mon, Apr 11, 2011 at 5:29 AM, Vincent vlouvi...@gmail.com wrote:
  Hello,

  since the last upgrade to V1.1.0
  The dashboard is very slow

  I notice this slow queries in the log :

   Node Load (14178.9ms)   SELECT `nodes`.* FROM `nodes` INNER JOIN
  `reports` ON reports.node_id = nodes.id WHERE ((reports.kind = 'apply'
  AND reports.status != 'failed') AND (`nodes`.`hidden` = 0)) GROUP BY
  nodes.id
   Node Load (13149.9ms)   SELECT `nodes`.* FROM `nodes` INNER JOIN
  `reports` ON reports.node_id = nodes.id WHERE ((reports.kind = 'apply'
  AND reports.status = 'failed') AND (`nodes`.`hidden` = 0)) GROUP BY
  nodes.id

  How can i optimize the DB ?

  Vincent

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

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



[Puppet Users] Puppet Dashboard retrieving facts from inventory service

2011-04-01 Thread Vincent
Hello,

I am trying to use the Inventory feature of the Dashboard.

I ve got this error
Inventory
Could not retrieve facts from inventory service: 403 Forbidden
request: puppetmaster.X.X (x.x.x.x) access to /facts/.xx [find] at
line 102 

In the message log I see two error on Forbidden and one Denying :

Apr  1 08:17:12 puppetmaster puppet-master[12459]: Denying access:
Forbidden request: puppetmaster.x.x.x() access to /facts/xxx.xx [find]
at line 102
Apr  1 08:17:12 puppetmaster puppet-master[12459]: Forbidden request:
puppetmaster.x.x.x() access to /facts/xxx.xx [find] at line 102


currently I have add in the auth.conf :
...
path /facts
method find
allow *
..

Vincent

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



[Puppet Users] Re: Puppet Dashboard retrieving facts from inventory service

2011-04-01 Thread Vincent
It s work, I have adapt the auth.conf and add auth no  :
..
path /facts
auth no
method find
allow dashboard
..


Vincent

On 1 avr, 08:22, Vincent vlouvi...@gmail.com wrote:
 Hello,

 I am trying to use the Inventory feature of the Dashboard.

 I ve got this error
 Inventory
 Could not retrieve facts from inventory service: 403 Forbidden
 request: puppetmaster.X.X (x.x.x.x) access to /facts/.xx [find] at
 line 102 

 In the message log I see two error on Forbidden and one Denying :

 Apr  1 08:17:12 puppetmaster puppet-master[12459]: Denying access:
 Forbidden request: puppetmaster.x.x.x() access to /facts/xxx.xx [find]
 at line 102
 Apr  1 08:17:12 puppetmaster puppet-master[12459]: Forbidden request:
 puppetmaster.x.x.x() access to /facts/xxx.xx [find] at line 102

 currently I have add in the auth.conf :
 ...
 path /facts
 method find
 allow *
 ..

 Vincent

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



[Puppet Users] retrieve output files on clients

2011-03-10 Thread vincent
What is the best way to retrieve files on clients ?

Vincent

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



[Puppet Users] Re: retrieve output files on clients

2011-03-10 Thread Vincent
So I need to retrieve the output of somes scripts running on many
clients
Must I configure a puppet server on each nodes ?




On Mar 10, 12:37 pm, vincent vinc...@louviaux.com wrote:
 What is the best way to retrieve files on clients ?

 Vincent

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



[Puppet Users] Re: retrieve output files on clients

2011-03-10 Thread Vincent
I execute one script hourly, this script create an output file that I
need to push on another server
As puppet can pass our fw I would like to use it as file transfert.

Vincent



On Mar 10, 2:26 pm, Felix Frank felix.fr...@alumni.tu-berlin.de
wrote:
 Please elaborate further. How much output are we talking about and what
 is to happen with it?

 The canonical way to go about this is deploying custom facts on your
 clients, which the puppetmaster uses then.

 Regards,
 Felix

 On 03/10/2011 01:49 PM, Vincent wrote:

  So I need to retrieve the output of somes scripts running on many
  clients
  Must I configure a puppet server on each nodes ?

  On Mar 10, 12:37 pm, vincent vinc...@louviaux.com wrote:
  What is the best way to retrieve files on clients ?

  Vincent

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



[Puppet Users] header too long (OpenSSL::X509::CRLError) ?

2011-02-21 Thread vincent
Hi,

My puppet master don't want to start anymore.
Any idea ?



[root@puppetmaster requests]# puppet master --no-daemonize --debug
debug: Puppet::Type::User::ProviderDirectoryservice: file
/usr/bin/dscl does not exist
debug: Puppet::Type::User::ProviderPw: file pw does not exist
debug: Puppet::Type::User::ProviderUser_role_add: file rolemod does not exist
debug: Puppet::Type::User::ProviderLdap: true value when expecting false
debug: Puppet::Type::File::ProviderMicrosoft_windows: feature
microsoft_windows is missing
debug: Failed to load library 'ldap' for feature 'ldap'
debug: /File[/var/lib/puppet/ssl/public_keys]: Autorequiring
File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/server_data]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/ssl/private]: Autorequiring
File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/ssl/certs/puppetmaster.isp.belgacom.be.pem]:
Autorequiring File[/var/lib/puppet/ssl/certs]
debug: /File[/var/lib/puppet/ssl/public_keys/puppetmaster.isp.belgacom.be.pem]:
Autorequiring File[/var/lib/puppet/ssl/public_keys]
debug: /File[/var/lib/puppet/bucket]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/ssl/certificate_requests]: Autorequiring
File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/ssl/certs]: Autorequiring File[/var/lib/puppet/ssl]
debug: /File[/etc/puppet/manifests]: Autorequiring File[/etc/puppet]
debug: /File[/var/lib/puppet/ssl/crl.pem]: Autorequiring
File[/var/lib/puppet/ssl]
debug: /File[/etc/puppet/fileserver.conf]: Autorequiring File[/etc/puppet]
debug: /File[/etc/puppet/puppet.conf]: Autorequiring File[/etc/puppet]
debug: /File[/etc/puppet/auth.conf]: Autorequiring File[/etc/puppet]
debug: /File[/var/lib/puppet/ssl/certs/ca.pem]: Autorequiring
File[/var/lib/puppet/ssl/certs]
debug: /File[/var/lib/puppet/reports]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/log/puppet/masterhttp.log]: Autorequiring
File[/var/log/puppet]
debug: /File[/var/lib/puppet/ssl/private_keys/puppetmaster.XXXpem]:
Autorequiring File[/var/lib/puppet/ssl/private_keys]
debug: /File[/var/lib/puppet/ssl]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/facts]: Autorequiring File[/var/lib/puppet]
debug: /File[/etc/puppet/manifests/site.pp]: Autorequiring
File[/etc/puppet/manifests]
debug: /File[/var/lib/puppet/ssl/private_keys]: Autorequiring
File[/var/lib/puppet/ssl]
debug: /File[/var/run/puppet/master.pid]: Autorequiring File[/var/run/puppet]
debug: /File[/var/lib/puppet/yaml]: Autorequiring File[/var/lib/puppet]
debug: Finishing transaction -607138118
debug: /File[/var/lib/puppet/ssl/ca/signed]: Autorequiring
File[/var/lib/puppet/ssl/ca]
debug: /File[/var/lib/puppet/ssl/ca/private/ca.pass]: Autorequiring
File[/var/lib/puppet/ssl/ca/private]
debug: /File[/var/lib/puppet/ssl/ca/requests]: Autorequiring
File[/var/lib/puppet/ssl/ca]
debug: /File[/var/lib/puppet/ssl/ca/serial]: Autorequiring
File[/var/lib/puppet/ssl/ca]
debug: /File[/var/lib/puppet/ssl/ca/private]: Autorequiring
File[/var/lib/puppet/ssl/ca]
debug: /File[/var/lib/puppet/ssl/ca/inventory.txt]: Autorequiring
File[/var/lib/puppet/ssl/ca]
debug: /File[/var/lib/puppet/ssl/ca/ca_crt.pem]: Autorequiring
File[/var/lib/puppet/ssl/ca]
debug: /File[/var/lib/puppet/ssl/ca/ca_crl.pem]: Autorequiring
File[/var/lib/puppet/ssl/ca]
debug: /File[/var/lib/puppet/ssl/ca/ca_pub.pem]: Autorequiring
File[/var/lib/puppet/ssl/ca]
debug: /File[/var/lib/puppet/ssl/ca/ca_key.pem]: Autorequiring
File[/var/lib/puppet/ssl/ca]
debug: Finishing transaction -607501368
debug: Using cached certificate for ca
debug: Using cached certificate for ca
debug: Using cached certificate for puppetmaster.isp.belgacom.be
notice: Starting Puppet master version 2.6.4
/usr/lib/ruby/site_ruby/1.8/puppet/ssl/base.rb:42:in `initialize':
header too long (OpenSSL::X509::CRLError)
from /usr/lib/ruby/site_ruby/1.8/puppet/ssl/base.rb:42:in `new'
from /usr/lib/ruby/site_ruby/1.8/puppet/ssl/base.rb:42:in `read'
from /usr/lib/ruby/site_ruby/1.8/puppet/indirector/ssl_file.rb:86:in 
`find'
from 
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:193:in `find'
from /usr/lib/ruby/site_ruby/1.8/puppet/indirector.rb:50:in `find'
from /usr/lib/ruby/site_ruby/1.8/puppet/ssl/host.rb:215:in `ssl_store'
from /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:113:in
`setup_ssl'
from /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:31:in 
`listen'
 ... 6 levels...
from /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:393:in 
`exit_on_fail'
from /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:287:in `run'
from /usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:55:in 
`execute'
from /usr/bin/puppet:4

-- 
You received this message because you are subscribed 

[Puppet Users] header too long (OpenSSL::X509::CRLError) ?

2011-02-21 Thread vincent
Hi,

My puppet master don't want to start anymore.
Certificat issue ?
Any idea ?



[root@puppetmaster requests]# puppet master --no-daemonize --debug
debug: Puppet::Type::User::ProviderDirectoryservice: file
/usr/bin/dscl does not exist
debug: Puppet::Type::User::ProviderPw: file pw does not exist
debug: Puppet::Type::User::ProviderUser_role_add: file rolemod does not exist
debug: Puppet::Type::User::ProviderLdap: true value when expecting false
debug: Puppet::Type::File::ProviderMicrosoft_windows: feature
microsoft_windows is missing
debug: Failed to load library 'ldap' for feature 'ldap'
debug: /File[/var/lib/puppet/ssl/public_keys]: Autorequiring
File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/server_data]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/ssl/private]: Autorequiring
File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/ssl/certs/puppetmaster.XXX.be.pem]:
Autorequiring File[/var/lib/puppet/ssl/certs]
debug: /File[/var/lib/puppet/ssl/public_keys/puppetmaster.isp.XXX.be.pem]:
Autorequiring File[/var/lib/puppet/ssl/public_keys]
debug: /File[/var/lib/puppet/bucket]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/ssl/certificate_requests]: Autorequiring
File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/ssl/certs]: Autorequiring File[/var/lib/puppet/ssl]
debug: /File[/etc/puppet/manifests]: Autorequiring File[/etc/puppet]
debug: /File[/var/lib/puppet/ssl/crl.pem]: Autorequiring
File[/var/lib/puppet/ssl]
debug: /File[/etc/puppet/fileserver.conf]: Autorequiring File[/etc/puppet]
debug: /File[/etc/puppet/puppet.conf]: Autorequiring File[/etc/puppet]
debug: /File[/etc/puppet/auth.conf]: Autorequiring File[/etc/puppet]
debug: /File[/var/lib/puppet/ssl/certs/ca.pem]: Autorequiring
File[/var/lib/puppet/ssl/certs]
debug: /File[/var/lib/puppet/reports]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/log/puppet/masterhttp.log]: Autorequiring
File[/var/log/puppet]
debug: /File[/var/lib/puppet/ssl/private_keys/puppetmaster.XXXpem]:
Autorequiring File[/var/lib/puppet/ssl/private_keys]
debug: /File[/var/lib/puppet/ssl]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/facts]: Autorequiring File[/var/lib/puppet]
debug: /File[/etc/puppet/manifests/site.pp]: Autorequiring
File[/etc/puppet/manifests]
debug: /File[/var/lib/puppet/ssl/private_keys]: Autorequiring
File[/var/lib/puppet/ssl]
debug: /File[/var/run/puppet/master.pid]: Autorequiring File[/var/run/puppet]
debug: /File[/var/lib/puppet/yaml]: Autorequiring File[/var/lib/puppet]
debug: Finishing transaction -607138118
debug: /File[/var/lib/puppet/ssl/ca/signed]: Autorequiring
File[/var/lib/puppet/ssl/ca]
debug: /File[/var/lib/puppet/ssl/ca/private/ca.pass]: Autorequiring
File[/var/lib/puppet/ssl/ca/private]
debug: /File[/var/lib/puppet/ssl/ca/requests]: Autorequiring
File[/var/lib/puppet/ssl/ca]
debug: /File[/var/lib/puppet/ssl/ca/serial]: Autorequiring
File[/var/lib/puppet/ssl/ca]
debug: /File[/var/lib/puppet/ssl/ca/private]: Autorequiring
File[/var/lib/puppet/ssl/ca]
debug: /File[/var/lib/puppet/ssl/ca/inventory.txt]: Autorequiring
File[/var/lib/puppet/ssl/ca]
debug: /File[/var/lib/puppet/ssl/ca/ca_crt.pem]: Autorequiring
File[/var/lib/puppet/ssl/ca]
debug: /File[/var/lib/puppet/ssl/ca/ca_crl.pem]: Autorequiring
File[/var/lib/puppet/ssl/ca]
debug: /File[/var/lib/puppet/ssl/ca/ca_pub.pem]: Autorequiring
File[/var/lib/puppet/ssl/ca]
debug: /File[/var/lib/puppet/ssl/ca/ca_key.pem]: Autorequiring
File[/var/lib/puppet/ssl/ca]
debug: Finishing transaction -607501368
debug: Using cached certificate for ca
debug: Using cached certificate for ca
debug: Using cached certificate for puppetmaster.isp.XXX.be
notice: Starting Puppet master version 2.6.4
/usr/lib/ruby/site_ruby/1.8/puppet/ssl/base.rb:42:in `initialize':
header too long (OpenSSL::X509::CRLError)
       from /usr/lib/ruby/site_ruby/1.8/puppet/ssl/base.rb:42:in `new'
       from /usr/lib/ruby/site_ruby/1.8/puppet/ssl/base.rb:42:in `read'
       from /usr/lib/ruby/site_ruby/1.8/puppet/indirector/ssl_file.rb:86:in
`find'
       from /usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:193:in
`find'
       from /usr/lib/ruby/site_ruby/1.8/puppet/indirector.rb:50:in `find'
       from /usr/lib/ruby/site_ruby/1.8/puppet/ssl/host.rb:215:in `ssl_store'
       from /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:113:in
`setup_ssl'
       from /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:31:in
`listen'
        ... 6 levels...
       from /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:393:in
`exit_on_fail'
       from /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:287:in `run'
       from /usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:55:in
`execute'
       from /usr/bin/puppet:4

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

Re: [Puppet Users] header too long (OpenSSL::X509::CRLError) ?

2011-02-21 Thread vincent
Thanks

I am trying this, do you know which index can use ?

# openssl ca -gencrl -keyfile ca_key.pem -cert ca_crt.pem -out test
Using configuration from /etc/pki/tls/openssl.cnf
../../CA/index.txt: No such file or directory
unable to open '../../CA/index.txt'
4717:error:02001002:system library:fopen:No such file or
directory:bss_file.c:352:fopen('../../CA/index.txt','r')
4717:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:354:




2011/2/21 Felix Frank felix.fr...@alumni.tu-berlin.de:


 On 02/21/2011 06:00 PM, vincent wrote:
 the file ca_crl.pem was cleaned accidentally.
 How can I have an empty revocation list ?

 I'd assume puppet would create a new one for you.
 I'm not sure what the puppet way to do this is.
 Have a look at puppet cert --help.

 Failing that, create a CRL using your CA and key as described in
 http://gagravarr.org/writing/openssl-certs/ca.shtml#ca-revoke

 Yes, it's not quite trivial.

 HTH,
 Felix

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



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



Re: [Puppet Users] header too long (OpenSSL::X509::CRLError) ?

2011-02-21 Thread vincent
I have removed the ca_crl.pem puppet master has create a new one
but some hosts are not working now:

host1 OK :
# puppetd -tv
info: Caching catalog for host1.bc
info: Applying configuration version '1298308566'
notice: Finished catalog run in 0.06 seconds

host2:
# puppetd -tv
err: Could not retrieve catalog from remote server: hostname not match
with the server certificate
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run




2011/2/21 vincent vinc...@louviaux.com:
 Thanks

 I am trying this, do you know which index can use ?

 # openssl ca -gencrl -keyfile ca_key.pem -cert ca_crt.pem -out test
 Using configuration from /etc/pki/tls/openssl.cnf
 ../../CA/index.txt: No such file or directory
 unable to open '../../CA/index.txt'
 4717:error:02001002:system library:fopen:No such file or
 directory:bss_file.c:352:fopen('../../CA/index.txt','r')
 4717:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:354:




 2011/2/21 Felix Frank felix.fr...@alumni.tu-berlin.de:


 On 02/21/2011 06:00 PM, vincent wrote:
 the file ca_crl.pem was cleaned accidentally.
 How can I have an empty revocation list ?

 I'd assume puppet would create a new one for you.
 I'm not sure what the puppet way to do this is.
 Have a look at puppet cert --help.

 Failing that, create a CRL using your CA and key as described in
 http://gagravarr.org/writing/openssl-certs/ca.shtml#ca-revoke

 Yes, it's not quite trivial.

 HTH,
 Felix

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




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



[Puppet Users] redirect the dashboard with apache

2011-02-14 Thread Vincent
Hi

Is it possible to configure apache to redirect to the dashboard ?

I have try   the config :

ProxyPass/http://localhost:3000
ProxyPassReverse /http://localhost:3000


I ve got the foolowing error when I try to get the nodes pages :

Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /nodes.

Reason: DNS lookup failure for: localhost:3000nodes

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



[Puppet Users] Re: puppetd doing noting as daemon

2009-05-29 Thread Vincent Louviaux
I have try with the 1.5.2-1.el4 and it s working :-)
So yes this is coming from facter 1.5.4

Thanks

Vincent


On Fri, May 29, 2009 at 10:40 AM, Vincent Louviaux vinc...@louviaux.comwrote:

 it s 1.5.4 coming from epel depots ..

 I will try the 1.5.5 but I think there are no rpm available at this time, I
 must compile ..

 Thanks for your help

 Vincent


 On Fri, May 29, 2009 at 10:32 AM, Avi Miller avi.mil...@gmail.com wrote:


 Hi,

 Vincent Louviaux wrote:
  I have a lot of systems where the puppetd doesn't do anything ..

 Have you recently upgraded Puppet and/or Facter? If so,  you are hitting
 the same Facter bug that I did with EL4.  Essentially, Facter hangs
 trying to read /proc/uptime and /proc/virtual (on my XenU guests). You
 should try the new Facter 1.5.5RC1 which has the fixes for these to see
 if that resolves the problem.

 I actually had to manually fix all my servers because Puppet had
 stopped working. Also, when upgrading Facter, make sure you restart
 Puppet (if you're running a daemon), otherwise you can also run into
 problems I've discovered.

 Hope that helps,
 Avi

 



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



[Puppet Users] error : Could not store configs: undefined method `environment=' for #Puppet::Rail

2009-05-28 Thread Vincent Louviaux
Hello

I have restart puppetmasterd with dbmigrate
but I still have the error : Could not store configs


May 28 14:37:18  puppetmasterd[19150]: Migrating
May 28 14:37:19  puppetmasterd[19150]: Could not store configs: undefined
method `environment=' for #Puppet::Rails::Host:0xb76a66cc
May 28 14:37:19  puppetmasterd[19150]: Compiled catalog for xxx in 1.92
seconds
May 28 14:37:27  puppetmasterd[19150]: Could not store configs: undefined
method `environment=' for #Puppet::Rails::Host:0xb751bba4


Vincent

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



[Puppet Users] Re: error : Could not store configs: undefined method `environment=' for #Puppet::Rail

2009-05-28 Thread Vincent Louviaux
I have recreate the DB ..

now it solved

Vincent


On Thu, May 28, 2009 at 2:45 PM, Vincent Louviaux vinc...@louviaux.comwrote:

 Hello

 I have restart puppetmasterd with dbmigrate
 but I still have the error : Could not store configs


 May 28 14:37:18  puppetmasterd[19150]: Migrating
 May 28 14:37:19  puppetmasterd[19150]: Could not store configs: undefined
 method `environment=' for #Puppet::Rails::Host:0xb76a66cc
 May 28 14:37:19  puppetmasterd[19150]: Compiled catalog for xxx in 1.92
 seconds
 May 28 14:37:27  puppetmasterd[19150]: Could not store configs: undefined
 method `environment=' for #Puppet::Rails::Host:0xb751bba4


 Vincent




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



[Puppet Users] Re: Debian sarge packages?

2009-04-03 Thread Vincent

I have same request : have puppet on sarge
Is ruby 1.8 is available somewhere ?
I am trying to recompile and I ve got the following error :


devsarge:/export/packages/puppet/puppet-0.24.7# dpkg-buildpackage
dpkg-buildpackage: source package is puppet
dpkg-buildpackage: source version is 0.24.7-1
dpkg-buildpackage: source maintainer is Micah Anderson
mi...@debian.org
dpkg-buildpackage: host architecture is i386
 debian/rules clean
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
dh_clean
 dpkg-source -b puppet-0.24.7
dpkg-source: warning: unknown information field  in input data in
general section of control info file
dpkg-source: warning: unknown information field  in input data in
general section of control info file
dpkg-source: warning: unknown information field  in input data in
general section of control info file
dpkg-source: building puppet using existing puppet_0.24.7.orig.tar.gz
dpkg-source: building puppet in puppet_0.24.7-1.diff.gz
dpkg-source: building puppet in puppet_0.24.7-1.dsc
 debian/rules build
dh_testdir
touch configure-stamp
dh_testdir
touch build-stamp
 debian/rules binary
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# note to self, fix the install.rb to handle DESTDIR and change
# library path
install -d -m0755 /export/packages/puppet/puppet-0.24.7/debian/tmp/usr/
sbin
install -d -m0755 /export/packages/puppet/puppet-0.24.7/debian/tmp/usr/
bin
install -d -m0755 /export/packages/puppet/puppet-0.24.7/debian/tmp/usr/
lib/ruby/1.8
install -d -m0755 /export/packages/puppet/puppet-0.24.7/debian/tmp/etc/
puppet/manifests
install -d -m0755 /export/packages/puppet/puppet-0.24.7/debian/tmp/var/
lib/puppet
install -d -m0755 /export/packages/puppet/puppet-0.24.7/debian/tmp/var/
run
install -d -m0755 /export/packages/puppet/puppet-0.24.7/debian/tmp/var/
log/puppet
install -Dp -m0755 bin/puppet bin/puppetdoc bin/ralsh ext/puppetlast
bin/filebucket /export/packages/puppet/puppet-0.24.7/debian/tmp/usr/
bin
install -Dp -m0755 bin/puppetd bin/puppetmasterd bin/puppetca bin/
puppetrun /export/packages/puppet/puppet-0.24.7/debian/tmp/usr/sbin
install -Dp -m0644 lib/puppet.rb /export/packages/puppet/puppet-0.24.7/
debian/tmp/usr/lib/ruby/1.8/puppet.rb
cp -a lib/puppet /export/packages/puppet/puppet-0.24.7/debian/tmp/usr/
lib/ruby/1.8
find /export/packages/puppet/puppet-0.24.7/debian/tmp/usr/lib/ruby/1.8
-type f -perm +ugo+x -exec chmod a-x {} \;
install -Dp -m0644 debian/fileserver.conf /export/packages/puppet/
puppet-0.24.7/debian/tmp/etc/puppet/fileserver.conf
install -Dp -m0644 debian/puppet.conf /export/packages/puppet/
puppet-0.24.7/debian/tmp/etc/puppet/puppet.conf
# Vim auto-syntax-highlighting stuff
install -Dp -m0644 ext/vim/syntax/puppet.vim\
/export/packages/puppet/puppet-0.24.7/debian/puppet/usr/share/vim/
vim71/syntax/
install: cannot overwrite directory `/export/packages/puppet/
puppet-0.24.7/debian/puppet/usr/share/vim/vim71/syntax/' with non-
directory
make: *** [install] Error 1
devsarge:/export/packages/puppet/puppet-0.24.7#



On 8 mar, 22:35, Steve Wray steve.w...@cwa.co.nz wrote:
 Hannes Nagl wrote:
  Hello Steve!

  There is already one:http://packages.debian.org/etch/puppet
  But if it is possible I suggest you to pin the package from lenny (or
  newer).

 This pinning isn't working out, not finding any puppet package.

 I imagine that I should replace 'experimental' with 'etch'? I've also tried
 'stable'.

 I get:

 Package puppet is not available, but is referred to by another package.
 This may mean that the package is missing, has been obsoleted, or
 is only available from another source

 I have a standard etch source listed in sources.list:

 debftp://ftp.nz.debian.org/debianetch main contrib non-free

 :(

 I want to get puppet installed on ourSargeservers in preparation for
 upgrades.



  This can be done through adding the repository to your sources list and
  the following to your /etc/apt/preferences:
  snip
  Package: *
  Pin: release a=experimental
  Pin-Priority: 1

  Package: puppet
  Pin: release a=experimental
  Pin-Priority: 1001

  Package: puppetmaster
  Pin: release a=experimental
  Pin-Priority: 1001
  snap

  sincerely
  Hannes

  Steve Wray schrieb:
  Hi there,

  I was wondering if anyone might know of a repository or other source for
  puppet packages for DebianSarge? (and supporting packages for ruby etc)

  Thanks!

 --
 Please remember that an email is just like a postcard; it is not
 confidential nor private nor secure and can be read by many other people
 than the intended recipient. A postcard can be read by anyone at the mail
 sorting office and expecting what is written on it to be private and secret
 is not realistic. Please hold no higher expectation of email.

 If you need to send confidential information in an email you need to use
 encryption. PGP is Pretty good for this.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google 

[Puppet Users] Re: looking for puppet on redhat el 3

2009-04-02 Thread Vincent Louviaux
ok successfully recompiled ruby-augeas from src.rpm of epel

Still a little bug for puppet :
# rpm -Uhv /usr/src/redhat/RPMS/i386/puppet-0.24.8-3.i386.rpm
Preparing...###
[100%]
usage: useradd[-u uid [-o]] [-g group] [-G group,...]
[-d home] [-s shell] [-c comment] [-m [-k template]]
[-f inactive] [-e expire ] [-p passwd] [-M] [-n] [-r] name
   useradd-D [-g group] [-b base] [-s shell]
[-f inactive] [-e expire ]
   1:puppet ###
[100%]
warning: user puppet does not exist - using root
warning: user puppet does not exist - using root
warning: user puppet does not exist - using root



On Thu, Apr 2, 2009 at 10:23 AM, Vincent Louviaux vinc...@louviaux.comwrote:

 it s compiled when removed the libselinux dependency

 Do you have a spec file for ruby-augeas ?

 Vincent


 On Thu, Apr 2, 2009 at 10:08 AM, Vincent Louviaux vinc...@louviaux.comwrote:

 I have a dependencies error when I try to compile on rhel3
 # rpmbuild -ba augeas.spec
 error: Failed build dependencies:
 libselinux-devel is needed by augeas-0.5.0-1


 I think selinux was not implemented on rhel3


 Vincent





 On Wed, Apr 1, 2009 at 7:29 PM, David Lutterkort lut...@redhat.comwrote:

 Hi Vincent,

 On Wed, 2009-04-01 at 09:18 +0200, Vincent Louviaux wrote:
  here is the compilation same error with many version of augeas ..

 thanks for sending this. The problem you are encountering is entirely
 becasue augeas is built with -Werror. You can try two things to get
 around that:

  * build the very latest Augeas (augeas-0.5.0) - I changed things
around so that by default, it is not built with -Werror anymore.
If that fails, please let me know
  * if augeas-0.5.0 doesn't build out of the box, you should be able
to get it to build by changing how configure is invoked in the %
build section of augeas.spec to
%configure --disable-static --enable-compile-warnings=no

 David






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



[Puppet Users] Re: looking for puppet on redhat el 3

2009-04-02 Thread Vincent Louviaux
there are two useradd in the redhat spec file, So I removed one

Can you adapt the redhat spec :

159d158
 useradd -r -g puppet -d %{_localstatedir}/lib/puppet -s /sbin/nologin \

Now the last puppet run on my rhel3 :-)

Vincent



On Thu, Apr 2, 2009 at 10:29 AM, Vincent Louviaux vinc...@louviaux.comwrote:

 ok successfully recompiled ruby-augeas from src.rpm of epel

 Still a little bug for puppet :
 # rpm -Uhv /usr/src/redhat/RPMS/i386/puppet-0.24.8-3.i386.rpm
 Preparing...###
 [100%]
 usage: useradd[-u uid [-o]] [-g group] [-G group,...]
 [-d home] [-s shell] [-c comment] [-m [-k template]]
 [-f inactive] [-e expire ] [-p passwd] [-M] [-n] [-r] name
useradd-D [-g group] [-b base] [-s shell]
 [-f inactive] [-e expire ]
1:puppet ###
 [100%]
 warning: user puppet does not exist - using root
 warning: user puppet does not exist - using root
 warning: user puppet does not exist - using root




 On Thu, Apr 2, 2009 at 10:23 AM, Vincent Louviaux vinc...@louviaux.comwrote:

 it s compiled when removed the libselinux dependency

 Do you have a spec file for ruby-augeas ?

 Vincent


 On Thu, Apr 2, 2009 at 10:08 AM, Vincent Louviaux 
 vinc...@louviaux.comwrote:

 I have a dependencies error when I try to compile on rhel3
 # rpmbuild -ba augeas.spec
 error: Failed build dependencies:
 libselinux-devel is needed by augeas-0.5.0-1


 I think selinux was not implemented on rhel3


 Vincent





 On Wed, Apr 1, 2009 at 7:29 PM, David Lutterkort lut...@redhat.comwrote:

 Hi Vincent,

 On Wed, 2009-04-01 at 09:18 +0200, Vincent Louviaux wrote:
  here is the compilation same error with many version of augeas ..

 thanks for sending this. The problem you are encountering is entirely
 becasue augeas is built with -Werror. You can try two things to get
 around that:

  * build the very latest Augeas (augeas-0.5.0) - I changed things
around so that by default, it is not built with -Werror anymore.
If that fails, please let me know
  * if augeas-0.5.0 doesn't build out of the box, you should be able
to get it to build by changing how configure is invoked in the %
build section of augeas.spec to
%configure --disable-static --enable-compile-warnings=no

 David







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



[Puppet Users] service top parameter seems to be ignored

2009-02-25 Thread Vincent Louviaux
Hello,

I am trying to disable a process , but the stop parameter seems to be
ignored
from the output of puppetd -tv :
..
err: /:main/sastools/Service[cfexecd]/ensure: change from running to stopped
failed: Execution of '*/sbin/service cfexecd stop*' returned 1: cfexecd:
unrecognized service
..

from the manifests :
service  { cfexecd:
 stop=*/usr/bin/killall cfexecd*,
 ensure = stopped,
}




# puppetd --version
0.24.7
on  Red Hat Enterprise Linux ES release 4 (Nahant Update 6)




A bug ?

Vincent

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



[Puppet Users] Re: Puppet version 0.24.7 released!

2008-12-16 Thread Vincent Louviaux
I have make the following change to compile the rpm

Change the version and add the Group

Vincent


diff /tmp/puppet-0.24.7/conf/redhat/puppet.spec
/tmp/puppet-0.24.7-vlv/conf/redhat/puppet.spec
5c5
 Version:0.24.6
---
 Version:0.24.7
11a12,13
 Group: System Environment/Base



On Tue, Dec 16, 2008 at 12:36 PM, James Turnbull ja...@lovedthanlost.netwrote:

 Vincent Louviaux wrote:
  Thanks !
 
  is the spec file can be updated too ?

 I usually leave that to the packagers.  We only include the spec file as
 a convenience - we expect downstream to handle the fine details.  If you
 need it updated in the meantime please do it manually.

 Thanks

 James Turnbull

 --
 Author of:
 * Pulling Strings with Puppet
 (http://www.amazon.com/gp/product/1590599780/)
 * Pro Nagios 2.0
 (http://www.amazon.com/gp/product/1590596099/)
 * Hardening Linux
 (http://www.amazon.com/gp/product/159059/)



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



[Puppet Users] server-based filebucket

2008-11-28 Thread Vincent Louviaux
I am trying the server-based filebucket.

How can I know from which node the backup file is coming ?


Vincent

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



[Puppet Users] regular expression in manifest

2008-11-03 Thread Vincent Louviaux
How can I use regular expression in manifests ?
Something like this :
if $productname =~ /ProLiant/ {


}

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



[Puppet Users] many environments with one puppetmasterd

2008-10-23 Thread Vincent Louviaux
Hello

What is the best practice to have a testing and a production environment on
the same pupetmasterd ?
Must I defined in each class a test with an env variable ?

Vincent

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



[Puppet Users] split config by $lsbdistid

2008-10-07 Thread Vincent Louviaux
Hello

Is it possible to split config files by distributions ?

the goal is to define the same class but different by os distribution
and not always define a case in all config files like

class ntp {
case $lsbdistid $lsbdistcodename {
  Ubuntu hardy:   {
..


So I would like something like :
import classes/$lsbdistid/$lsbdistcodename/*.pp

Vincent

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