[Puppet Users] should create_resources honor schedule metaparameter?

2015-09-28 Thread Tom Downes
I have a defined resource that I instantiate through create_resources and a 
set of defaults that trace back to hiera:

create_resources("apache::vhost", $full_apache_hash, $http_defaults)


http_defaults:

  schedule: 'nightly'

  priority: '25'

  docroot: '/var/www'

  serveradmin: 'myl...@dot.edu'

  port: '80'


Elsewhere in the catalog I have defined:


schedule { 'nightly':

  range  => '0-2',

  period => daily,

  repeat => 1,

}


When I run "puppet agent -t" outside of the specified range, it always 
takes action to manage my apache::vhost. i.e. if I blow away the file, it 
will come back. Am I wrong not to expect this? Is it create_resources not 
honoring schedule or puppet agent -t ignoring schedule?


Thanks,


Tom

-- 
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/aee81143-8119-41e8-96f3-279d2045428d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: Forge ACL Module 1.1.1 on Windows 7 x64 SP1

2015-09-28 Thread Rob Reynolds
Can you address the yum bit?

On Mon, Sep 28, 2015 at 12:34 PM, jmp242  wrote:

> And I removed the "target" and put it in the ACL name as you showed, and
> get the same error.
>
>
> On Friday, September 25, 2015 at 2:31:43 PM UTC-4, jmp242 wrote:
>>
>> I tried with the simplified version:
>> Enter code here...  acl { 'chocolatey.config':
>> target  =>
>> 'C:/ProgramData/chocolatey/config/chocolatey.config',
>> permissions => [
>>   {
>> identity => 'SYSTEM',
>> rights   => [
>>   'full']
>>   }
>>   ,
>>   {
>> identity => 'Administrators',
>> rights   => [
>>   'full']
>>   }
>>   ,
>>   {
>> identity => 'Users',
>> rights   => [
>>   'read',
>>   'execute']
>>   }
>>   ],
>> require => File['chocolatey.config'],
>>   }
>>
>> I got the same error. Unless the problem is using
>> target=>
>>
>> I'm at a loss
>>
>> --
> 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/155fa6b9-2819-4b25-a311-a65a7094e895%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Rob Reynolds
Developer, Puppet Labs

*PuppetConf 2015 ** is right around the
corner! Join us October 5-9 in Portland, OR. **Register now
**.*

-- 
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/CAMJiBK5EKaX0NxXUhy0z3%3D%2BYptATkPtPUf7ESHeOKKgYQ%3DdjrQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppetdb garbage collection failing

2015-09-28 Thread Wyatt Alt

On 09/28/2015 10:39 AM, Wyatt Alt wrote:

On 09/28/2015 05:40 AM, Matt Jarvis wrote:
We seem to have hit a bit of an issue with puppetdb garbage 
collection. Initial symptoms were exceptions in the puppetdb logs :


Retrying after attempt 6, due to: org.postgresql.util.PSQLException: 
This connection has been closed.



And on the postgres side :


LOG:  incomplete message from client


Having turned up the logging on postgres, it appears that the query


DELETE FROM fact_paths fp

  WHERE fp.id in ( $some_ids )  AND NOT EXISTS (SELECT 1 FROM 
facts f


  WHERE f.fact_path_id in ( 
$some_more_ids ) AND f.fact_path_id = fp.id


AND f.factset_id <> $26355)


is the cuplrit. This query is absolutely massive, with over 26000 
id's specified as parameters - as soon as the query is executed, 
postgres returns incomplete message from client and drops the 
connection.



puppetdb is 2.3.7-1puppetlabs1

postgres is 9.3


Does anyone have any clues what's going on here ?


Thanks


Matt


DataCentred Limited registered in England and Wales no. 05611763 --
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/5fe3bad3-71a7-4348-a9ff-24d8a0284a1c%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Hey Matt,

I can reproduce this by inserting a value at the beginning of an 
extremely large array-valued structured fact, but we'll need to know 
more about your particular data to confirm whether that's your 
particular issue. This could be some large custom fact you're creating 
or something generated by a module.


I've created a ticket here around this issue here
https://tickets.puppetlabs.com/browse/PDB-2003

can you connect to the database via psql and share (either here or in 
the ticket) the output of


select count(*),name from fact_paths group by name order by count desc;

?

My hope is that that will identify one or more large structured facts 
associated with a lot of leaf values, and then we'll need to figure 
out where they're coming from.


Wyatt



Just to clarify, I think the top few rows of that result should be 
enough to illustrate -- no need to include the whole thing.


Wyatt

--
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/56097C44.6030602%40puppetlabs.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppetdb garbage collection failing

2015-09-28 Thread Wyatt Alt

On 09/28/2015 05:40 AM, Matt Jarvis wrote:
We seem to have hit a bit of an issue with puppetdb garbage 
collection. Initial symptoms were exceptions in the puppetdb logs :


Retrying after attempt 6, due to: org.postgresql.util.PSQLException: 
This connection has been closed.



And on the postgres side :


LOG:  incomplete message from client


Having turned up the logging on postgres, it appears that the query


DELETE FROM fact_paths fp

  WHERE fp.id in ( $some_ids )  AND NOT EXISTS (SELECT 1 FROM 
facts f


  WHERE f.fact_path_id in ( $some_more_ids 
) AND f.fact_path_id = fp.id


AND f.factset_id <> $26355)


is the cuplrit. This query is absolutely massive, with over 26000 id's 
specified as parameters - as soon as the query is executed, postgres 
returns incomplete message from client and drops the connection.



puppetdb is 2.3.7-1puppetlabs1

postgres is 9.3


Does anyone have any clues what's going on here ?


Thanks


Matt


DataCentred Limited registered in England and Wales no. 05611763 --
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/5fe3bad3-71a7-4348-a9ff-24d8a0284a1c%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.

Hey Matt,

I can reproduce this by inserting a value at the beginning of an 
extremely large array-valued structured fact, but we'll need to know 
more about your particular data to confirm whether that's your 
particular issue. This could be some large custom fact you're creating 
or something generated by a module.


I've created a ticket here around this issue here
https://tickets.puppetlabs.com/browse/PDB-2003

can you connect to the database via psql and share (either here or in 
the ticket) the output of


select count(*),name from fact_paths group by name order by count desc;

?

My hope is that that will identify one or more large structured facts 
associated with a lot of leaf values, and then we'll need to figure out 
where they're coming from.


Wyatt

--
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/56097B44.6030700%40puppetlabs.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Forge ACL Module 1.1.1 on Windows 7 x64 SP1

2015-09-28 Thread jmp242
And I removed the "target" and put it in the ACL name as you showed, and 
get the same error.

On Friday, September 25, 2015 at 2:31:43 PM UTC-4, jmp242 wrote:
>
> I tried with the simplified version:
> Enter code here...  acl { 'chocolatey.config':
> target  => 
> 'C:/ProgramData/chocolatey/config/chocolatey.config',
> permissions => [
>   {
> identity => 'SYSTEM',
> rights   => [
>   'full']
>   }
>   ,
>   {
> identity => 'Administrators',
> rights   => [
>   'full']
>   }
>   ,
>   {
> identity => 'Users',
> rights   => [
>   'read',
>   'execute']
>   }
>   ],
> require => File['chocolatey.config'],
>   }
>
> I got the same error. Unless the problem is using 
> target=>
>
> I'm at a loss
>
>

-- 
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/155fa6b9-2819-4b25-a311-a65a7094e895%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Puppet Strings Error

2015-09-28 Thread Ian Kronquist
Hi Dan,
Thanks for testing out Strings on Windows! We really haven't given Strings 
enough love on that operating system, sorry.
I would have to guess that the error is happening here 
.
 
There is probably some subtle pathing difference between Linux/OS X and 
Windows which I'm not familiar with. I'll try to get a hold of a windows vm 
and reproduce the problem.

Ian

On Sunday, September 27, 2015 at 8:30:56 AM UTC-7, Dan wrote:
>
> Hi,
>
> I'm just trying out puppet strings for generating html but I'm not getting 
> very far with!  Having followed the instructions here 
> https://github.com/puppetlabs/puppetlabs-strings 
> 
>  
> I get the following error when I navigate to a module and run "puppet 
> strings":
>
> Error: Could not parse application options: cannot load such file -- 
> puppet_x/puppetlabs/strings/yard/code_objects/puppet_namespace_object
>
> I'm running this on Windows 7 with Ruby 2.1 installed.
>
> Any ideas!?
>
> Thanks
>
> Dan
>

-- 
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/f61a0f9d-244f-411c-9b68-0725f0c8cdd4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Puppetdb garbage collection failing

2015-09-28 Thread Matt Jarvis
We seem to have hit a bit of an issue with puppetdb garbage collection. 
Initial symptoms were exceptions in the puppetdb logs :

Retrying after attempt 6, due to: org.postgresql.util.PSQLException: This 
connection has been closed.


And on the postgres side :


LOG:  incomplete message from client


Having turned up the logging on postgres, it appears that the query 


DELETE FROM fact_paths fp

  WHERE fp.id in ( $some_ids )  AND NOT EXISTS (SELECT 1 FROM facts 
f

  WHERE f.fact_path_id in ( $some_more_ids ) AND 
f.fact_path_id = fp.id

AND f.factset_id <> $26355)


is the cuplrit. This query is absolutely massive, with over 26000 id's 
specified as parameters - as soon as the query is executed, postgres 
returns incomplete message from client and drops the connection. 


puppetdb is 2.3.7-1puppetlabs1

postgres is 9.3


Does anyone have any clues what's going on here ?


Thanks


Matt

-- 
DataCentred Limited registered in England and Wales no. 05611763

-- 
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/5fe3bad3-71a7-4348-a9ff-24d8a0284a1c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: dump complete enc to file on client

2015-09-28 Thread Michael Wörz
ENC was synonym for stuctured data passed to the puppet client.
i solved it now using a ruby template:

<%= YAML.dump(yaml) %>

thanks

2015-09-28 15:02 GMT+02:00 jcbollinger :

>
>
> On Monday, September 28, 2015 at 6:10:35 AM UTC-5, Michael Wörz wrote:
>>
>> Hello,
>>
>> we want to dump ENC Data to a file on the puppet clients so that it can
>> be used outside puppet scripts.
>>
>> file{'/etc/config-enc':
>>   content => "$yaml"
>> }
>>
>> does the Job but the output data is not formated an close to unreadable.
>> Json or Yaml woukd be nice.
>>
>>
>
> It's unclear what "ENC Data" means to you.  An ENC is a *program* that *you
> provide*.  When run it emits data (classes, parameter values, and global
> variable values), but that data must be in YAML format already, so I
> suppose it's not what you're looking for.  Perhaps your particular ENC
> relies on an external data file, and it's that data you want to pass on to
> clients; in that case, we'll need some more information about the nature of
> that file before we can give you any detailed help.
>
> Generally speaking, however, formatting raw external data within Puppet
> probably depends either on writing a custom function or on use of OS
> utilities or an external program via the built-in generate() function.
>
>
> John
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Puppet Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/puppet-users/itWQjnUCok8/unsubscribe.
> To unsubscribe from this group and all its topics, 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/c3832276-5be1-4ea8-bbb4-d720bdb5e9c3%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAGPb%2BVtB7SbAp5Jx3Oobybq%2BK4t4XzfsK_siP8akHyXN5jty3A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: dump complete enc to file on client

2015-09-28 Thread jcbollinger


On Monday, September 28, 2015 at 6:10:35 AM UTC-5, Michael Wörz wrote:
>
> Hello,
>
> we want to dump ENC Data to a file on the puppet clients so that it can be 
> used outside puppet scripts.
>
> file{'/etc/config-enc':
>   content => "$yaml"
> }
>
> does the Job but the output data is not formated an close to unreadable. 
> Json or Yaml woukd be nice.
>
>

It's unclear what "ENC Data" means to you.  An ENC is a *program* that *you 
provide*.  When run it emits data (classes, parameter values, and global 
variable values), but that data must be in YAML format already, so I 
suppose it's not what you're looking for.  Perhaps your particular ENC 
relies on an external data file, and it's that data you want to pass on to 
clients; in that case, we'll need some more information about the nature of 
that file before we can give you any detailed help.

Generally speaking, however, formatting raw external data within Puppet 
probably depends either on writing a custom function or on use of OS 
utilities or an external program via the built-in generate() function.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/c3832276-5be1-4ea8-bbb4-d720bdb5e9c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] dump complete enc to file on client

2015-09-28 Thread Michael Wörz
Hello,

we want to dump ENC Data to a file on the puppet clients so that it can be 
used outside puppet scripts.

file{'/etc/config-enc':
  content => "$yaml"
}

does the Job but the output data is not formated an close to unreadable. 
Json or Yaml woukd be nice.

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/13236b39-901c-494d-bb83-50bffb1b0281%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: puppetlabs-postgrest module not loaded

2015-09-28 Thread Alfredo De Luca
Hi David et all.

I didn't have that much time to investigate further but I tried only to have
postgresql::server in my xxx.xxx.xxx.yaml and it install the
default postgresql so not what I wanted.

So it looks like I can't use postgresql (or mysql) only with hiera.

Should I contact the team that published the module?

Thanks
Alfredo


On Wed, Sep 9, 2015 at 9:39 PM, David Levray  wrote:
> Hello,
>
> Its configuration file is hiera.yaml, and path depends on how it is invoked,
> which can be one of the following ways:
>
> -When Is invoked from puppet, the path will be: /etc/puppet/hiera.yaml
> -When Is invoked from CLI or when used in the Ruby code: /etc/hiera.yaml
>
> So you have to see for the rights.
>
> The establishment of a hierarchy allows control over the deployment of
> modules. By including the package in the common file. The entire node
> receive packages. Hence the use of the hierarchy for that installed on one
> or more dedicated server for application.
>
> The problem here is that it does not find the class PostgreSQL. We must
> therefore indicate the missing class.
>
> http://docs.puppetlabs.com/hiera/1/puppet.html#assigning-classes-to-nodes-with-hiera-hierainclude
> http://docs.puppetlabs.com/hiera/1/complete_example.html
>
>
>
>
>
>
> Le mardi 8 septembre 2015 16:19:39 UTC+2, jcbollinger a écrit :
>>
>>
>>
>> On Friday, September 4, 2015 at 6:54:52 AM UTC-5, David Levray wrote:
>>>
>>> Thanks for your return.
>>>
>>> It is noted that hiera your search directly in the common.yaml, it is not
>>> your path hierarchy.
>>
>>
>>
>> Oh, come on.  It is not erroneous to have an Hiera hierarchy consisting of
>> only one level.  Correct operation of Hiera does not depend on there being
>> more than one, as evidenced, for example, by the fact that Alfredo's
>> configuration has been working for him except with respect to postgres.  All
>> appearances point to the issue being associated with the details of the data
>> that Hiera is providing to Puppet, not Hiera's general configuration.
>>
>>
>>>
>>>
>>>
>>> Here's an example search or hiera good in the order of hierarchy:
>>>
>>> My hierarchy is:
>>>
>>>
>>> :hierarchy:
>>>
>>>   - "node/%{fqdn}"
>>>
>>>   - "virtual/%{virtual}"
>>>
>>>   - "osfamily/%{osfamily}"
>>>
>>>   - common
>>>
>>>
>>
>>
>>
>> Very good, but Alfredo's hierarchy does not need to look like yours.
>>
>>
>>>
>>>
>>>
>>>
>>>
>>> So check the following:
>>>
>>> 1 / verifies that the file points /etc/hiera.yaml of your file
>>> /etc/puppet/hiera.yaml:
>>>
>>> ls -rtla /etc/hiera.yaml
>>>
>>>  /etc/hiera.yaml -> /etc/puppet/hiera.yaml
>>>
>>>
>>>
>>> 2 / Check the owners:
>>>
>>> Chown puppet: puppet /etc/puppet/hiera.yaml
>>>
>>> Chown -R puppet: puppet / etc / puppet / hieradata /
>>>
>>>
>>
>>
>>
>> Hiera data files do not need to be owned by 'puppet' so long as 'puppet'
>> can read them.  In fact, it is better for them to be owned by root and
>> writable only by root, for, as a general rule, it is preferable for services
>> to be unable to modify their own data and configuration.  That reduces the
>> surface area accessible to malicious actors.
>>
>>
>> John
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/83b7272f-d037-40ba-bce4-27dccbf67176%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



-- 
Alfredo

-- 
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/CAAWpFTEvAeS_zOThihzuJ%3Dh0twnH_KGwyY0Fm47MmCy-VKGq8A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.