Re: [Puppet Users] writing custom fact -> return value not as expected

2017-01-11 Thread Denny
Thank you guys for the clarification!

Stupid question #2:

How do I get facter use LC_ALL=en_US.UTF-8 instead of LC_ALL=C?

A simple add to my Facter::Util::Resolution.exec("...") did not work, of 
course.


Denny



Am Mittwoch, 11. Januar 2017 08:07:06 UTC+1 schrieb Dirk Heinrichs:
>
> Am 10.01.2017 um 22:29 schrieb Stefan Schulte:
>
> % LC_ALL=de_DE.utf8 /usr/bin/who -b |awk '{print $3}'
>
> 19:34
>
> % LC_ALL=en_US.utf8 /usr/bin/who -b |awk '{print $3}'
>
> 2017-01-10
>
>
> Interesting. On my system, there's no difference between them (left out 
> the awk part for clarity):
>
> % LC_ALL=en_US.UTF-8 who -b
>  system boot  2017-01-02 11:10
> % LC_ALL=de_DE.UTF-8 who -b
>  system boot  2017-01-02 11:10
>
> % LC_ALL=C /usr/bin/who -b |awk '{print $3}'
>
> Jan
>
>
> Only here:
>
> % LC_ALL=C who -b
>  system boot  Jan  2 11:10
>
> Bye...
>
> Dirk
> -- 
> *Dirk Heinrichs*
> Senior Systems Engineer, Delivery Pipeline
> OpenTextTM Discovery | Recommind
> *Email*: dirk.he...@recommind.com 
> *Website*: www.recommind.de
>
> Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
>
> Vertretungsberechtigte Geschäftsführer John Marshall Doolittle, Gordon 
> Davies, Roger Illing, Registergericht Amtsgericht Bonn, Registernummer HRB 
> 10646
>
> This e-mail may contain confidential and/or privileged information. If you 
> are not the intended recipient (or have received this e-mail in error) 
> please notify the sender immediately and destroy this e-mail. Any 
> unauthorized copying, disclosure or distribution of the material in this 
> e-mail is strictly forbidden
>
> Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte 
> Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail 
> irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und 
> vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte 
> Weitergabe dieser Mail sind nicht gestattet.
>
> www.recommind.com 
>

-- 
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/45ad386c--46a9-a027-139653b7735e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Over-engineering rant

2017-01-11 Thread Henrik Lindberg

On 11/01/17 02:50, John Gelnaw wrote:

On Tuesday, January 10, 2017 at 3:19:45 PM UTC-5, Eric Sorenson wrote:


I'd like to point out that this ntp module is also deliberately a
test case for *all* of the puppet 4 language features, and as such
is kind of a "reference module", so it certainly could be simpler
but is intended to both do something useful and provide a working
example of things like EPP and the type system. Helen Campbell wrote
up a walk-through of the features that she and David Schmitt
implemented in it here:
 https://puppet.com/blog/ntp-puppet-4-language-update



Understood.


Most of my bitterness towards puppet comes from the 3.x series,
where the API was a moving target, and upgrading to the "latest"
puppet 3.x package could break your world.  It's gotten
significantly better, but I'm still only about halfway up the
puppet 3.x --> 4.x cliff.  ;)


Can you give me an example of backwards-incompatible API changes in
the 3.x series? I'm not being snarky; we had long debates (way too
long, in some cases) about semantic versioning and did extra work to
not introduce breaking changes into the 3.x. The goal was rebuilding
trust that new versions behave like you'd expect given the version
number, so I'm dismayed to hear that those efforts failed and things
broke for you anyway :(


Unfortunately, I don't remember specifics-- looking in my git log, I had
to freeze the version at 3.4.3.  Some feature (not mentioned in my git
log) went from "deprecated" to "fail" in the jump from 3.4.3 to 3.5, and
upgrading to 3.5.x or later caused my puppet master to stop working.

I'm thinking it might have actually been a change in the future parser,
which I was (and still am) using fairly heavily in my AD-based user
management.  Is it possible that the future parser stopped accepting
hyphens around then?



:-)
As you were probably aware, the future parser was marked as experimental 
and it was explicitly pointed out that it could be breaking API even in 
minor releases. If we had not taken that approach, you would probably 
still be waiting for iteration...


You were courageous to start using future parser so early. It stabilized 
and had most kinks worked out around 3.7 and around that time also 
became a supported option.


A big thank you for being an early user and being willing to expose 
yourself to breakages in an experimental version. Without test pilots we 
would not have been able to reach the high quality we now enjoy.

Were you unaware that your choice was to take the rocky road?

At the point in time when the future parser work started there were 
several hundred bugs reported against features of the language that were 
strange and to a large degree unsolvable per ticket. There was also a 
steady stream of incoming tickets. The situation today is very different 
- there are hardly any language related issues - when we get one it is 
usually about improving error messages, the ability to detect and report 
corner cases that otherwise result in hard to understand subsequent 
errors, and the like.


There is still a substantial cleanup and rewrite to be done in the 
Compiler (and related language constructs, such as resource defaults, 
the inability to declare an identical resource more than once, the 
inflexibility and lack of semantic power in the space ship operators, etc.)


We also have internal APIs that needs to evolve, and here we must move 
slowly as changes cause breakage and it takes a long time before the 
majority of the puppet ecosystem has migrated/upgraded.


Specific to your question about future parser 3.4 -> 3.5:
Future Parser in Puppet 3.5.0 was a big change as it was the first 
version of the reimplemented evaluator. Up to that point, the future 
parser transformed everything to the old AST format before evaluation.


- henrik


--
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/6d377003-44f2-436d-a126-c4722ff6339f%40googlegroups.com
.
For more options, visit https://groups.google.com/d/optout.



--

Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/

--
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/puppe

Re: [Puppet Users] Trouble using type Stdlib::Windowspath

2017-01-11 Thread Henrik Lindberg

On 09/01/17 14:22, Martin Alfke wrote:

Hi Henrik,



A non-existent type will in some versions of puppet be taken as being a 
resource type.

One thing you can check is that your module (where you are using Stdlib::XXX 
types have declared a dependency on Stdlib in its metadata. If it does not have 
this it will not find types in Stdlib.


do I get that right:

Self defined data types (in Modules) are only working when adding a 
metdata.json file to the module which makes use of the self defined data type?
Or with other words: self defined data types are not autoloaded?



Self defined data types are autoloaded. If you are referencing types in 
another module, your module must have that other module as a dependency 
in its meta data. This is true for self defined data types as well as 
for functions written against the 4.x API.


For references to entities in the same module there is no need to 
declare anything. Everything in a module is visible to that same module.


Does that help?
- henrik


Best,
Martin




--

Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/

--
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/76f54063-e8ec-d12c-edfa-62766cb7c5d7%40puppet.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Trouble using type Stdlib::Windowspath

2017-01-11 Thread Henrik Lindberg

On 10/01/17 13:57, Tiago Delboni wrote:

Hi Henrik, thanks for helping.

I didn't have a "metadata.json" so I created one with "puppet module
generate". Unfortunately, it is still not working - puppet apply is
showing the same error: "Expected parameter 'windowspath_param' of
'Class[Mymodule::Mymanifest]' to have type Stdlib::Windowspath, got String".

{
  "name": "almg-mymodule",
  "version": "0.1.0",
  "author": "almg",
  "summary": "Test module.",
  "license": "Apache-2.0",
  "source": "",
  "project_page": null,
  "issues_url": null,
  "dependencies": [
{"name":"puppetlabs-stdlib","version_requirement":">= 4.14.0"}
  ]
}



Maybe there is something wrong with that type.
What does this give you:

   notice('C:\a\valid\path' =~ Stdlib::Windowspath)

If that fails, please report the issue against stdlib.
(Or I am blind and there is something not right about the path).

Best,
- henrik


Em segunda-feira, 9 de janeiro de 2017 11:16:09 UTC-2, Henrik Lindberg
escreveu:

On 09/01/17 13:02, Tiago Delboni wrote:
> Hi!
>
> I'm having trouble using type Stdlib::Windowspath, from module
> puppetlabs/stdlib, as a parameter type in a manifest. Is this "custom
> type" really available? In
>

https://github.com/puppetlabs/puppetlabs-stdlib/blob/master/types/windowspath.pp



> it is defined using the "type" word, which, according to the
latest doc
>
(https://docs.puppet.com/puppet/latest/lang_reserved.html#reserved-words
),

> is "reserved for future use".
>

The documentation is behind. The `type` keyword has been operational in
3.x when used with future parser since some time as well as in
puppet 4.x.


> *1. Puppet version (Windows 7):*
>
> C:\>puppet --version
> 4.2.1
>
> *2. puppetlabs/stdlib version*
>
> C:\>puppet module list --modulepath=c:\git\winpuppet\test\modules
> c:/git/winpuppet/test/modules
> +-- mymodule (???)
> +-- puppetlabs-stdlib (v4.14.0)
>
> *3. Manifest (%MODULEPATH%\mymodule\manifests\mymanifest.pp):*
>
> |
> classmymodule::mymanifest (
>   String$string_param ='a string',
>   Stdlib::Windowspath$windowspath_param ='C:\a\valid\path'){
>
>   notice($string_param)
>   notice($windowspath_param)
>
> }
> |
>
> *4. Execution/error message:*
>
> C:\>puppet apply --modulepath=c:\git\winpuppet\test\modules -e
"include
> mymodule::mymanifest"
> Error: Evaluation Error: Error while evaluating a Function Call,
> Expected parameter 'windowspath_param' of
'Class[Mymodule::Mymanifest]'
> to have type Stdlib::Windowspath, got String  at line 1:1 on node
> xxx.yyy.zzz
>
> If, instead, I use a nonexistent type in the manifest, such as
> "My_nonexistent_type", I got the same error message:
>
> C:\>puppet apply --modulepath=c:\git\winpuppet\test\modules -e
"include
> mymodule::mymanifest"
> Error: Evaluation Error: Error while evaluating a Function Call,
> Expected parameter 'windowspath_param' of
'Class[Mymodule::Mymanifest]'
> to have type My_nonexistent_type, got String  at line 1:1 on node
> xxx.yyy.zzz
>

A non-existent type will in some versions of puppet be taken as being a
resource type.

One thing you can check is that your module (where you are using
Stdlib::XXX types have declared a dependency on Stdlib in its metadata.
If it does not have this it will not find types in Stdlib.

Regards
- henrik

--

Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/


--
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/a5e005fc-728b-4948-84af-4d18435ea277%40googlegroups.com
.
For more options, visit https://groups.google.com/d/optout.



--

Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/

--
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/7055963a-95b3-7c04-4b34-78f70ac3ad9c%40puppet.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Puppet managing thousands of resources

2017-01-11 Thread Zachary Vida
Hello, I was wonder if there are any significant impovements in later 
version of puppet >= 2.6 to catolog compilation and/or application 
runtimes. 

In an environment I manage we populate many local files 
(/etc/passwd,/etc/group,/etc/hosts) via ENC. This results in a steady state 
catalog compilation/apply run times of several minutes and during an inital 
puppet apply clocking in at 90 minutes. 



-- 
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/d7cc6062-722b-4f8a-9284-27ded5048c34%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet managing thousands of resources

2017-01-11 Thread Lowe Schmidt
How do  you run the puppetmaster? (Also, 2.6 is wy EOL)

--
Lowe Schmidt | +46 723 867 157

On 11 January 2017 at 18:58, Zachary Vida  wrote:

> Hello, I was wonder if there are any significant impovements in later
> version of puppet >= 2.6 to catolog compilation and/or application
> runtimes.
>
> In an environment I manage we populate many local files
> (/etc/passwd,/etc/group,/etc/hosts) via ENC. This results in a steady
> state catalog compilation/apply run times of several minutes and during an
> inital puppet apply clocking in at 90 minutes.
>
>
>
> --
> 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/d7cc6062-722b-4f8a-9284-27ded5048c34%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/CAC-wWcQKZOS9GhBXZD-ybYerPGZ42T8uH937dUX84Qd4_OkxLg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet managing thousands of resources

2017-01-11 Thread Zachary Vida
Lowe,

I am well aware it is very old. We have a single puppet master and a couple 
of hundred servers. I hope that answers your question?

On Wednesday, January 11, 2017 at 1:44:26 PM UTC-5, Lowe Schmidt wrote:
>
> How do  you run the puppetmaster? (Also, 2.6 is wy EOL)
>
> --
> Lowe Schmidt | +46 723 867 157
>
> On 11 January 2017 at 18:58, Zachary Vida 
> > wrote:
>
>> Hello, I was wonder if there are any significant impovements in later 
>> version of puppet >= 2.6 to catolog compilation and/or application 
>> runtimes. 
>>
>> In an environment I manage we populate many local files 
>> (/etc/passwd,/etc/group,/etc/hosts) via ENC. This results in a steady state 
>> catalog compilation/apply run times of several minutes and during an inital 
>> puppet apply clocking in at 90 minutes. 
>>
>>
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to puppet-users...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/puppet-users/d7cc6062-722b-4f8a-9284-27ded5048c34%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/527a9598-9990-42c2-9b2c-1230e11f4f70%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet managing thousands of resources

2017-01-11 Thread R.I.Pienaar
Lots of improvements. Http connections are reused and new static catalogs will 
help. It's different for everyone just how much it helps though. 

---
R.I.Pienaar

> On 11 Jan 2017, at 18:58, Zachary Vida  wrote:
> 
> Hello, I was wonder if there are any significant impovements in later version 
> of puppet >= 2.6 to catolog compilation and/or application runtimes. 
> 
> In an environment I manage we populate many local files 
> (/etc/passwd,/etc/group,/etc/hosts) via ENC. This results in a steady state 
> catalog compilation/apply run times of several minutes and during an inital 
> puppet apply clocking in at 90 minutes. 
> 
> 
> 
> -- 
> 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/d7cc6062-722b-4f8a-9284-27ded5048c34%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/A3DC0D18-A6AA-49B0-ACAD-1DB055B26718%40devco.net.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet managing thousands of resources

2017-01-11 Thread Trevor Vaughan
How many resources are in your catalog?

Puppet starts to hit exponential catalog sizes and run times as you
approach 10k resources.

Thanks,

Trevor

On Wed, Jan 11, 2017 at 12:58 PM, Zachary Vida  wrote:

> Hello, I was wonder if there are any significant impovements in later
> version of puppet >= 2.6 to catolog compilation and/or application
> runtimes.
>
> In an environment I manage we populate many local files
> (/etc/passwd,/etc/group,/etc/hosts) via ENC. This results in a steady
> state catalog compilation/apply run times of several minutes and during an
> inital puppet apply clocking in at 90 minutes.
>
>
>
> --
> 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/d7cc6062-722b-4f8a-9284-27ded5048c34%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699 x788

-- This account not approved for unencrypted proprietary information --

-- 
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/CANs%2BFoWo0EGkWKeLepqP%2BkOmbPN-hEa_cQV9Zq4C_H3caVuKSA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet managing thousands of resources

2017-01-11 Thread Zachary Vida
Exponential? Really or just an expression, but rough estimate is probably
about 5k

On Wed, Jan 11, 2017, 2:50 PM Trevor Vaughan  wrote:

> How many resources are in your catalog?
>
> Puppet starts to hit exponential catalog sizes and run times as you
> approach 10k resources.
>
> Thanks,
>
> Trevor
>
> On Wed, Jan 11, 2017 at 12:58 PM, Zachary Vida 
> wrote:
>
> Hello, I was wonder if there are any significant impovements in later
> version of puppet >= 2.6 to catolog compilation and/or application
> runtimes.
>
> In an environment I manage we populate many local files
> (/etc/passwd,/etc/group,/etc/hosts) via ENC. This results in a steady state
> catalog compilation/apply run times of several minutes and during an inital
> puppet apply clocking in at 90 minutes.
>
>
>
> --
>
> 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/d7cc6062-722b-4f8a-9284-27ded5048c34%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
>
>
> --
> Trevor Vaughan
> Vice President, Onyx Point, Inc
> (410) 541-6699 x788
>
> -- This account not approved for unencrypted proprietary information --
>
> --
> 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/fS1cHkjuWco/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/CANs%2BFoWo0EGkWKeLepqP%2BkOmbPN-hEa_cQV9Zq4C_H3caVuKSA%40mail.gmail.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/CAC0dne-h3Fu%2BxDARb6yzW0OiN6mPwSqa4UR7qjh28oe_gjAP4A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet managing thousands of resources

2017-01-11 Thread Trevor Vaughan
By my calculations...really.

I'm around 3k normally right now with no issue but, as you move toward 10k,
your agents start to have a bad time.

CC'ing Henrik and Eric since this is an "in the wild" case outside of my
theoretical ranting.

It's pretty easy to test using 'puppet apply' and files with resource
generators and 'notify' statements.

Thanks,

Trevor

On Wed, Jan 11, 2017 at 2:59 PM, Zachary Vida  wrote:

> Exponential? Really or just an expression, but rough estimate is probably
> about 5k
>
> On Wed, Jan 11, 2017, 2:50 PM Trevor Vaughan 
> wrote:
>
>> How many resources are in your catalog?
>>
>> Puppet starts to hit exponential catalog sizes and run times as you
>> approach 10k resources.
>>
>> Thanks,
>>
>> Trevor
>>
>> On Wed, Jan 11, 2017 at 12:58 PM, Zachary Vida 
>> wrote:
>>
>> Hello, I was wonder if there are any significant impovements in later
>> version of puppet >= 2.6 to catolog compilation and/or application
>> runtimes.
>>
>> In an environment I manage we populate many local files
>> (/etc/passwd,/etc/group,/etc/hosts) via ENC. This results in a steady
>> state catalog compilation/apply run times of several minutes and during an
>> inital puppet apply clocking in at 90 minutes.
>>
>>
>>
>> --
>>
>> 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/d7cc6062-722b-4f8a-9284-27ded5048c34%
>> 40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>>
>> --
>> Trevor Vaughan
>> Vice President, Onyx Point, Inc
>> (410) 541-6699 x788 <(410)%20541-6699>
>>
>> -- This account not approved for unencrypted proprietary information --
>>
>> --
>> 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/fS1cHkjuWco/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/CANs%2BFoWo0EGkWKeLepqP%2BkOmbPN-
>> hEa_cQV9Zq4C_H3caVuKSA%40mail.gmail.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/CAC0dne-h3Fu%2BxDARb6yzW0OiN6mPwSqa4UR7qjh2
> 8oe_gjAP4A%40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699 x788

-- This account not approved for unencrypted proprietary information --

-- 
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/CANs%2BFoWB%2BtO9ZmWay6JEcQp-aMLR%3DSwymFp1gfYMq%2Bceye%3DdVg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Could not find resource, but it's there.

2017-01-11 Thread Chris
On 11/01/17 06:20, Josh Cooper wrote:
> 
> The reference File['abc'] does not succeed because 'abc' is an
> alias, and not the title - I believe there is a ticket about that
> already logged.
> 
> 
> Filed as https://tickets.puppetlabs.com/browse/PUP-6984

Ah, awesome - thanks!

-- 
Postgresql & php tutorials
http://www.designmagick.com/

-- 
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/dcd05b88-83e8-2a32-3d16-110d6379f750%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Could not find resource, but it's there.

2017-01-11 Thread Chris
On 11/01/17 06:26, Arpin Dominique (Nter) wrote:
> Because you don’t use the right name…
> 

I was using the alias name, which should also work.

The bug report explains things.

Cheers,
-- 
Postgresql & php tutorials
http://www.designmagick.com/

-- 
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/e228c251-c470-5ec4-9d2c-4dd2764d01f6%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet managing thousands of resources

2017-01-11 Thread Christopher Wood
Out of gruesome interest, 5000 resources of what?

Assuming I'm remembering the path correctly, something like this would count it 
up, modify for your local case (assuming no puppetdb at your place) to search 
for resource types:

python -m json.tool /var/lib/puppet/client_data/catalog/`hostname -f`.json | 
grep '"type":' | sort | uniq -c | sort -rn | head

What do you mean by populating local files via ENC? I'm drawing a blank. Or 
perhaps my mind is recoiling from the notion that you're sending contents of 
files in via top-level ENC variables.

(For reference catalog sizes around here go from 500-2000 resources with agent 
funs mostly from 15-90 seconds, 2-7 minutes in the initial run. (Because some 
departments do actually have sensible reasons to manage things with that 
granularity.) We're not so big though.)


On Wed, Jan 11, 2017 at 07:59:02PM +, Zachary Vida wrote:
>Exponential? Really or just an expression, but rough estimate is probably
>about 5k
> 
>On Wed, Jan 11, 2017, 2:50 PM Trevor Vaughan <[1]tvaug...@onyxpoint.com>
>wrote:
> 
>  How many resources are in your catalog?
>  Puppet starts to hit exponential catalog sizes and run times as you
>  approach 10k resources.
>  Thanks,
>  Trevor
>  On Wed, Jan 11, 2017 at 12:58 PM, Zachary Vida <[2]vida.z...@gmail.com>
>  wrote:
> 
>Hello, I was wonder if there are any significant impovements in later
>version of puppet >= 2.6 to catolog compilation and/or application
>runtimes. 
>In an environment I manage we populate many local files
>(/etc/passwd,/etc/group,/etc/hosts) via ENC. This results in a steady
>state catalog compilation/apply run times of several minutes and
>during an inital puppet apply clocking in at 90 minutes. 
> 
>--
> 
>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 [3]puppet-users+unsubscr...@googlegroups.com.
> 
>To view this discussion on the web visit
>
> [4]https://groups.google.com/d/msgid/puppet-users/d7cc6062-722b-4f8a-9284-27ded5048c34%40googlegroups.com.
>For more options, visit [5]https://groups.google.com/d/optout.
> 
>  --
>  Trevor Vaughan
>  Vice President, Onyx Point, Inc
>  (410) 541-6699 x788
>  -- This account not approved for unencrypted proprietary information --
> 
>  --
>  You received this message because you are subscribed to a topic in the
>  Google Groups "Puppet Users" group.
>  To unsubscribe from this topic, visit
>  
> [6]https://groups.google.com/d/topic/puppet-users/fS1cHkjuWco/unsubscribe.
>  To unsubscribe from this group and all its topics, send an email to
>  [7]puppet-users+unsubscr...@googlegroups.com.
>  To view this discussion on the web visit
>  
> [8]https://groups.google.com/d/msgid/puppet-users/CANs%2BFoWo0EGkWKeLepqP%2BkOmbPN-hEa_cQV9Zq4C_H3caVuKSA%40mail.gmail.com.
>  For more options, visit [9]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 [10]puppet-users+unsubscr...@googlegroups.com.
>To view this discussion on the web visit
>
> [11]https://groups.google.com/d/msgid/puppet-users/CAC0dne-h3Fu%2BxDARb6yzW0OiN6mPwSqa4UR7qjh28oe_gjAP4A%40mail.gmail.com.
>For more options, visit [12]https://groups.google.com/d/optout.
> 
> References
> 
>Visible links
>1. mailto:tvaug...@onyxpoint.com
>2. mailto:vida.z...@gmail.com
>3. mailto:puppet-users+unsubscr...@googlegroups.com
>4. 
> https://groups.google.com/d/msgid/puppet-users/d7cc6062-722b-4f8a-9284-27ded5048c34%40googlegroups.com?utm_medium=email&utm_source=footer
>5. https://groups.google.com/d/optout
>6. https://groups.google.com/d/topic/puppet-users/fS1cHkjuWco/unsubscribe
>7. mailto:puppet-users+unsubscr...@googlegroups.com
>8. 
> https://groups.google.com/d/msgid/puppet-users/CANs%2BFoWo0EGkWKeLepqP%2BkOmbPN-hEa_cQV9Zq4C_H3caVuKSA%40mail.gmail.com?utm_medium=email&utm_source=footer
>9. https://groups.google.com/d/optout
>   10. mailto:puppet-users+unsubscr...@googlegroups.com
>   11. 
> https://groups.google.com/d/msgid/puppet-users/CAC0dne-h3Fu%2BxDARb6yzW0OiN6mPwSqa4UR7qjh28oe_gjAP4A%40mail.gmail.com?utm_medium=email&utm_source=footer
>   12. 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/20170111213322.GA3701%40iniquitous.heres

Re: [Puppet Users] Puppet managing thousands of resources

2017-01-11 Thread R.I.Pienaar


- Original Message -
> From: "Christopher Wood" 
> To: "puppet-users" 
> Sent: Wednesday, 11 January, 2017 22:33:22
> Subject: Re: [Puppet Users] Puppet managing thousands of resources

> Out of gruesome interest, 5000 resources of what?
> 
> Assuming I'm remembering the path correctly, something like this would count 
> it
> up, modify for your local case (assuming no puppetdb at your place) to search
> for resource types:
> 
> python -m json.tool /var/lib/puppet/client_data/catalog/`hostname -f`.json |
> grep '"type":' | sort | uniq -c | sort -rn | head

last_run_summary.yaml will show totals already also total time per resource 
type :)

> 
> What do you mean by populating local files via ENC? I'm drawing a blank. Or
> perhaps my mind is recoiling from the notion that you're sending contents of
> files in via top-level ENC variables.
> 
> (For reference catalog sizes around here go from 500-2000 resources with agent
> funs mostly from 15-90 seconds, 2-7 minutes in the initial run. (Because some
> departments do actually have sensible reasons to manage things with that
> granularity.) We're not so big though.)

-- 
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/1250936490.1005855.1484170800075.JavaMail.zimbra%40devco.net.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet managing thousands of resources

2017-01-11 Thread Ramin K

On 1/11/17 9:58 AM, Zachary Vida wrote:

Hello, I was wonder if there are any significant impovements in later
version of puppet >= 2.6 to catolog compilation and/or application
runtimes.

In an environment I manage we populate many local files
(/etc/passwd,/etc/group,/etc/hosts) via ENC. This results in a steady
state catalog compilation/apply run times of several minutes and during
an inital puppet apply clocking in at 90 minutes.


Depends on a number of factors. Without knowing more about the system 
this is general advice and numbers.


- Upgrade to Puppet 3.8.x. Should be a fairly simple update in most 
environments. Expect file serving and catalog compile to take 50% of the 
time with 3.8 masters as compared to 2.7 masters. I don't have numbers 
on 2.6 masters. You must have 2.7 agents to talk to 3.x masters.


- Upgrade the Puppet master to a distro running Ruby 1.9.3 or better. 
Expect catalog compiles to drop to 50% of the 1.8.7 run time with Ruby 
1.9.3 or 25% with 2.1. This can be a complex upgrade if you have 
templates that use str.each or wrote your own functions.


- Replace source => 'puppet:///modules/sudo/sudoers', with content => 
file('sudo/sudoers'), in as many places as possible. Note do not do this 
for binary files, there can be problems with utf8 data. The catalog will 
be larger over the wire, but a faster apply since you can eliminate 
additional https connections. However I expect you're doing a fair 
amount of source => 'puppet:///modules/thing/some_dir_full_of_files/' 
and file() can't help you there.


- Use Passenger, tune it appropriately. 
https://ask.puppet.com/question/13433/how-should-i-tune-passenger-to-run-puppet/


For the record, I can admit to having "tens of thousands of hosts" and 
over half of them have 4k+ file resources.


Ramin

--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/3b9e17a3-7bea-8752-4811-9d2d25f5c7ce%40badapple.net.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet managing thousands of resources

2017-01-11 Thread Christopher Wood
On Wed, Jan 11, 2017 at 09:40:00PM +, R.I.Pienaar wrote:
> 
> 
> - Original Message -
> > From: "Christopher Wood" 
> > To: "puppet-users" 
> > Sent: Wednesday, 11 January, 2017 22:33:22
> > Subject: Re: [Puppet Users] Puppet managing thousands of resources
> 
> > Out of gruesome interest, 5000 resources of what?
> > 
> > Assuming I'm remembering the path correctly, something like this would 
> > count it
> > up, modify for your local case (assuming no puppetdb at your place) to 
> > search
> > for resource types:
> > 
> > python -m json.tool /var/lib/puppet/client_data/catalog/`hostname -f`.json |
> > grep '"type":' | sort | uniq -c | sort -rn | head
> 
> last_run_summary.yaml will show totals already also total time per resource 
> type :)

That's fairly aggregate. Were this issue of lengthy agent run times presented 
to me I would start out being more interested in the resource types as they 
might appear in the manifests. I've had success reducing catalog compilation 
times by optimizing away from stacks of tiny resources (defines, classes, lists 
of stale ensure=>absent resources).

Here's a contrived example but based on something that happened here.

# super puppetdb querying of all catalogs here
200 File
160 Class
140 Package
70 Customsoftware::Includefile

If they're all files this specific method won't be a useful count but the 
notion of exploring just what's going on here is what I'm getting at.

> > What do you mean by populating local files via ENC? I'm drawing a blank. Or
> > perhaps my mind is recoiling from the notion that you're sending contents of
> > files in via top-level ENC variables.
> > 
> > (For reference catalog sizes around here go from 500-2000 resources with 
> > agent
> > funs mostly from 15-90 seconds, 2-7 minutes in the initial run. (Because 
> > some
> > departments do actually have sensible reasons to manage things with that
> > granularity.) We're not so big though.)
> 
> -- 
> 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/1250936490.1005855.1484170800075.JavaMail.zimbra%40devco.net.
> 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/20170111222135.GA4047%40iniquitous.heresiarch.ca.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Exec Windows command fails

2017-01-11 Thread Dimitri Yioulos
Hello, all.

I'm trying to create a manifest that will 1) create a file populated with 
wmic-generated data, and; 2) rename that file to include the server name. 
 Here's what I've written:


class win_diskinfo {
exec { 'create disk info file' :
command => 'c:\windows\system32\cmd.exe /C "wmic logicaldisk get 
name,volumename" > c:\temp\disks.txt',
 }
exec { 'rename disk info file' :
command => 'c:\windows\system32\cmd.exe /C ren c:\temp\disks.txt 
disks-%computername%.txt',
 }
}


The first exec runs fine, abd "disks.txt" is created.  However, the second 
exec fails, with the message that an exit code of 1 was returned, rather 
than 0.  If I run "c:\windows\system32\cmd.exe /C ren c:\temp\disks.txt 
disks-%computername%.txt" from Windows dos box, I get the expected results. 
 Can anyone help me fix this?

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/7a218e79-10d9-4516-a828-ca0966f0c2fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Puppet Community Roles and Profiles

2017-01-11 Thread Joe
Hello All,

Does Puppet Community support Roles and Profiles? The Puppet Community does 
section does not appear to have documentation on them, just looking for 
confirmation.

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/19d64f5f-e343-4d89-a8d9-b7abca0c1e5e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Puppet Community Roles and Profiles

2017-01-11 Thread Thomas Müller
Hey Joe

Roles and profiles isnt tied to puppet enterprise. Works great with 
non-enterprise edition.

Original blogpost about the concept: http://www.craigdunn.org/2012/05/239/

Thomas

-- 
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/df43b0e9-fcf1-4b2b-8792-fb8451402b62%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.