Re: [Puppet Users] Puppet is using high CPU usage!!!

2017-02-17 Thread Rilindo Foster
At 64 cores, the load average comes out to .4 per core. Somebody correct 
me, but that actually seems fairly low.


That said, if you want to pursue this further, I would suggest 
implementing something like this to give you a better idea of your 
Puppet Server health:


https://docs.puppet.com/pe/latest/puppet_server_metrics.html

 - Rilindo


On 02/16/2017 10:20 PM, Amrit Atmajit wrote:

Hi,

We are using high end setup for our Puppet and foreman in CentOS 
server: RAID5, 198GB RAM, 64 cores Processor.
But, after installation of Foreman-installer puppet is eating the CPU 
like anything. We can observe CPU usage% is spiking > 4000!
Is it because of RAID5 processor? Can anyone help on this to resolve 
this issue?


==
top - 23:18:09 up 21:17,  3 users,  load average: 29.86, 21.72, 22.12
Tasks: 705 total,   1 running, 704 sleeping,   0 stopped,   0 zombie
%Cpu(s): 63.2 us,  0.4 sy,  0.0 ni, 36.4 id,  0.0 wa,  0.0 hi,  0.0 
si,  0.0 st
KiB Mem : 19778108+total, 18979132+free,  5705996 used,  2283756 
buff/cache

KiB Swap:  4194300 total,  4194300 free,0 used. 19106275+avail Mem

  PID USER  PR  NIVIRTRESSHR S  %CPU %MEM TIME+ 
COMMAND

36570 puppet20   0 13.414g 2.652g  21912 S  4060  1.4 141:07.87 java
 3359 sandisk   20   0 1787316 185376  45404 S   1.0  0.1   5:22.40 
gnome-shell

35962 root  20   0  158272   2920   1568 R   0.7  0.0   0:06.39 top
28264 root  20   0   0  0  0 S   0.3  0.0   0:21.24 
kworker/21:0
30703 root  20   0   0  0  0 S   0.3  0.0   0:14.38 
kworker/26:1
32997 root  20   0   0  0  0 S   0.3  0.0   0:10.75 
kworker/30:1
33369 root  20   0   0  0  0 S   0.3  0.0   0:11.32 
kworker/53:2
33435 root  20   0   0  0  0 S   0.3  0.0   0:08.22 
kworker/23:2
34037 root  20   0   0  0  0 S   0.3  0.0   0:09.36 
kworker/35:0
34064 root  20   0   0  0  0 S   0.3  0.0   0:10.88 
kworker/62:0
34461 root  20   0   0  0  0 S   0.3  0.0   0:07.47 
kworker/56:2
34996 root  20   0   0  0  0 S   0.3  0.0   0:06.21 
kworker/40:1
35002 root  20   0   0  0  0 S   0.3  0.0   0:06.51 
kworker/51:1
35214 root  20   0   0  0  0 S   0.3  0.0   0:07.02 
kworker/57:1
35966 root  20   0   0  0  0 S   0.3  0.0   0:02.58 
kworker/29:1
36175 root  20   0   0  0  0 S   0.3  0.0   0:03.25 
kworker/49:0
36358 root  20   0   0  0  0 S   0.3  0.0   0:01.86 
kworker/39:2
36861 root  20   0   0  0  0 S   0.3  0.0   0:01.16 
kworker/54:2
36890 root  20   0   0  0  0 S   0.3  0.0   0:00.84 
kworker/15:1
36929 root  20   0   0  0  0 S   0.3  0.0   0:00.72 
kworker/2:2
36930 root  20   0   0  0  0 S   0.3  0.0   0:01.17 
kworker/59:1
36938 root  20   0   0  0  0 S   0.3  0.0   0:00.82 
kworker/46:2
37013 root  20   0   0  0  0 S   0.3  0.0   0:00.76 
kworker/41:0
37077 root  20   0   0  0  0 S   0.3  0.0   0:00.23 
kworker/47:0
1 root  20   0  198032  11220   3972 S   0.0  0.0   0:17.96 
systemd
2 root  20   0   0  0  0 S   0.0  0.0   0:00.94 
kthreadd
3 root  20   0   0  0  0 S   0.0  0.0   0:00.45 
ksoftirqd/0
5 root   0 -20   0  0  0 S   0.0  0.0   0:00.00 
kworker/0:0H
6 root  20   0   0  0  0 S   0.0  0.0   0:04.66 
kworker/u128:0
7 root  20   0   0  0  0 S   0.0  0.0   0:00.00 
kworker/u129:0
8 root  rt   0   0  0  0 S   0.0  0.0   0:00.45 
migration/0

===

Best Regards,
Amrit

--
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/d6d9bdf6-8f14-485e-995d-2f966c3639ca%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/6dcc4a13-3f07-3005-e71e-328c7de44997%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet erb template create loop

2017-02-17 Thread Rafael Tomelin
Hi dear,

Very thanks!

Em qui, 16 de fev de 2017 às 18:09, Henrik Lindberg <
henrik.lindb...@puppet.com> escreveu:

> On 13/02/17 18:05, Rafael Tomelin wrote:
> > Hi dear,
> >
> > I is create a module and need loop in puppet class and template
> >
> >
> > The my class step is:
> > 1) My class have array declared;
> > $pools = [
> > {
> >   name   => 'PoolDiario',
> >   poolType   => 'Backup',
> >   recycle=> 'yes',
> >   autoPrune  => 'yes',
> >   volumeRetention=> '30 days',
> >   maximumVolumeBytes => '1G',
> >   maximumVolumes => '100',
> >   labelFormat=> 'Local-'
> > }
> > ,
> > {
> >   name   => 'PoolDiario2',
> >   poolType   => 'Backup2',
> >   recycle=> 'yes',
> >   autoPrune  => 'yes',
> >   volumeRetention=> '20 days',
> >   maximumVolumeBytes => '5G',
> >   maximumVolumes => '10',
> >   labelFormat=> 'Local2'
> > }
> > ])
> >
> > 2) The array is create file;
> > example:
> >
> > count array$pools
> >
> >  $teste = $pools[COUNT]['name']
> >
> > #LOOP
> >   file { "/etc/bacula/pool/pool_$teste.conf":
> > ensure  => 'file',
> > owner   => 'bacula',
> > group   => 'bacula',
> > content => template('bacula/director/pool_conf.erb')
> >   }
> >
> >
> > 3) Template loop get array.
> > Pool {
> > <% pools.each do |pool| -%>
> >   Name = "<%= pool['name'] %>"
> >   Pool Type = "<%= pool['poolType'] %>"
> >   Recycle = <%= pool['recycle'] %>
> >   AutoPrune = <%= pool['autoPrune'] %>
> >   Volume Retention = "<%= pool['volumeRetention'] %>"
> >   Maximum Volume Bytes = "<%= pool['maximumVolumeBytes'] %>"
> >   Maximum Volumes = <%= pool['maximumVolumes'] %>
> >   Label Format = "<%= pool['labelFormat'] %>"
> >
> > <% end -%>
> > }
> >
> >
> > But this create Pool to array.
> >
> > I can make this module?
> >
>
> Puppet 4.x (and puppet 3.x with future parser) supports iteration with
> functions such as each, map, reduce (and many more). That should enable
> you to do what you want.
>
> - 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/b76ca740-d7f6-4dd6-8079-43bc72700c06%40googlegroups.com
> > <
> https://groups.google.com/d/msgid/puppet-users/b76ca740-d7f6-4dd6-8079-43bc72700c06%40googlegroups.com?utm_medium=email&utm_source=footer
> >.
> > 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/0554267c-29cc-5bda-a6b2-2df9f1c9dc82%40puppet.com
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Atenciosamente,
Rafael Tomelin
skype: rafael.tomelin
E-mail: rafael.tome...@gmail.com

RHCE - Red Hat Certified Engineer
Zabbix - ZABBIX Certified Specialist
LPI3
ITIL v3

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


Re: [Puppet Users] puppetdb 4.3 on PG 9.4 fresh install fails to start with DB UTF8 encoding error

2017-02-17 Thread Rob Browning
s...@la-z-boy.com writes:

> java.sql.BatchUpdateException: Batch entry 1 CREATE AGGREGATE md5_agg 
> (BYTEA)
> (
>   sfunc = dual_md5,
>   stype = bytea,
>   initcond = '\x00'
> ) was aborted.  Call getNextException to see the cause.
>
> 2017-02-16 14:19:54,571 ERROR [p.p.s.migrate] Unravelled exception
> org.postgresql.util.PSQLException: ERROR: invalid byte sequence for 
> encoding "UTF8": 0x00

Hmm, I don't yet have a good idea why you're having this trouble, but as
another bit of data, I just tested that function against postgres 9.4
via psql and it worked fine, then against 8.4, and I saw something very
similar:

  $ psql -U rlb puppetdb
  psql (8.4.21)
  Type "help" for help.

  puppetdb=# create aggregate md5_agg_foo (bytea) (sfunc = dual_md5, stype = 
bytea, initcond = '\x00');
  WARNING:  nonstandard use of escape in a string literal
  LINE 1: ...bytea) (sfunc = dual_md5, stype = bytea, initcond = '\x00');
 ^
  HINT:  Use the escape string syntax for escapes, e.g., E'\r\n'.
  ERROR:  invalid byte sequence for encoding "UTF8": 0x00
  HINT:  This error can also happen if the byte sequence does not match the 
encoding expected by the server, which is controlled by "client_encoding".

But I believe puppetdb should be checking your database version before
we even get to that point via:

  
https://github.com/puppetlabs/puppetdb/blob/master/src/puppetlabs/puppetdb/scf/storage.clj#L1371

And indeed, when I try to run puppetdb against 8.4, I see this:

  * PostgreSQL DB versions older than 9.4 are no longer supported.  Please 
upgrade Postgres and restart PuppetDB.
  * 
  
  2017-02-17 16:23:09,000 ERROR [async-dispatch-2] [p.p.s.storage] 

  *
  * PostgreSQL DB versions older than 9.4 are no longer supported.  Please 
upgrade Postgres and restart PuppetDB.
  * 
  
  2017-02-17 16:23:09,007 INFO  [Thread-2] [p.t.internal] Shutting down due to 
JVM shutdown hook.
  2017-02-17 16:23:09,011 INFO  [Thread-2] [p.t.internal] Beginning shutdown 
sequence

So it does seem a bit unlikely that puppetdb is talking to a postgres
that's "too old".  Out of curiosity, does everything look reasonable
when you run

  ps aux | grep postgres

And if you take the PID for the main postgres process, something like:

  rlb  19180  1.3  0.5 2305952 82340 pts/5   S+   16:38   0:00 postgres -h 
localhost -D data

Then do you see the dir you expect for:

  ls -l /proc/19180/cwd

?

Thanks
--
Rob Browning

-- 
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/87poigmod9.fsf%40yaga.corp.puppetlabs.net.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: noob problem: Could not find a directory environment named 'development'

2017-02-17 Thread Eric Sorenson
Hi Peter, this is a known problem that is tracked 
in https://tickets.puppetlabs.com/browse/PUP-6739

--eric0

On Friday, February 17, 2017 at 11:53:50 AM UTC-8, Peter K wrote:
>
> I fixed my site.pp and that got my hiera lookups working...but I still 
> dont' understand the puppet config results.
> -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/cc142983-8f66-495c-b1f4-0f0eee00cc10%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: noob problem: Could not find a directory environment named 'development'

2017-02-17 Thread Peter K
I fixed my site.pp and that got my hiera lookups working...but I still 
dont' understand the puppet config results.
-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/e23e0bb3-884f-4ccd-9592-f8bee59dc35b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: noob problem: Could not find a directory environment named 'development'

2017-02-17 Thread Peter K
I fixed my site.pp and that got my hiera lookups working...but I still 
dont' understand the puppet config results.
-peter

On Thursday, February 16, 2017 at 7:31:57 PM UTC-5, Peter K wrote:
>
> Hi all, I'm hoping you can point out some detail I'm missing. Puppet agent 
> seems to run fine until I introduce hiera.  I believe the issue is 
> configuration path related:
>
> I'm using opensource pupperserver version 2.7.2 on an ubuntu 16.04 machine 
> and puppet agent version 4.9.2  on a centos 7 client machine.
> On the centos client, this is the result of:
> $ sudo /opt/puppetlabs/bin/*puppet config print* 
>
> /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/environments.rb:38:in 
> `get!': *Could not find a directory environment named 'development' 
> anywhere in the path: /etc/puppetlabs/code/environments. Does the directory 
> exist? *(Puppet::Environments::EnvironmentNotFound)
> from 
> /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application_support.rb:29:in
>  
> `push_application_context'
> from 
> /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:337:in 
> `run'
> from 
> /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:132:in
>  
> `run'
> from 
> /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:72:in 
> `execute'
> from /opt/puppetlabs/bin/puppet:5:in `'
>
>
> Here is my  /etc/puppetlabs/puppet/*puppet.conf* on the client:
>
> [main]
> certname = centosclient.pretenddomain.com
> server = puppet
> environment = development
> runinterval = 1h
> environment_timeout = 0
>
>
> But here's what I get on the client if I run (which works as expected): 
> $ sudo /opt/puppetlabs/bin/*puppet agent -t*
>
> Info: Using configured environment 'development'
> Info: Retrieving pluginfacts
> Info: Retrieving plugin
> Info: Loading facts
> Info: Caching catalog for centosclient.pretenddomain.com
> Info: Applying configuration version '1487270914'
> Notice: You're in development
> Notice: 
> /Stage[main]/Main/Node[default]/Notify[Using_Development_Environment]/message:
>  
> defined 'message' as 'You're in development'
> Notice: Applied catalog in 0.31 seconds
>
>
> Here are the only lines uncommented in 
> /etc/puppetlabs/code/environments/development/*environment.conf *(This is 
> on the ubuntu puppet server)
>
> modulepath = 
> /etc/puppetlabs/code/environments/development/modules:/etc/puppetlabs/code/modules:/opt/puppetlabs/puppet/modules
> manifest = ./manifests
>
> thx, 
> -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/a450041b-5ed0-437e-820f-f292ab772ef5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Puppet DB prune / vacuum

2017-02-17 Thread Anfield
Thanks for the detailed response!

-- 
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/6c142eca-0848-4e95-9710-8ed954f8ef25%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: hiera deep hash merges broken

2017-02-17 Thread Henrik Lindberg

On 16/02/17 15:37, Francois Lafont wrote:

Hi,

On 02/16/2017 09:03 PM, Henrik Lindberg wrote:


We are adding support for eyaml in hiera 5 which means you will get explain 
support and that you can use eyaml when also using the new format. We now also 
test with eyaml.


By the way, and just for information ;), here an issue I have currently with 
eyaml
and Puppet 4 (_but_ I don't use hiera 5 yet):

https://github.com/TomPoulton/hiera-eyaml/issues/186

But I absolutely don't know if this issue is a Puppet side problem or a eyaml
side problem. If it's a Puppet side problem, it would be great to fix it with
hiera 5 \o/.


As I understand it, hiera 5 implementation is a reimplementation of the 
topmost layer in eyaml and it should be resposible for handling merges 
etc. The new functionality is available from Puppet 4.9.3 where you will 
also get explain support for eyaml.



If it's a eyaml side problem, unfortunately eyaml no longer seems
to be really maintained.



There are talks about Vox Pupuli taking over stewardship of eyaml.

Best,
- henrik


François Lafont




--

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/o87h69%249gs%241%40blaine.gmane.org.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Newbie Question About Puppet

2017-02-17 Thread Rich Burroughs
PuppetDB is great :) You can use Puppet without it, but it gives you a lot
of insight into what's happening with puppet and your environment.

https://docs.puppet.com/puppetdb/4.3/

There's actually a Puppet module that you can use to set up PuppetDB:

https://forge.puppet.com/puppetlabs/puppetdb


Rich



On Fri, Feb 17, 2017 at 4:54 AM, Net Warrior 
wrote:

> Hi,
> Thank you very much for your response, what about puppet db? is that
> really needed? can I live without it? still I do not now the real benefits
> of using
> PostgreSQL.
>
> Regards
>
> On 02/17/2017 07:48 AM, Dominic Cleal wrote:
>
>> On 16/02/17 20:51, Net Warrior wrote:
>>
>>> I'm reading some docs and it seems the lates version is 4.8, the reading
>>> about the installation it talks about Puppet server install which is
>>> version 2.6 and puppet db is 4.2, so this at first confused me, because
>>> I do not know to which package 4.8 is related to, is that a whole
>>> version number? to the whole puppet suite?
>>>
>> To use Puppet Server there are two packages you will install:
>>
>> 1. puppet-agent
>> 2. puppet-server
>>
>> puppet-agent contains Puppet itself and its dependencies. The latest
>> agent version is 1.9.1, which contains Puppet 4.9.2. There is a list of
>> known versions on this page:
>> https://docs.puppet.com/puppet/latest/about_agent.html
>>
>> puppet-server adds the server components to puppet-agent. The server
>> uses Puppet from puppet-agent. The latest server version is 2.7.2, and
>> see https://docs.puppet.com/puppetserver/latest/release_notes.html for
>> the latest release notes.
>>
>> Install puppet-agent 1.9.1 and puppet-server 2.7.2 (at the time of
>> writing) and you'll have the latest Puppet 4.9.
>>
>>
> --
> 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/ms
> gid/puppet-users/58A6F29E.6080703%40gmail.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/CAGceorxWtjCaUUGgL8wK%3DeXtzwV5D5mBS3mYzYweKMws3_TXxQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: puppetdb 4.3 on PG 9.4 fresh install fails to start with DB UTF8 encoding error

2017-02-17 Thread swk
Hi Wyatt,

The environment is Oracle Linux 7.3.  Postgres 9.4 was installed from the 
PGDG repositories then tuned for memory usage.  I've pasted the content of 
the psql command to pastebin so it's easier to read: 
 http://pastebin.com/uveSYRWN.  

PuppetDB version:
puppetdb-4.3.0-1.el7.noarch
puppetdb-termini-4.3.0-1.el7.noarch
puppetdb-terminus-3-1.el7.noarch

Puppet server version:
puppetserver-2.7.2-1.el7.noarch



Thanks for your help.


On Friday, February 17, 2017 at 12:26:53 PM UTC-5, Wyatt Alt wrote:
>
> Hi,
>
> This seems like a bug to me, but I can't reproduce it on postgres 9.4 + 
> centos 7.3 and the combination of PDB 4.3 and postgres 9.4 is widely 
> used/tested.
>
> Can you give a bit more detail about your environment? I'd like to know 
> your OS and version and the method you used to install postgres. It would 
> also be good to see the output of
>
> '\l+'
>
> executed in psql, which will give you a table like this:
> https://gist.github.com/wkalt/bbffafe68ec4018f7bcbc5b62961dc24 
> 
>
> Thanks,
> 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/398b0a23-adeb-4557-9d5b-e1f74f99ccb7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: The right way to create Hiera resources?

2017-02-17 Thread martin . tomov
Hi Ramin, just wanted to thank you for positing the presentation and the 
notes - read through them both, and all about organizing puppet code became 
much clearer! Thanks a lot again!

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/86c11259-a5f3-493d-8a7a-02179c0747d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Puppet DB prune / vacuum

2017-02-17 Thread Wyatt Alt
Hey Anfield,

prune_upto was retired before 2016.2, along with the console database 
itself (the data is in PuppetDB now). The way to control report deletion is 
via the node_ttl, node_purge_ttl, and report_ttl PuppetDB configuration 
settings, which are documented here:
https://docs.puppet.com/puppetdb/latest/configure.html#node-ttl

The vacuum operations on the page you linked may be necessary if you start 
to run into performance issues resulting from database bloat, but they'll 
only clear dead tuples in the database; they won't delete data. My guess is 
you'll be fine with just the config settings, but you can read more about 
vacuum here if needed:

https://www.postgresql.org/docs/9.4/static/sql-vacuum.html

Wyatt


On Thursday, February 16, 2017 at 1:41:11 PM UTC-8, Anfield wrote:
>
> For cleaning up report data is the parameter prune_upto still valid? - 
> related to version 2016.2
>
> Or has the vacuum parameter replaced it? Do they both essentially do the 
> same thing?
>
> https://docs.puppet.com/pe/2016.2/maintain_console-db.html
>
> 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/494fb6ec-6cc5-44ba-a0df-3e07f28fb17b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: puppetdb 4.3 on PG 9.4 fresh install fails to start with DB UTF8 encoding error

2017-02-17 Thread Wyatt Alt
Hi,

This seems like a bug to me, but I can't reproduce it on postgres 9.4 + 
centos 7.3 and the combination of PDB 4.3 and postgres 9.4 is widely 
used/tested.

Can you give a bit more detail about your environment? I'd like to know 
your OS and version and the method you used to install postgres. It would 
also be good to see the output of

'\l+'

executed in psql, which will give you a table like this:
https://gist.github.com/wkalt/bbffafe68ec4018f7bcbc5b62961dc24

Thanks,
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/f4cf6ce7-c8fb-41ce-af40-acb4384993d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppet agent -t throwing error

2017-02-17 Thread Toni Schmidbauer
Abhay Kumar  writes:
> Error: Could not retrieve catalog from remote server: Error 400 on
> SERVER: Could not find default node or by name with
> 'puppet-client.com, puppet-client' on node puppet-client.com

seems like there's no node definition for puppet-client.com and the
default node definition is also missing.

please see

https://docs.puppet.com/puppet/4.9/lang_node_definitions.html

for more info on node definitions.

remember: if you have one node definition in you manifests, you need to
define all other nodes as well. otherwise catalog compilation will
fail. use the default node def to catch nodes that are currently
undefined.

toni

-- 
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/87lgt4g2xr.fsf%40stderr.at.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] puppet agent -t throwing error

2017-02-17 Thread Abhay Kumar
Hi everyone,

I am trying to run "puppet agent -t" on an agent and it is throwing 
following error

*root@puppet-client:/etc/puppet/manifests# sudo puppet agent -t*

*Info: Retrieving pluginfacts*

*Info: Retrieving plugin*

*Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Could not find default node or by name with 'puppet-client.com, 
puppet-client' on node puppet-client.com*

*Warning: Not using cache on failed catalog*


*Error: Could not retrieve catalog; skipping run*
Please note that puppet-client.com (dns entry in /etc/hosts : 127.0.0.1 
puppet-client.com) is the agent that I am using.

Can someone please 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/4b2b7069-573e-41d3-a8cb-95356a270f72%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] console parameter value with dollar becomes interpolation

2017-02-17 Thread João Matos
Hi all

we're trying to assign a value to a parameter with a dollar and that is a 
problem.
adding a backslash only makes the string become backslashed which is not 
what we want. Different types of quoting did seem to work either..
I'm sure a lot of people add this issue but i couldnt find an answer on 
search engines or this group.

Any solution or simply not allowed?

tks!

-- 
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/f5ba3a39-3885-46e7-a923-93069d275ce9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Creating Users and Hashing it's password.

2017-02-17 Thread Vinay Korapati
password => sha1('your password')




On Thursday, June 9, 2011 at 12:38:36 AM UTC+5:30, vella1tj wrote:
>
> Hi everyone I would like to first of all say thanks to anyone willing 
> to help me. 
>
> I was tasked with creating a Admin account using puppet to push to all 
> of our Macs that we have deployed around the Campus. 
>
> user {'sysop': 
>   #uid   => 500, 
>  #groups  => 'admin', 
> comment=> 'Sysop', 
> ensure=> present, 
> home  => '/home/sysop', 
> shell   => '/bin/bash', 
> managehome  => true, 
> password=> 'Haven't figured out the best way to 
> hash 
> a password and put it in here., 
> } 
>
> That's what I have so far, I don't believe I understand how Hash works 
> completely. The way I understand it is it will have a hash in the 
> password field and it will compare it to other hashes to match what 
> the password would be. So what I was hoping to get help on (or 
> anything i've done wrong or you would recommend me doing different) is 
> how do i set a resource for the hash do i put it in my files directory 
> and then point it to there is there anything special I have to do 
> so puppet understands that it's hash.

-- 
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/7c04c981-9fdb-42a8-9114-60f47897e762%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: hiera error in agent run after reboot

2017-02-17 Thread Lindsey Smith


On Monday, February 13, 2017 at 7:47:23 AM UTC-8, Michael Zoet wrote:
>
> Hello Puppet Users, 
>
> I have a strange problem after I restarted my Puppet master (and   
> several other nodes). When I do a puppet agent run now I get the   
> following output: 
>
> === 
> puppet agent -t 
> Info: Using configured environment 'production' 
> Info: Retrieving pluginfacts 
> Info: Retrieving plugin 
> Info: Loading facts 
> Error: Could not retrieve catalog from remote server: Error 500 on   
> SERVER: Server Error: Evaluation Error: Error while evaluating a   
> Resource Statement, Lookup of key 'lookup_options' failed: The Lookup   
> Configuration at '/etc/puppetlabs/code/hiera.yaml' has wrong type,   
> unrecognized key 'http' at   
> /etc/puppetlabs/code/environments/production/roles/role_base/manifests/init.pp:5:5
>  
> on node   
> host-1.node.ekimp.local 
> Warning: Not using cache on failed catalog 
> Error: Could not retrieve catalog; skipping run 
>
> The contents of /etc/puppetlabs/code/hiera.yaml 
> === 
> --- 
> :backends: 
>- yaml 
>- etcd 
>
> :logger: console 
>
> :hierarchy: 
>- nodes/%{trusted.certname} 
>- projects/%{node_project} 
>- roles/%{node_role}/%{node_instance} 
>- roles/%{node_role} 
>- location/%{node_location}/%{node_location_no} 
>- location/%{node_location} 
>- server_type/%{node_server_type} 
>- os/%{operatingsystem}/%{lsbdistcodename} 
>- users 
>- common 
>- passwords 
>
> :yaml: 
>:datadir: '/etc/puppetlabs/code/environments/%{environment}/data' 
>
> :http: 
>:host: 192.168.122.1 
>:port: 4001 
>:paths: 
>  - /data/nodes/%{trusted.certname} 
>  - /data 
> === 
>
> The :http: config is for connecting to etcd via this Puppet module   
> https://forge.puppet.com/garethr/hiera_etcd. 
>
> For me it seems that this module is not loaded anymore. What bothers   
> me is that there were no configuration changes, only the reboot.   
> Before the reboot everything worked fine. After that the logs are full   
> with the error message from above. 
> I am completely at a loss here what might be wrong. Has someone any   
> ideas? Or hints? Or links to documentation? Or recommendations how to   
> use etcd (https://github.com/coreos/etcd) with hiera? (I did not set   
> this up I am only maintaining it.) 
>

We believe that this issue was fixed in the recently released Puppet 4.9.2. 
See https://docs.puppet.com/puppet/4.9/release_notes.html#bug-fixes 
and https://tickets.puppetlabs.com/browse/PUP-7164

Lindsey
 

>
> Technical details: 
> - all servers run Debian Jessie 
> - packages are from the Puppetlabs Debian repository 
> http://apt.puppetlabs.com 
> - Puppetserver version 2.7.2-1puppetlabs1 
> - Puppet agent version 1.9.1-1jessie on all nodes 
>
> Content of   
> /etc/puppetlabs/code/environments/production/roles/role_base/manifests/init.pp
>  
>   
> (Nothing fancy, it is the base class that every node gets applied.) 
> === 
> # base class for everyone 
> class role_base { 
>class pre { 
>  # ensure_resource('class', 'profile_base::apt', {}) 
>  class { 'profile_base': } 
>} 
>class { 'role_base::pre': stage => 'pre_setup' } 
>
>class { 'profile_base::apt': } 
>class { 'profile_base::locales': } 
>class { 'profile_base::network': } 
>class { 'profile_etcd': } 
>class { 'profile_base::user': } 
>class { 'profile_base::sudo': } 
>class { 'profile_base::puppet': } 
>class { 'profile_base::backup': } 
>class { 'profile_base::env': } 
>class { 'profile_base::ssh': } 
>class { 'profile_base::host': } 
>class { 'profile_icinga': } 
>
>if $virtual == 'physical' { 
>  class { 'profile_base::ntp': } 
>} 
> } 
> === 
>
> THX in advance, 
> Michael 
>
>

-- 
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/d6388584-cb83-4bac-9c53-b1aadf303fe1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Newbie Question About Puppet

2017-02-17 Thread Net Warrior

Hi,
Thank you very much for your response, what about puppet db? is that 
really needed? can I live without it? still I do not now the real 
benefits of using

PostgreSQL.

Regards

On 02/17/2017 07:48 AM, Dominic Cleal wrote:

On 16/02/17 20:51, Net Warrior wrote:

I'm reading some docs and it seems the lates version is 4.8, the reading
about the installation it talks about Puppet server install which is
version 2.6 and puppet db is 4.2, so this at first confused me, because
I do not know to which package 4.8 is related to, is that a whole
version number? to the whole puppet suite?

To use Puppet Server there are two packages you will install:

1. puppet-agent
2. puppet-server

puppet-agent contains Puppet itself and its dependencies. The latest
agent version is 1.9.1, which contains Puppet 4.9.2. There is a list of
known versions on this page:
https://docs.puppet.com/puppet/latest/about_agent.html

puppet-server adds the server components to puppet-agent. The server
uses Puppet from puppet-agent. The latest server version is 2.7.2, and
see https://docs.puppet.com/puppetserver/latest/release_notes.html for
the latest release notes.

Install puppet-agent 1.9.1 and puppet-server 2.7.2 (at the time of
writing) and you'll have the latest Puppet 4.9.



--
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/58A6F29E.6080703%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Newbie Question About Puppet

2017-02-17 Thread Dominic Cleal
On 16/02/17 20:51, Net Warrior wrote:
> I'm reading some docs and it seems the lates version is 4.8, the reading 
> about the installation it talks about Puppet server install which is 
> version 2.6 and puppet db is 4.2, so this at first confused me, because 
> I do not know to which package 4.8 is related to, is that a whole 
> version number? to the whole puppet suite?

To use Puppet Server there are two packages you will install:

1. puppet-agent
2. puppet-server

puppet-agent contains Puppet itself and its dependencies. The latest
agent version is 1.9.1, which contains Puppet 4.9.2. There is a list of
known versions on this page:
https://docs.puppet.com/puppet/latest/about_agent.html

puppet-server adds the server components to puppet-agent. The server
uses Puppet from puppet-agent. The latest server version is 2.7.2, and
see https://docs.puppet.com/puppetserver/latest/release_notes.html for
the latest release notes.

Install puppet-agent 1.9.1 and puppet-server 2.7.2 (at the time of
writing) and you'll have the latest Puppet 4.9.

-- 
Dominic Cleal
domi...@cleal.org

-- 
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/8cc964dc-7863-35b4-4f60-37cf8becfda0%40cleal.org.
For more options, visit https://groups.google.com/d/optout.