[Puppet Users] puppetlabs-lvm & inconsistency of pv devices

2024-05-08 Thread Mike Langhorst
As we're migrating from RHEL 7 over to RHEL 9,  RedHat is stating that pv 
device order should not be expected to be consistent.

So how are users specifying to create the pv on RedHat systems now?  Really 
don't want to try and deal with UUID's, and would rather not have admins 
create the PV & volume group manually either.

-- 
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/0925bbfe-8c99-4178-8cc6-ee8d067d166en%40googlegroups.com.


Re: [Puppet Users] Problem with exported ressource file.

2024-04-09 Thread Mike Langhorst
So, assuming that you were to export this resource on 2 different hosts.  
How could you collect it <<| |>>, as there could only be one 
/etc/something.conf on that collecting host.  That's why the exported 
resource path needs to be unique, can't just name it something unique if 
the resulting file would be in conflict.

On Monday, April 8, 2024 at 4:41:47 AM UTC-7 Albert Shih wrote:

> Le 08/04/2024 à 11:01:27+, 'Dirk Heinrichs' via Puppet Users a écrit
> Hi
>
> > 
> > > $group_hosts.each | String $host | {
> > >   @@file { "file for ${host}":
> > > ensure => present,
> > > name   => "file for ${host}",
> > > path   => '/etc/something.conf',
> > > tag=> "File for ${host}",
> > > etc.
> > > }
> > > }
> > 
> > You create multiple resources here (one for each host), which ALL try
> > to manage the SAME file ("/etc/something.conf"). But one file can only
> > be managed by one resource. That needs to be something like
>
> Yes...I know that but I'm also using “@@” who export the file to «others
> host». So even I can understand why it's not working I think that would be
> nice if it does. 
>
> Be re-reading the doc of file ressource I understand that 
>
> $namevar = $path
>
> but IMHO it should be
>
> if $name is underf
> $namevar = $path
> else
> $namevar = $name
>
> I find another solution but it need a little more configuration from the
> user of the module. 
>
> > 
> > HTH...
>
> Thanks. 
>
> Regards. 
>
> -- 
> Albert SHIH 嶺 
> France
> Heure locale/Local time:
> lun. 08 avril 2024 13:36:58 CEST
>

-- 
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/ae5e5ac0-d13b-41a1-aca6-3fa489415bb0n%40googlegroups.com.


[Puppet Users] Re: Custom Fact Deployment

2023-08-03 Thread Mike Langhorst
My experiences are with Puppet enterprise, but most of this should port 
directly over to your needs.

Early on, I created a module of my own $org_custom_facts, so that I could 
keep all of them together, when they weren't part of some other specific 
module.

If you want to write a shell script, like you say you already have, it will 
need to output the fact back to stdout as a key=value format such as 
location=Dallas.  Put this in your module in a subdirectory of facts.d.

Then just add this module to the environment, with Puppet Enterprise this 
would be in the Puppetfile thru control repo.  You don't need to include 
this module to any hosts or host classes, just having it within the 
environment would make this fact available to use.

Mike


On Thursday, August 3, 2023 at 12:32:06 AM UTC-7 acia...@icloud.com wrote:

> Hello All,
>
> maybe it's already has been discussed, I tried to search but I didn't find 
> the right thread.
> I'm not expert in Puppet and made simple scripts.
>
> I'm using RHEL Satellite with Puppet 7 ENC (I know that RHEL want to move 
> out from puppet, but until i can integrate it I will use it, after I will 
> see).
>
> I need to crate a custom fact to see some information based on IP Address.
> I created a Bash Script that give me an output of the location based on 
> CIDR, but I want use full automation and begin to launch specific class 
> based on fact.
>
> I don't know where I need to start, i read how create a fact but it still 
> confusing because I can't find the directory where put the script or how 
> deploy in all my clients.
>
> Someone can help me, maybe with step by step to understand it.
>
> Thank you in advance who want to help me.
> All the best
> Alex
>

-- 
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/e6ee05fd-bffa-45bb-af44-4380bb882e6an%40googlegroups.com.


Re: [Puppet Users] failed to set mode 0777

2022-12-09 Thread Mike
Hi Dirk,

The application was installed into the home drive of a standard ubuntu 
setup.  I'll have to see what has gone wrong in this situation.  Any 
suggestions of an installation guide I could follow that would allow me to 
setup puppet to operate with a cisco network?

Thanks

Mike

On Friday, 25 November 2022 at 06:34:18 UTC dhei...@opentext.com wrote:

> Am Donnerstag, dem 24.11.2022 um 09:05 -0800 schrieb Mike:
>
> /home/mypcsupport/.puppetlabs/etc/puppet/ssl: Operation not permitted 
>
>
> This is not a Puppet problem. Any chance you're trying to operate on a 
> network filesystem, or one that is mounted read-only?
>
> I.o.w.: You need to fix that "Operation not permitted" error in your 
> environment. It usually means that the underlying filesystem doesn't allow 
> what you're trying to do.
>
> HTH...
>
> Dirk
>
> -- 
>
> *Dirk Heinrichs*
> Senior Systems Engineer, Delivery Pipeline
> OpenText ™ Discovery | Recommind
> *Phone*: +49 2226 15966 18 <+49%202226%201596618>
> *Email*: dhei...@opentext.com
> *Website*: www.recommind.de
> Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
> Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan, 
> Christian Waida, 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.
>

-- 
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/df0fc708-d6d1-4ed5-9099-a1bf57fa1084n%40googlegroups.com.


[Puppet Users] failed to set mode 0777

2022-11-24 Thread Mike
Hi,

Any ideas on this?  Maybe I should attempt to re-install this again.  Is 
there any documented installation process for puppet on ubuntu?  I've tried 
various ways and always end up with different issues.

Thanks

Mike


:/etc$ puppet device --verbose --target cisco.device.puppetlabs.net

Error: failed to set mode 0777 on 
/home/mypcsupport/.puppetlabs/etc/puppet/ssl: Operation not permitted @ 
apply2files - /home/mypcsupport/.puppetlabs/etc/puppet/ssl
Error: /File[/home/mypcsupport/.puppetlabs/etc/puppet/ssl]/mode: change 
from '0777' to '0771' failed: failed to set mode 0777 on 
/home/mypcsupport/.puppetlabs/etc/puppet/ssl: Operation not permitted @ 
apply2files - /home/mypcsupport/.puppetlabs/etc/puppet/ssl
Notice: /File[/home/mypcsupport/.puppetlabs/etc/puppet/ssl/certs]: 
Dependency File[/home/mypcsupport/.puppetlabs/etc/puppet/ssl] has failures: 
true
Warning: /File[/home/mypcsupport/.puppetlabs/etc/puppet/ssl/certs]: 
Skipping because of failed dependencies
Warning: /File[/home/mypcsupport/.puppetlabs/etc/puppet/ssl/public_keys]: 
Skipping because of failed dependencies
Warning: 
/File[/home/mypcsupport/.puppetlabs/etc/puppet/ssl/certificate_requests]: 
Skipping because of failed dependencies
Warning: /File[/home/mypcsupport/.puppetlabs/etc/puppet/ssl/private_keys]: 
Skipping because of failed dependencies
Warning: /File[/home/mypcsupport/.puppetlabs/etc/puppet/ssl/private]: 
Skipping because of failed dependencies
Warning: 
/File[/home/mypcsupport/.puppetlabs/etc/puppet/ssl/certs/puppetserver.example.com.pem]:
 
Skipping because of failed dependencies
Warning: 
/File[/home/mypcsupport/.puppetlabs/etc/puppet/ssl/private_keys/puppetserver.example.com.pem]:
 
Skipping because of failed dependencies
Warning: 
/File[/home/mypcsupport/.puppetlabs/etc/puppet/ssl/public_keys/puppetserver.example.com.pem]:
 
Skipping because of failed dependencies
Warning: /File[/home/mypcsupport/.puppetlabs/etc/puppet/ssl/certs/ca.pem]: 
Skipping because of failed dependencies
Warning: /File[/home/mypcsupport/.puppetlabs/etc/puppet/ssl/crl.pem]: 
Skipping because of failed dependencies
Error: Could not set 'directory' on ensure: Permission denied @ dir_s_mkdir 
- /home/mypcsupport/.puppetlabs/etc/puppet/devices
Error: Could not set 'directory' on ensure: Permission denied @ dir_s_mkdir 
- /home/mypcsupport/.puppetlabs/etc/puppet/devices
Wrapped exception:
Permission denied @ dir_s_mkdir - 
/home/mypcsupport/.puppetlabs/etc/puppet/devices
Error: /File[/home/mypcsupport/.puppetlabs/etc/puppet/devices]/ensure: 
change from 'absent' to 'directory' failed: Could not set 'directory' on 
ensure: Permission denied @ dir_s_mkdir - 
/home/mypcsupport/.puppetlabs/etc/puppet/devices
Error: Could not prepare for execution: Got 2 failure(s) while 
initializing: File[/home/mypcsupport/.puppetlabs/etc/puppet/ssl]: change 
from '0777' to '0771' failed: failed to set mode 0777 on 
/home/mypcsupport/.puppetlabs/etc/puppet/ssl: Operation not permitted @ 
apply2files - /home/mypcsupport/.puppetlabs/etc/puppet/ssl; 
File[/home/mypcsupport/.puppetlabs/etc/puppet/devices]: change from 
'absent' to 'directory' failed: Could not set 'directory' on ensure: 
Permission denied @ dir_s_mkdir - 
/home/mypcsupport/.puppetlabs/etc/puppet/devices

-- 
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/183e218a-d911-47da-9ec3-bff7517bdfbfn%40googlegroups.com.


Re: [Puppet Users] Error: Could not run: cannot load such file -- net/ssh/telnet

2022-11-24 Thread Mike
Thanks Martin.  I have run into different issues unfortunately and I appear 
to be miles away from this point now.  I'll start a new conversation.

On Thursday, 17 November 2022 at 15:16:35 UTC Martin Alfke wrote:

> Hi,
>
> Your puppet agent is missing a ruby gem:
> https://rubygems.org/gems/net-ssh-telnet
>
> This gem must be installed using the puppet ruby gem command:
>
> /opt/puppetlabs/puppet/bin/gem install net-ssh-telnet
>
> Hth,
> Martin
>
>
> On 15. Nov 2022, at 10:53, Mike  wrote:
>
> Hi,
>
> I've come across the in subject error when trying to run puppet against a 
> cisco device.  I've exhausted my knowledge to troubleshoot this issue.  Any 
> pointers or place to check would be appreciated.  Thanks
>
>
> $ puppet device --verbose --target cisco_device.puppetlabs.net
>
> Info: Retrieving pluginfacts
> Info: Retrieving plugin
> Info: Retrieving locales
> Error: Could not run: cannot load such file -- net/ssh/telnet
>  
>
> $ Contents of device.conf
>
> [cisco_device.puppetlabs.net]
> type cisco_ios
> url file:///etc/puppetlabs/puppet/cisco_device.puppetlabs.net.yaml
>
>
> $ Contents of cisco_device.puppetlabs.net.yaml
>
> "address": "192.168.192.119"
> "port": 22
> "username": "cisco"
> "password": "cisco"
> "enable_password": ""
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/5d0f88f6-cbfa-4193-b692-ab18a8e8673en%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/puppet-users/5d0f88f6-cbfa-4193-b692-ab18a8e8673en%40googlegroups.com?utm_medium=email_source=footer>
> .
>
>
>

-- 
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/663820e0-574f-4643-9326-052ee9471108n%40googlegroups.com.


[Puppet Users] Error: Could not run: cannot load such file -- net/ssh/telnet

2022-11-16 Thread Mike
Hi,

I've come across the in subject error when trying to run puppet against a 
cisco device.  I've exhausted my knowledge to troubleshoot this issue.  Any 
pointers or place to check would be appreciated.  Thanks


$ puppet device --verbose --target cisco_device.puppetlabs.net

Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Error: Could not run: cannot load such file -- net/ssh/telnet
 

$ Contents of device.conf

[cisco_device.puppetlabs.net]
type cisco_ios
url file:///etc/puppetlabs/puppet/cisco_device.puppetlabs.net.yaml


$ Contents of cisco_device.puppetlabs.net.yaml

"address": "192.168.192.119"
"port": 22
"username": "cisco"
"password": "cisco"
"enable_password": ""

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/5d0f88f6-cbfa-4193-b692-ab18a8e8673en%40googlegroups.com.


[Puppet Users] Could not run: cannot load such file -- net/ssh/telnet

2022-11-16 Thread Mike
Hi,

Can anyone help with this error?

$ puppet device --verbose --target cisco_device.puppetlabs.net
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Error: Could not run: cannot load such file -- net/ssh/telnet

Thanks

Mike

-- 
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/f87aec14-a9b8-4c0c-adba-25206c76f7cdn%40googlegroups.com.


[Puppet Users] Re: Puppetserver 6.0.2 timeouts in the puppetserver log and on the agent side

2019-02-18 Thread Mike Sharpton
Hey all,

Final reply.  Thanks to all that tossed me a few bones.  The issue is 
directly related to the new JDK (new to us).  After giving more CodeCache 
we are now performing very well and have not blown up since.  The potential 
JVM args are required in a prod environment with any kind of load.  Until 
next time,

Mike

On Friday, February 15, 2019 at 10:06:38 AM UTC-6, Mike Sharpton wrote:
>
> Hey all,
>
> Update to this thread in case others have a similar issue.  It IS the 
> setting below it appears.  This is listed as a "Potential" tuning setting.  
> It is basically required for any real workload.  I saw this after pulling 
> out some of last hairs I have left on my head (in messages, which I was not 
> even focused on, Doh!).
>
> Feb 15 08:38:33  puppetserver: OpenJDK 64-Bit Server VM warning: CodeCache 
> is full. Compiler has been disabled.
> Feb 15 08:38:33  puppetserver: OpenJDK 64-Bit Server VM warning: Try 
> increasing the code cache size using -XX:ReservedCodeCacheSize=
> Feb 15 08:38:33  puppetserver: CodeCache: size=245760Kb used=207748Kb 
> max_used=242118Kb free=38011Kb
> Feb 15 08:38:33  puppetserver: bounds [0x7f4394be4000, 
> 0x7f43a3be4000, 0x7f43a3be4000]
> Feb 15 08:38:33  puppetserver: total_blobs=29412 nmethods=28684 
> adapters=635
> Feb 15 08:38:33  puppetserver: compilation: disabled (not enough 
> contiguous free space left)
>
> Boom goes the dynamite.  This explains a great many things.  I have just 
> adjusted the settings and now need to wait and see if it is better.  I will 
> drop a final post to finish this thread if it works out.
>
> Mike
>
> On Tuesday, February 12, 2019 at 7:24:21 AM UTC-6, Mike Sharpton wrote:
>>
>> I just found this as well.
>>
>> If you're working outside of lab environment, increase ReservedCodeCache
>>  to 512m under normal load. If you're working with 6-12 JRuby instances 
>> (or a max-requests-per-instance value significantly less than 100k), run 
>> with a ReservedCodeCache of 1G. Twelve or more JRuby instances in a 
>> single server might require 2G or more.
>>
>> We need to look into this setting.
>>
>> On Monday, February 11, 2019 at 7:42:01 AM UTC-6, Mike Sharpton wrote:
>>>
>>> Hey all,
>>>
>>> We have recently upgraded our environment from Puppetserver 4.2.2 to 
>>> Puppetserver 6.0.2.  We are running a mix of Puppet 4 and Puppet 6 agents 
>>> until we can get them all upgraded to 6.  We have around 6000 nodes, and we 
>>> had 4 Puppetservers, but we added two more due to capacity issues with 
>>> Puppet 6.  The load is MUCH higher with Puppet 6.  To the question, I am 
>>> seeing longer and longer agent run times after about two days of the 
>>> services running.  The only error in the logs that seems to have any 
>>> relation to this is this string.
>>>
>>> 2019-02-11T04:32:28.409-06:00 ERROR [qtp1148783071-4075] [p.r.core] 
>>> Internal Server Error: java.io.IOException: 
>>> java.util.concurrent.TimeoutException: Idle timeout expired: 30001/3 ms
>>>
>>>
>>> After I restart the puppetserver service, this goes away for about two 
>>> days.  I think Puppetserver is dying a slow death under this load (load 
>>> average of around 5-6).  We are running Puppetserver on vm's that are 
>>> 10X8GB and using 6 Jruby workers per Puppetserver and a 4GB heap.  I have 
>>> not seen any OOM exceptions and the process never crashes.  Has anyone else 
>>> seen anything like this?  I did some Googling and didn't find a ton of 
>>> relevant stuff.  Perhaps we need to upgrade to the latest version to see if 
>>> this helps?  Even more capacity?  Seems silly.  Thanks in advance!
>>>
>>> Mike
>>>
>>

-- 
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/5304bc43-dd30-4edd-a176-35ee8bdbfce8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Puppetserver 6.0.2 timeouts in the puppetserver log and on the agent side

2019-02-15 Thread Mike Sharpton
Hey all,

Update to this thread in case others have a similar issue.  It IS the 
setting below it appears.  This is listed as a "Potential" tuning setting.  
It is basically required for any real workload.  I saw this after pulling 
out some of last hairs I have left on my head (in messages, which I was not 
even focused on, Doh!).

Feb 15 08:38:33  puppetserver: OpenJDK 64-Bit Server VM warning: CodeCache 
is full. Compiler has been disabled.
Feb 15 08:38:33  puppetserver: OpenJDK 64-Bit Server VM warning: Try 
increasing the code cache size using -XX:ReservedCodeCacheSize=
Feb 15 08:38:33  puppetserver: CodeCache: size=245760Kb used=207748Kb 
max_used=242118Kb free=38011Kb
Feb 15 08:38:33  puppetserver: bounds [0x7f4394be4000, 
0x7f43a3be4000, 0x7f43a3be4000]
Feb 15 08:38:33  puppetserver: total_blobs=29412 nmethods=28684 adapters=635
Feb 15 08:38:33  puppetserver: compilation: disabled (not enough contiguous 
free space left)

Boom goes the dynamite.  This explains a great many things.  I have just 
adjusted the settings and now need to wait and see if it is better.  I will 
drop a final post to finish this thread if it works out.

Mike

On Tuesday, February 12, 2019 at 7:24:21 AM UTC-6, Mike Sharpton wrote:
>
> I just found this as well.
>
> If you're working outside of lab environment, increase ReservedCodeCache
>  to 512m under normal load. If you're working with 6-12 JRuby instances 
> (or a max-requests-per-instance value significantly less than 100k), run 
> with a ReservedCodeCache of 1G. Twelve or more JRuby instances in a 
> single server might require 2G or more.
>
> We need to look into this setting.
>
> On Monday, February 11, 2019 at 7:42:01 AM UTC-6, Mike Sharpton wrote:
>>
>> Hey all,
>>
>> We have recently upgraded our environment from Puppetserver 4.2.2 to 
>> Puppetserver 6.0.2.  We are running a mix of Puppet 4 and Puppet 6 agents 
>> until we can get them all upgraded to 6.  We have around 6000 nodes, and we 
>> had 4 Puppetservers, but we added two more due to capacity issues with 
>> Puppet 6.  The load is MUCH higher with Puppet 6.  To the question, I am 
>> seeing longer and longer agent run times after about two days of the 
>> services running.  The only error in the logs that seems to have any 
>> relation to this is this string.
>>
>> 2019-02-11T04:32:28.409-06:00 ERROR [qtp1148783071-4075] [p.r.core] 
>> Internal Server Error: java.io.IOException: 
>> java.util.concurrent.TimeoutException: Idle timeout expired: 30001/3 ms
>>
>>
>> After I restart the puppetserver service, this goes away for about two 
>> days.  I think Puppetserver is dying a slow death under this load (load 
>> average of around 5-6).  We are running Puppetserver on vm's that are 
>> 10X8GB and using 6 Jruby workers per Puppetserver and a 4GB heap.  I have 
>> not seen any OOM exceptions and the process never crashes.  Has anyone else 
>> seen anything like this?  I did some Googling and didn't find a ton of 
>> relevant stuff.  Perhaps we need to upgrade to the latest version to see if 
>> this helps?  Even more capacity?  Seems silly.  Thanks in advance!
>>
>> Mike
>>
>

-- 
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/f2aa8d37-609f-42ab-b04d-c497abfc699a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Puppetserver 6.0.2 timeouts in the puppetserver log and on the agent side

2019-02-12 Thread Mike Sharpton
I just found this as well.

If you're working outside of lab environment, increase ReservedCodeCache to 
512m under normal load. If you're working with 6-12 JRuby instances (or a 
max-requests-per-instance value significantly less than 100k), run with a 
ReservedCodeCache of 1G. Twelve or more JRuby instances in a single server 
might require 2G or more.

We need to look into this setting.

On Monday, February 11, 2019 at 7:42:01 AM UTC-6, Mike Sharpton wrote:
>
> Hey all,
>
> We have recently upgraded our environment from Puppetserver 4.2.2 to 
> Puppetserver 6.0.2.  We are running a mix of Puppet 4 and Puppet 6 agents 
> until we can get them all upgraded to 6.  We have around 6000 nodes, and we 
> had 4 Puppetservers, but we added two more due to capacity issues with 
> Puppet 6.  The load is MUCH higher with Puppet 6.  To the question, I am 
> seeing longer and longer agent run times after about two days of the 
> services running.  The only error in the logs that seems to have any 
> relation to this is this string.
>
> 2019-02-11T04:32:28.409-06:00 ERROR [qtp1148783071-4075] [p.r.core] 
> Internal Server Error: java.io.IOException: 
> java.util.concurrent.TimeoutException: Idle timeout expired: 30001/3 ms
>
>
> After I restart the puppetserver service, this goes away for about two 
> days.  I think Puppetserver is dying a slow death under this load (load 
> average of around 5-6).  We are running Puppetserver on vm's that are 
> 10X8GB and using 6 Jruby workers per Puppetserver and a 4GB heap.  I have 
> not seen any OOM exceptions and the process never crashes.  Has anyone else 
> seen anything like this?  I did some Googling and didn't find a ton of 
> relevant stuff.  Perhaps we need to upgrade to the latest version to see if 
> this helps?  Even more capacity?  Seems silly.  Thanks in advance!
>
> Mike
>

-- 
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/c96d091a-43b0-4a30-b275-b70ca63ed4b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppetserver 6.0.2 timeouts in the puppetserver log and on the agent side

2019-02-12 Thread Mike Sharpton
Hello Justin,

We were thinking the same thing with the JRuby workers.  Perhaps lowering 
them back to 4, and lowering the heap size back to three, which worked fine 
before now that we have added 2 more Puppet servers.  The behavior we see 
is failing Puppet runs like this on random modules.  

Could not evaluate: Could not retrieve file metadata for 
puppet:///modules/modulename/resourcename: SSL_connect returned=6 errno=0 
state=unknown state

Something took far too long to answer is our guess.  Reports are fine, 
PuppetDB is fine.  Things always make it there.  We see the failures.  It 
is likely we have herd that comes in and sometimes makes the situation 
worse.  Based on this fact, this should happen every 30 minutes.  It 
doesn't.  I can't think of any other server settings we are managing 
besides JRuby instances, heap size, and a tmp dir for Java to work with  
(/tmp is noexec here).   We are using this JVM, and we do not have any 
custom tuning.

openjdk version "1.8.0_191"
OpenJDK Runtime Environment (build 1.8.0_191-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)

We will try and mess with the JRuby/heap ratio now that we have more 
Puppetservers.  We consistently see all JRuby instances being utilized even 
when being set a 6.  Another thing we may consider is doing Puppet runs 
every 45 mins instead of 30.  This will lower load as well.  Thanks for 
your thoughts,

Mike


On Monday, February 11, 2019 at 5:21:06 PM UTC-6, Justin Stoller wrote:
>
>
>
> On Mon, Feb 11, 2019 at 5:42 AM Mike Sharpton  > wrote:
>
>> Hey all,
>>
>> We have recently upgraded our environment from Puppetserver 4.2.2 to 
>> Puppetserver 6.0.2.  We are running a mix of Puppet 4 and Puppet 6 agents 
>> until we can get them all upgraded to 6.  We have around 6000 nodes, and we 
>> had 4 Puppetservers, but we added two more due to capacity issues with 
>> Puppet 6.  The load is MUCH higher with Puppet 6.  To the question, I am 
>> seeing longer and longer agent run times after about two days of the 
>> services running.  The only error in the logs that seems to have any 
>> relation to this is this string.
>>
>> 2019-02-11T04:32:28.409-06:00 ERROR [qtp1148783071-4075] [p.r.core] 
>> Internal Server Error: java.io.IOException: 
>> java.util.concurrent.TimeoutException: Idle timeout expired: 30001/3 ms
>>
>>
>> After I restart the puppetserver service, this goes away for about two 
>> days.  I think Puppetserver is dying a slow death under this load (load 
>> average of around 5-6).  We are running Puppetserver on vm's that are 
>> 10X8GB and using 6 Jruby workers per Puppetserver and a 4GB heap.  I have 
>> not seen any OOM exceptions and the process never crashes.  Has anyone else 
>> seen anything like this?  I did some Googling and didn't find a ton of 
>> relevant stuff.  Perhaps we need to upgrade to the latest version to see if 
>> this helps?  Even more capacity?  Seems silly.  Thanks in advance!
>>
>
> Off the top of my head:
> 1. Have you tried lowering the JRuby workers to JVM heap ratio? (I would 
> try 1G to 1worker to see if it really is worker performance)
> 2. That error is most likely from Jetty (it can be tuned with 
> idle-timeout-milliseconds[1]). Are agent runs failing with a 500 from the 
> server when that happens? Are clients failing to post their facts or 
> reports in a timely manner? Is Puppet Server failing its connections to 
> PuppetDB?
> 3. Are you managing any other server settings? Having a low 
> max-requests-per-instance is problematic for newer servers (they more 
> aggressively compile/optimize the Ruby code the worker loads, so with 
> shorter lifetimes it does a bunch of work to then throw it a way and start 
> over - and that can cause much more load).
> 4. What version of java are you using/do you have any custom tuning of 
> Java that maybe doesn't work well with newer servers? Server 5+ only has 
> support for Java 8 and will use more non-heap memory/code cache for those 
> new optimizations mentioned above.
>
> HTH,
> Justin
>
>
> 1. 
> https://github.com/puppetlabs/trapperkeeper-webserver-jetty9/blob/master/doc/jetty-config.md#idle-timeout-milliseconds
>
>
>> Mike
>>
>> -- 
>> 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/197c0ad5-83c0-4562-833b-82028f0e3e9c%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/puppet-users/197c0ad5-83c0-4562-833b-82028f

Re: [Puppet Users] Puppetserver 6.0.2 timeouts in the puppetserver log and on the agent side

2019-02-11 Thread Mike Sharpton
Hello Henrik,

The heap being at 4GB is all the higher I would raise it, as you say GC 
becomes costly with big heaps.  The memory usage ramps up quite quickly to 
well above the configured max heap within minutes.  It comes up to about 
5.8GB of usage quickly as we manage many resources on many nodes.  We do 
not have many environments.  We normally have a production branch and only 
use a preprod branch to move changes up our environment with a module that 
managed the puppet.conf on our nodes.  We will keep looking, but I don't 
see a smoking gun.  Anyone else have any ideas?  Puppet 4 was able to 
handle this load with only 4 JRuby workers and 4 Puppet servers.  Thanks 
for your help,

Mike

On Monday, February 11, 2019 at 2:06:11 PM UTC-6, Henrik Lindberg wrote:
>
> On 2019-02-11 14:42, Mike Sharpton wrote: 
> > Hey all, 
> > 
> > We have recently upgraded our environment from Puppetserver 4.2.2 to 
> > Puppetserver 6.0.2.  We are running a mix of Puppet 4 and Puppet 6 
> > agents until we can get them all upgraded to 6.  We have around 6000 
> > nodes, and we had 4 Puppetservers, but we added two more due to capacity 
> > issues with Puppet 6.  The load is MUCH higher with Puppet 6.  To the 
> > question, I am seeing longer and longer agent run times after about two 
> > days of the services running.  The only error in the logs that seems to 
> > have any relation to this is this string. 
> > 
> > 2019-02-11T04:32:28.409-06:00 ERROR [qtp1148783071-4075] [p.r.core] 
> > Internal Server Error: java.io.IOException: 
> > java.util.concurrent.TimeoutException: Idle timeout expired: 30001/3 
> ms 
> > 
> > 
> > After I restart the puppetserver service, this goes away for about two 
> > days.  I think Puppetserver is dying a slow death under this load (load 
> > average of around 5-6).  We are running Puppetserver on vm's that are 
> > 10X8GB and using 6 Jruby workers per Puppetserver and a 4GB heap.  I 
> > have not seen any OOM exceptions and the process never crashes.  Has 
> > anyone else seen anything like this?  I did some Googling and didn't 
> > find a ton of relevant stuff.  Perhaps we need to upgrade to the latest 
> > version to see if this helps?  Even more capacity?  Seems silly.  Thanks 
> > in advance! 
> > 
>
> There may be a slow memory leak that over time makes the server busy win 
> non productive work (scanning for garbage on an ever increasing heap). 
> If you were to increase capacity you would risk only changing the 2 days 
> to a couple more, but not actually solving the issue. 
>
> Try to look at server memory usage over the two days. 
>
> Also, naturally, upgrade to latest and make sure modules are updated as 
> well. 
>
> Do you by any chance have many environments with different versions of 
> ruby code? The environment isolation "puppet generate types" may be of 
> help if that is the case as loaded ruby resource types become sticky in 
> memory. 
>
> - henrik 
>
> > Mike 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> > Groups "Puppet Users" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> > an email to puppet-users...@googlegroups.com  
> > <mailto:puppet-users+unsubscr...@googlegroups.com >. 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/puppet-users/197c0ad5-83c0-4562-833b-82028f0e3e9c%40googlegroups.com
>  
> > <
> https://groups.google.com/d/msgid/puppet-users/197c0ad5-83c0-4562-833b-82028f0e3e9c%40googlegroups.com?utm_medium=email_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/59932f88-0416-45d3-b938-0f3c417051fa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Puppetserver 6.0.2 timeouts in the puppetserver log and on the agent side

2019-02-11 Thread Mike Sharpton
Hey all,

We have recently upgraded our environment from Puppetserver 4.2.2 to 
Puppetserver 6.0.2.  We are running a mix of Puppet 4 and Puppet 6 agents 
until we can get them all upgraded to 6.  We have around 6000 nodes, and we 
had 4 Puppetservers, but we added two more due to capacity issues with 
Puppet 6.  The load is MUCH higher with Puppet 6.  To the question, I am 
seeing longer and longer agent run times after about two days of the 
services running.  The only error in the logs that seems to have any 
relation to this is this string.

2019-02-11T04:32:28.409-06:00 ERROR [qtp1148783071-4075] [p.r.core] 
Internal Server Error: java.io.IOException: 
java.util.concurrent.TimeoutException: Idle timeout expired: 30001/3 ms


After I restart the puppetserver service, this goes away for about two 
days.  I think Puppetserver is dying a slow death under this load (load 
average of around 5-6).  We are running Puppetserver on vm's that are 
10X8GB and using 6 Jruby workers per Puppetserver and a 4GB heap.  I have 
not seen any OOM exceptions and the process never crashes.  Has anyone else 
seen anything like this?  I did some Googling and didn't find a ton of 
relevant stuff.  Perhaps we need to upgrade to the latest version to see if 
this helps?  Even more capacity?  Seems silly.  Thanks in advance!

Mike

-- 
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/197c0ad5-83c0-4562-833b-82028f0e3e9c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: Updates to CA command line interaction in Puppet 6

2018-10-15 Thread Mike Sharpton
Thanks, I wasted about 60 mins before finding this after monkeying about 
trying to fix my CA.  Trying test upgrade from 4.2.2 to 6.0.1 in a split 
environment.  Wish me luck.  Thanks again!

Mike

On Monday, October 1, 2018 at 10:27:41 PM UTC-5, Simon Tideswell wrote:
>
> Hello Henri
>
> I suspect you've already had this answered, but I just replaced the 
> offending stanza ...
> *allow: {*
> * extensions: {*
> *  pp_cli_auth: "true"*
> *  }*
> *}*
> with 
> *allow: "the.fqdn.of.my.puppetserver"*
>
> I actually have a number of Puppet servers serving different clients and 
> so the *auth.conf* is managed by an ERB template and so the above is 
> actually ...
> *allow: "<%= @fqdn -%>"*
> ... in my template file.
>
> Simon
>
> On Fri, Sep 28, 2018 at 2:12 AM > wrote:
>
>> Hi,
>>
>> @Simon: Could you please describe how you solved that problem?
>>
>> I already invested hours to at least find the reason for the problem that 
>> "puppetserver ca list" gives me a 403 Forbidden, but couldn't solve it 
>> until now.
>> And unfortunately this thread is the only  document I could find on 
>> google which refers to "pp_cli_auth".
>>
>> Simply replacing ...
>> allow: {
>>extensions: {
>>pp_cli_auth: "true"
>>}
>> }
>> by ...
>> allow-unauthenticated: true
>> ... did not work for me.
>>
>> That's a real big problem because we can't create new VMs for our 
>> customers now until it will be documented how to deal with this issue.
>>
>> Many thanks in advance,
>> yours Henri
>>
>> Am Donnerstag, 20. September 2018 00:58:06 UTC+2 schrieb Simon Tideswell:
>>>
>>> Hello
>>>
>>> I've upgraded a test server from Puppet 5.5 to Puppet 6 and the upgrade 
>>> was quite seamless.
>>>
>>> However post upgrade the puppetserver ca command does not work: it 
>>> yields 403 denied errors. In auth.conf the new Puppet Server has elements 
>>> like ...
>>> allow: {
>>>  extensions: {
>>>   pp_cli_auth: "true"
>>>   }
>>> }
>>> There's presumably the requirement to recreate the Puppet Server's own 
>>> certificate with the additional extensions - but this doesn't appear to be 
>>> documented anywhere? I've worked around this by using a simpler "allow" 
>>> stanza including the Puppet Server's own certificate and it works, but it'd 
>>> be nice if the post-upgrade requirement (of re-minting the certificate) was 
>>> identified in the documentation. I can't say that recreating the 
>>> certificate with the extension really seems to offer any obvious advantage 
>>> over just using the server's own certname to be honest?
>>>
>>> Simon
>>>
>>> On Wednesday, September 19, 2018 at 2:33:05 AM UTC+10, Maggie Dreyer 
>>> wrote:
>>>>
>>>> Hello!
>>>>
>>>> As you may know, we are about to release Puppet 6. This release 
>>>> contains *a major update to the command line tools* that are used to 
>>>> interact with Puppet's CA and certificates. The update makes the commands 
>>>> much faster and more reliable, removes duplication, and makes the 
>>>> interface 
>>>> easier to understand. However, this means that *some scripts and 
>>>> workflows will have to be updated*.
>>>>
>>>> *What is getting removed:*
>>>> * puppet cert
>>>> * puppet ca
>>>> * puppet certificate
>>>> * puppet certificate_request
>>>> *puppet certificate_revocation_list
>>>>
>>>> *What is new:*
>>>> * puppetserver ca <https://github.com/puppetlabs/puppetserver-ca-cli> 
>>>> (for CA tasks like signing and revoking certs)
>>>> * puppet ssl (for agent-side tasks like submitting a CSR and fetching a 
>>>> cert, though these steps will still usually be taken care of by an agent 
>>>> run)
>>>>
>>>> We have been making updates to beaker and various test suites to 
>>>> account for this change. If you use Beaker to do any CA or certificate 
>>>> interaction in your tests, you will need to make some updates to test 
>>>> against Puppet 6:
>>>> 1) Update to Beaker 4 and beaker-puppet 1. The latest release of both 
>>>> of these projects contains u

Re: [Puppet Users] Managing mounted NFS shares, when having no write permission on that share

2018-08-17 Thread Mike Langhorst
It's v3.

Maybe I'm doing something wrong.

The file { '/data/app'  resource and the nfs share are the same location, 
so when it comes back on subsequent runs, it now sees that file /data/app 
is no longer owned as root and has 777 perms rather than 755


On Friday, August 17, 2018 at 2:30:55 PM UTC-7, Arnau wrote:
>
> Hi,
>
> Are you sure you are mounting nfs v3 and not 4?
> Puppet does nothing with the content of the mount so it has to be some 
> (missing/wrong) mount option.
>
> HTH,
> Arnau
>
>
> El dv., 17 ag. 2018 , 23:03, Mike Langhorst  > va escriure:
>
>> I'm having some issues with managing a mount point for an NFS server.  
>> Specifically when the client system has no root write privileges to that 
>> NFS share.
>>
>> I need to mount a NetApp NFS/Cifs share to a filesystem location 
>> /data/app.   So I'll need to manage the file resource /data/app, and as 
>> typical the owner and mode.
>>
>> file { '/data/app':
>>   ensure => directory,
>>   owner => root,
>>   group  => root,
>>   mode   => '0755',
>> }
>>
>> mount { '/data/app':
>>   ensure  => mounted,
>>   device   => nfs_server:/app
>>   dump=> 0,
>>   fstype=> 'nfs',
>>   target=> '/etc/fstab',
>>   require  => File['/data/app'],
>> }
>>
>>
>> So when I mount this nfs to /data/app,  that share and it's contents are 
>> nfsnobody, or some other high numbered uid,  with varying permissions, 
>> sometimes 777.  The NetApp may show 777, but it's applying other ACLs due 
>> to the CIFS share.  For the different shares I've had to mount, that uid 
>> and permissions have been different so I couldn't do something like 
>> updating the module/hiera data to match after the fact as I still wouldn't 
>> want that underling directory /data/app to be 777.
>>
>> I don't see anything in the file resource spec to allow for an "onlyif" 
>> or such.
>>
>> Any ideas on how to manage this?
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to puppet-users...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/puppet-users/c06294e4-21c7-43a8-9c06-1ac8b8c90731%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/puppet-users/c06294e4-21c7-43a8-9c06-1ac8b8c90731%40googlegroups.com?utm_medium=email_source=footer>
>> .
>> 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/cf58c43e-eb27-4379-be2f-bfd88d240a4f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Managing mounted NFS shares, when having no write permission on that share

2018-08-17 Thread Mike Langhorst
I'm having some issues with managing a mount point for an NFS server.  
Specifically when the client system has no root write privileges to that 
NFS share.

I need to mount a NetApp NFS/Cifs share to a filesystem location 
/data/app.   So I'll need to manage the file resource /data/app, and as 
typical the owner and mode.

file { '/data/app':
  ensure => directory,
  owner => root,
  group  => root,
  mode   => '0755',
}

mount { '/data/app':
  ensure  => mounted,
  device   => nfs_server:/app
  dump=> 0,
  fstype=> 'nfs',
  target=> '/etc/fstab',
  require  => File['/data/app'],
}


So when I mount this nfs to /data/app,  that share and it's contents are 
nfsnobody, or some other high numbered uid,  with varying permissions, 
sometimes 777.  The NetApp may show 777, but it's applying other ACLs due 
to the CIFS share.  For the different shares I've had to mount, that uid 
and permissions have been different so I couldn't do something like 
updating the module/hiera data to match after the fact as I still wouldn't 
want that underling directory /data/app to be 777.

I don't see anything in the file resource spec to allow for an "onlyif" or 
such.

Any ideas on how to manage this?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/c06294e4-21c7-43a8-9c06-1ac8b8c90731%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Hiera.yaml not picking up the %{environment} variable from the node

2017-08-14 Thread Mike Sharpton
Did you just change hiera.yaml?  If so, you must restart puppetserver for 
changes to take effect.  We do something similar with roles, with this 
site.pp.  Stolen from Gary and it works well.

node default {
  $role = hiera('role')
  include $role
}


You need to set 'role' somewhere in your hieradata in which the first found 
in your hierarchy will win.  This is hard to answer well without 
understanding what you have in your hiera data.  This role needs to be set 
in your %{application} yaml file.

Not sure how helpful this will be.  

Mike

On Sunday, August 13, 2017 at 9:04:47 AM UTC-5, Dennis McCarthy wrote:
>
> Hi,
>
> I'm setting up Puppet 4.0 for the first time and I'm probably missing 
> something. In my hiera.yaml:
>
> ---
> :backends:
>   - yaml
> :hierarchy:
>   - "%{application}"
>   - common
>
>
> :yaml:
> # datadir is empty here, so hiera uses its defaults:
> # - /etc/puppetlabs/code/environments/%{environment}/hieradata on *nix
> # - %CommonAppData%\PuppetLabs\code\environments\%{environment}\hieradata 
> on Windows
> # When specifying a datadir, make sure the directory exists.
>   :datadir: "/etc/puppetlabs/code/environments/%{environment}/hieradata"
> #  :datadir: /etc/puppetlabs/code/environments/development/hieradata
>
> With this setting I get this on the node:
>
> root@dc1dapp01:~# facter -p | grep application
> application => app
> root@dc1dapp01:~#
> root@dc1dapp01:~# puppet agent -t
> Info: Using configured environment 'development'
> Info: Retrieving pluginfacts
> Info: Retrieving plugin
> Info: Loading facts
> Info: Caching catalog for dc1dweb01.example.com
> Info: Applying configuration version '1502632775'
> Notice: site.pp
> Notice: /Stage[main]/Main/Notify[site.pp ]/message: defined 'message' as 
> 'site.pp 
> '
> Notice:  this is the role_basic role
> Notice: /Stage[main]/Role_basic/Notify[ this is the role_basic role ]/
> message: defined 'message' as ' this is the role_basic role '
> Notice: Applied catalog in 0.05 seconds
>
> But if i explicitly point to environment development in the Hiera.yaml 
> file, I get the following output (this is the behavior I want):
>
> root@dc1dapp01:~# puppet agent -t
> Info: Using configured environment 'development'
> Info: Retrieving pluginfacts
> Info: Retrieving plugin
> Info: Loading facts
> Info: Caching catalog for dc1dweb01.example.com
> Info: Applying configuration version '1502632844'
> Notice: site.pp
> Notice: /Stage[main]/Main/Notify[site.pp ]/message: defined 'message' as 
> 'site.pp 
> '
> Notice:  this is the APP1 module
> Notice: /Stage[main]/App1/Notify[ this is the APP1 module ]/message: 
> defined 'message' as ' this is the APP1 module '
> Notice: Applied catalog in 0.03 seconds
>
> I have a fact for the application that I want to run a specific 
> role/profile for. Can anyone explan what I'm missing please?
>
> Thanks for your help.
>
> Here are some of my other config files:
>
> environment.conf
>
> # Each environment can have an environment.conf file. Its settings will 
> only
> # affect its own environment. See docs for more info:
> # 
> https://docs.puppetlabs.com/puppet/latest/reference/config_file_environment.html
>
>
> # Any unspecified settings use default values; some of those defaults are 
> based
> # on puppet.conf settings.
>
>
> # If these settings include relative file paths, they'll be resolved 
> relative to
> # this environment's directory.
>
>
> # Allowed settings and default values:
>
>
>  modulepath = ./modules:$basemodulepath
> # manifest = (default_manifest from puppet.conf, which defaults to 
> ./manifests)
> # config_version = (no script; Puppet will use the time the catalog was 
> compiled)
> # environment_timeout = (environment_timeout from puppet.conf, which 
> defaults to 0)
> # Note: unless you have a specific reason, we recommend only setting
> # environment_timeout in puppet.conf.
>
> # cat manifests/site.pp
>
>
> notify { 'site.pp ': }
> #hiera_include('classes')
>
>
>   $role = hiera('classes','role_basic')
>   include $role
>
>
>
>
>

-- 
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/c94948c8-83a6-4a0d-a1f1-b33affd7ceb8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: PuppetDB low catalog-duplication rate Puppet DB 4.3.0

2017-07-10 Thread Mike Sharpton
If you are not on PuppetDB 4 the uri would be different is my guess.  The 
v4 part specifically.  I have still not had time to mess with this, but I 
was able to query via the uri that was given above.

On Friday, July 7, 2017 at 7:03:12 AM UTC-5, Peter Krawetzky wrote:
>
> So I went to run the curl command listed below and it came back with 
> nothing.  So I used pgadmin to look at the catalogs table and it's 
> completely empty.  The system has been running for almost 24 hours after 
> dropping/creating the postgresql database.  Any idea why the catalog table 
> would be empty?
>
> On Wednesday, June 28, 2017 at 2:11:17 PM UTC-4, Mike Sharpton wrote:
>>
>> Hey all,
>>
>> I am hoping there is someone else in the same boat as I am.  We are 
>> running Puppet 4.2.2, along with PuppetDB 4.3.0.  I am seeing low 
>> duplication rate which I think is contributing to our queuing problems in 
>> PuppetDB.  The queue will fluctuate from 0-100 queued, to up to 2000.  We 
>> have around 4500 nodes, and we are using 8 threads on our PuppetDB server. 
>>  I am seeing that the low duplication rate is caused by hashes not matching 
>> and a full insert running which is expensive on the DB instead of just 
>> updating the time stamp.  I don't know why these would not be matching, and 
>> may need help as far as how to find something like this.  I see items in 
>> PuppetDB3 for this, but not 4.  I see that using timestamp and other items 
>> which change each time will cause the catalog to never be the same, but I 
>> would think we would have 0% duplication if this was the case.  I am also 
>> seeing that things are improved in 4.4.0 as far as performance and a 
>> missing index is corrected that may speed things.  I am wondering what 
>> others have done/seen with this and whether upgrading to 4.4.0 would do me 
>> good.  I am thinking it would as many things appear to fixed around the 
>> issues I am seeing.  Thanks in advance,
>>
>> Mike
>>
>

-- 
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/bf2bfefb-7d91-49df-bdb7-c022a8092e96%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Compare node fact runs

2017-07-06 Thread Mike Sharpton
I am in a similar boat with super low duplication rates.  Check my post 
earlier to see what someone suggested I try.  Basically, do a bunch of runs 
on the same agent, then pull the needed data from the API and compare the 
files.

On Thursday, July 6, 2017 at 11:54:37 AM UTC-5, Peter Krawetzky wrote:
>
> I'm seeing a lot of replace facts in the puppetdb server log.  I googled 
> but can't find anything solid.
>
> Is there a way to compare facts for a node between runs?  Our agents run 
> hourly.  We are using open source PuppetDB 3.0.2.
>
> 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/ddba1994-0deb-4ef9-a4c4-c1af28533518%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: PuppetDB - High CPU Large number of KahaDB files and very little work going to postgresql

2017-07-06 Thread Mike Sharpton
We had a similar issue and Wyatt helped me out there with huge os, mount, 
partition facts (I still owe you a beer or two) destroying my DB.  I have 
dropped my DB several times to "clean" things up.  We don't need the data, 
we just use it with Puppetboard to see things happening or not.  I also had 
the KahaDB issue with ActiveMQ, which forced me to upgrade to 4.3.0 to get 
rid of it as I would fill up file systems in about 4 days with logs.  Going 
to 4 was a big step forward as far as retries and PG errors.  Used to have 
many many retries, now zero with 40 million plus runs.  How is your catalog 
duplication rate/command queue/command processing/sec if I may ask?  Mine 
is very low and I am working that issue now, but I have not had time to 
look into it.

On Thursday, July 6, 2017 at 11:39:41 AM UTC-5, Peter Krawetzky wrote:
>
> Well after several attempts at tuning the DB config and puppetdb config, 
> we had to drop the postgresql database and recreate it then allowing 
> puppetdb to create the required tables, indexes, etc.  Now the command 
> queue is going between zero and four, processed tens of thousands of queue 
> commands (since restarting at 10:15am) and the cpu load on the server is 
> next to nothing.
>
> My guess is the database was corrupt somehow with all of the deletes from 
> the KahaDB directory plus trying to remove a huge amount of facts.  I think 
> puppet needs to provide some type of DB reset process without have to 
> drop/create the DB.
>
> On Wednesday, June 28, 2017 at 12:25:57 PM UTC-4, Peter Krawetzky wrote:
>>
>> Last Sunday we hit a wall on our 3.0.2 puppetdb server.  The cpu spiked 
>> and the KahaDB logs started to grow eventually almost filling a 
>> filesystem.  I stopped the service, removed the mq directory per a 
>> troubleshooting guide, and restarted.  After several minutes the same 
>> symptoms began again and I have not been able to come up with a puppetdb or 
>> postgresql config to fix this.
>>
>> We tried turning off storeconfig in the puppet.conf file on our puppet 
>> master servers but that doesn't appear to have resolved the problem.  I 
>> also can't find a good explanation as to what this parameter really does or 
>> does not do even in the puppet server documentation.  Anyone have a better 
>> insight into this?
>>
>> Also is there a way to just turn off puppetdb?
>>
>> I've attached a file that is a snapshot of the puppetdb dashboard.
>>
>> Anyone experience anything like this?
>>
>

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


[Puppet Users] Re: PuppetDB - High CPU Large number of KahaDB files and very little work going to postgresql

2017-06-28 Thread Mike Sharpton
Hmm, I had thought these were one in the same.  I don't have a 3 
environment to look at anymore.  Good luck.

On Wednesday, June 28, 2017 at 2:37:35 PM UTC-5, Peter Krawetzky wrote:
>
> I looked at both documents and the second one references the scheduler log 
> files filling up.  Mine are actually in the KahaDB directory.  
>
> On Wednesday, June 28, 2017 at 12:25:57 PM UTC-4, Peter Krawetzky wrote:
>>
>> Last Sunday we hit a wall on our 3.0.2 puppetdb server.  The cpu spiked 
>> and the KahaDB logs started to grow eventually almost filling a 
>> filesystem.  I stopped the service, removed the mq directory per a 
>> troubleshooting guide, and restarted.  After several minutes the same 
>> symptoms began again and I have not been able to come up with a puppetdb or 
>> postgresql config to fix this.
>>
>> We tried turning off storeconfig in the puppet.conf file on our puppet 
>> master servers but that doesn't appear to have resolved the problem.  I 
>> also can't find a good explanation as to what this parameter really does or 
>> does not do even in the puppet server documentation.  Anyone have a better 
>> insight into this?
>>
>> Also is there a way to just turn off puppetdb?
>>
>> I've attached a file that is a snapshot of the puppetdb dashboard.
>>
>> Anyone experience anything like this?
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/06d2078d-120e-46b7-8f60-006582a39d47%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] PuppetDB low catalog-duplication rate Puppet DB 4.3.0

2017-06-28 Thread Mike Sharpton
Hey all,

I am hoping there is someone else in the same boat as I am.  We are running 
Puppet 4.2.2, along with PuppetDB 4.3.0.  I am seeing low duplication rate 
which I think is contributing to our queuing problems in PuppetDB.  The 
queue will fluctuate from 0-100 queued, to up to 2000.  We have around 4500 
nodes, and we are using 8 threads on our PuppetDB server.  I am seeing that 
the low duplication rate is caused by hashes not matching and a full insert 
running which is expensive on the DB instead of just updating the time 
stamp.  I don't know why these would not be matching, and may need help as 
far as how to find something like this.  I see items in PuppetDB3 for this, 
but not 4.  I see that using timestamp and other items which change each 
time will cause the catalog to never be the same, but I would think we 
would have 0% duplication if this was the case.  I am also seeing that 
things are improved in 4.4.0 as far as performance and a missing index is 
corrected that may speed things.  I am wondering what others have done/seen 
with this and whether upgrading to 4.4.0 would do me good.  I am thinking 
it would as many things appear to fixed around the issues I am seeing. 
 Thanks in advance,

Mike

-- 
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/bde7abd4-fccb-420b-b3d8-d4c674ca5705%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: PuppetDB - High CPU Large number of KahaDB files and very little work going to postgresql

2017-06-28 Thread Mike Sharpton
Hey Peter,

I am not using version 3 anything anymore, but you can turn off the masters 
sending things to PuppetDB by removing a few lines in the puppet.conf.  The 
master will not send anything to PuppetDB without this.  Not sure if you 
need or mess with routes.yaml/puppetdb.conf as well.

storeconfigs = true
storconfigs_backend = puppetdb
reports = store,puppetdb

Then you need to restart puppetserver.  As for ActiveMQ running rampant and 
logs filling the filesystem, We had a similar problem and had to upgrade.

https://tickets.puppetlabs.com/browse/PDB-2390

https://tickets.puppetlabs.com/browse/PDB-1411

Mike


On Wednesday, June 28, 2017 at 11:25:57 AM UTC-5, Peter Krawetzky wrote:
>
> Last Sunday we hit a wall on our 3.0.2 puppetdb server.  The cpu spiked 
> and the KahaDB logs started to grow eventually almost filling a 
> filesystem.  I stopped the service, removed the mq directory per a 
> troubleshooting guide, and restarted.  After several minutes the same 
> symptoms began again and I have not been able to come up with a puppetdb or 
> postgresql config to fix this.
>
> We tried turning off storeconfig in the puppet.conf file on our puppet 
> master servers but that doesn't appear to have resolved the problem.  I 
> also can't find a good explanation as to what this parameter really does or 
> does not do even in the puppet server documentation.  Anyone have a better 
> insight into this?
>
> Also is there a way to just turn off puppetdb?
>
> I've attached a file that is a snapshot of the puppetdb dashboard.
>
> Anyone experience anything like this?
>

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


[Puppet Users] How to copy and install 3 different files from puppet master to 3 different locations

2017-04-20 Thread mike . zayour
I created a module to copy one file from the master and install to agents 
and it works fine with code below: but now I am trying to copy 3 different 
files in different directory and install each one on different environment. 
For example: file A need to be installed on all agents in A environment 
File B need to be installed on all agents in B environment File C need to 
be installed on all agents in C environment

  1 class profile::ma {
  2
  3 file { '/tmp/filename.sh':
  4 ensure  => 'present',
  5 replace => 'no',

  6 source  => 'puppet:///module/files/filename.sh',
  7 mode   => '0755',
  8 notify  => Exec['install'],
  9
 10 }
 11
 12exec { 'install':
 13  command => '/tmp/filename.sh -i',
 14  onlyif  => '/usr/bin/test ! -e /etc/filetocheck',
  15 }16}

-- 
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/fccc5dd3-adfb-48ab-96ea-8a808c0ca64b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] F5 Module - proxy server

2016-09-02 Thread mike r
Hello, quick question, when setting up the F5 module and setting up the 
proxy server that talks to F5 balancer, can this proxy be a Windows machine 
or are there any specific OS or system requirements for this proxy?

-- 
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/99b793fa-a583-442b-8e51-cf92d7ff60f1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Regenerated new master certs after alterning DNS aliases, Puppet Server not starting

2016-08-24 Thread mike r
Getting errors on checksums with DB

I had to regenerate certs for master and agent and nodes after altering DNS 
aliases

doesnt like the checksum

 
at 
org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64)
 
~[puppet-server-release.jar:na]
at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_101]
2016-08-24 11:10:28,271 WARN  [qtp1808023046-59]* [puppetserver] Puppet 
Error connecting to MASTERNAME on 8081 at route 
/pdb/cmd/v1?checksum=e31c9a403e4e76da070b6193aea5a4bab93618f7=4=MASTERNAME=replace_facts,
 
error message received was 'Error executing http request'. Failing over to 
the next PuppetDB server_url in the 'server_urls' list*
2016-08-24 11:10:28,272 ERROR [qtp1808023046-59] [puppetserver] Puppet 
Failed to execute 
'/pdb/cmd/v1?checksum=e31c9a403e4e76da070b6193aea5a4bab93618f7=4=MASTERNAME=replace_facts'
 
on at least 1 of the following 'server_urls': https://MASTERNAME:8081
2016-08-24 11:10:28,273 ERROR [qtp1808023046-59] [puppetserver] Puppet 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/puppetdb/http.rb:115:in 
`raise_request_error' 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/puppetdb/http.rb:156:in 
`failover_action' 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/puppetdb/http.rb:214:in 
`action' 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/puppetdb/command.rb:63:in
 
`submit' 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb:58:in
 
`profile' 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler.rb:51:in 
`profile' 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/puppetdb.rb:101:in 
`profile' 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/puppetdb/command.rb:62:in
 
`submit' 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/puppetdb.rb:64:in 
`submit_command' 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb:58:in
 
`profile' 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler.rb:51:in 
`profile' 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/puppetdb.rb:101:in 
`profile' 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/puppetdb.rb:61:in 
`submit_command' 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/facts/puppetdb.rb:37:in
 
`save' 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb:58:in
 
`profile' 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler.rb:51:in 
`profile' 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/puppetdb.rb:101:in 
`profile' 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/facts/puppetdb.rb:20:in
 
`save' 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:285:in
 
`save' 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/node/facts.rb:21:in 
`save' 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:42:in
 
`extract_facts_from_request' 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb:58:in
 
`profile' 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler.rb:51:in 
`profile' 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:23:in
 
`extract_facts_from_request' 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:48:in
 
`find' 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:194:in
 
`find' 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/api/indirected_routes.rb:132:in
 
`do_find' 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/api/indirected_routes.rb:48:in
 
`call' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in 
`override' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:240:in 
`override' 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/api/indirected_routes.rb:47:in
 
`call' 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/route.rb:82:in 
`process' org/jruby/RubyArray.java:1613:in `each' 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/route.rb:81:in 
`process' 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/route.rb:87:in 
`process' 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/route.rb:87:in 
`process' 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/handler.rb:60:in
 
`process' 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb:58:in
 
`profile' 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler.rb:51:in 
`profile' 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/handler.rb:58:in
 
`process' 
file:/opt/puppetlabs/server/apps/puppetserver/puppet-server-release.jar!/puppetserver-lib/puppet/server/master.rb:42:in
 
`handleRequest' Puppet$$Server$$Master_80906857.gen:13:in `handleRequest' 
request_handler_core.clj:281:in 

[Puppet Users] Re: Razor bootstrap load timing out

2016-08-21 Thread mike r
looks like it was the DNS on my Razor box, I changed the razor hostname in 
/var/lib/tftpboot/bootstrap.ipxe from hostname to an IP, 

:chain_boot
chain 
http://192.168.56.24:8150/svc/boot?net0=${net0/mac:hexhyp}_mac=${dhcp_mac}=${serial}=${asset}=${uuid}
 
|| goto error

now its loading the kernel


On Saturday, August 20, 2016 at 9:21:04 PM UTC-4, mike r wrote:
>
> Running Razor provisioning
>
> PE Master: Ubuntu 14.04, puppet 4.5.2
> Razor on Centos 7
> Razor Server version: 1.3.0.0
> Razor Client version: 1.2.0
>
>
> Configured the dnsmasq DHCP and TFTP and stocked /var/lib/tftpboot with 
> the 2 files
> [root@razor tftpboot]# ls -la
> total 76
> drw-r-xr-x.  2 root root56 Aug 20 20:51 .
> drwxr-xr-x. 25 root root  4096 Aug 20 19:15 ..
> -rw-r-xr-x   1 root root   913 Aug 20 20:47 *bootstrap.ipxe*
> -rw-r-xr-x   1 root root 68389 Aug 20 00:15 *undionly-20140116.kpxe*
>
> dnsmasq service is running
>
> All I want to do at this point is have a test VM boot up on network, get a 
> DHCP address and load the bootstrap.ipxe from my Razor server
>
> the first part happens ok, its getting the address from dnsmasq w correct 
> Range
>
> tailing my Messages log, you can see its assigning the IP and trying to 
> send bootstrap file to my test VM
>
>
> Aug 20 21:00:48 razor dnsmasq-dhcp[892]: DHCPDISCOVER(enp0s8) 
> 08:00:27:68:4b:45
> Aug 20 21:00:48 razor dnsmasq-dhcp[892]: DHCPOFFER(enp0s8) 192.168.56.45 
> 08:00:27:68:4b:45
> Aug 20 21:00:49 razor dnsmasq-dhcp[892]: DHCPDISCOVER(enp0s8) 
> 08:00:27:68:4b:45
> Aug 20 21:00:49 razor dnsmasq-dhcp[892]: DHCPOFFER(enp0s8) 192.168.56.45 
> 08:00:27:68:4b:45
> Aug 20 21:00:51 razor dnsmasq-dhcp[892]: DHCPREQUEST(enp0s8) 192.168.56.45 
> 08:00:27:68:4b:45
> Aug 20 21:00:51 razor dnsmasq-dhcp[892]: DHCPACK(enp0s8) 192.168.56.45 
> 08:00:27:68:4b:45
> Aug 20 21:00:51 razor dnsmasq-tftp[892]: sent 
> /var/lib/tftpboot/bootstrap.ipxe to 192.168.56.45
>
> For some reason its timing out.
>   
> <https://lh3.googleusercontent.com/-c6jH4INq060/V7j9asZj19I/lW4/GfYw4wbwbPg_3IpZu286aRnQY9xPmsaKACLcB/s1600/Selection_027.jpg>
> 192.168.56.24 = Razor 
> 192.168.56.45 = Test VM
>
>
>
>
> <https://lh3.googleusercontent.com/-o39gxau-gvA/V7j95yoRj7I/lW8/paDJ21V8NfYBf6RXiCLn6PBXuWsz_FEmQCLcB/s1600/Selection_029.jpg>
>
>
>
> Not sure where else to check for the timeouts. 
>
>
>
>

-- 
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/562cbf77-d071-48ca-b920-baef97a6fef9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Razor bootstrap load timing out

2016-08-20 Thread mike r
Running Razor provisioning

PE Master: Ubuntu 14.04, puppet 4.5.2
Razor on Centos 7
Razor Server version: 1.3.0.0
Razor Client version: 1.2.0


Configured the dnsmasq DHCP and TFTP and stocked /var/lib/tftpboot with the 
2 files
[root@razor tftpboot]# ls -la
total 76
drw-r-xr-x.  2 root root56 Aug 20 20:51 .
drwxr-xr-x. 25 root root  4096 Aug 20 19:15 ..
-rw-r-xr-x   1 root root   913 Aug 20 20:47 *bootstrap.ipxe*
-rw-r-xr-x   1 root root 68389 Aug 20 00:15 *undionly-20140116.kpxe*

dnsmasq service is running

All I want to do at this point is have a test VM boot up on network, get a 
DHCP address and load the bootstrap.ipxe from my Razor server

the first part happens ok, its getting the address from dnsmasq w correct 
Range

tailing my Messages log, you can see its assigning the IP and trying to 
send bootstrap file to my test VM


Aug 20 21:00:48 razor dnsmasq-dhcp[892]: DHCPDISCOVER(enp0s8) 
08:00:27:68:4b:45
Aug 20 21:00:48 razor dnsmasq-dhcp[892]: DHCPOFFER(enp0s8) 192.168.56.45 
08:00:27:68:4b:45
Aug 20 21:00:49 razor dnsmasq-dhcp[892]: DHCPDISCOVER(enp0s8) 
08:00:27:68:4b:45
Aug 20 21:00:49 razor dnsmasq-dhcp[892]: DHCPOFFER(enp0s8) 192.168.56.45 
08:00:27:68:4b:45
Aug 20 21:00:51 razor dnsmasq-dhcp[892]: DHCPREQUEST(enp0s8) 192.168.56.45 
08:00:27:68:4b:45
Aug 20 21:00:51 razor dnsmasq-dhcp[892]: DHCPACK(enp0s8) 192.168.56.45 
08:00:27:68:4b:45
Aug 20 21:00:51 razor dnsmasq-tftp[892]: sent 
/var/lib/tftpboot/bootstrap.ipxe to 192.168.56.45

For some reason its timing out.
  

192.168.56.24 = Razor 
192.168.56.45 = Test VM







Not sure where else to check for the timeouts. 



-- 
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/70180d00-599b-4b47-9771-9552909f8814%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Changes to module not picked up by agent

2016-08-18 Thread mike r
restarted pe-puppetserver seems to clear cache on master, and the node got 
the updated version. But if I make any other changes to my modules, node 
isnt getting the updated catalog, its using cached version again.


Master running on Ubuntu 14.04  puppet 4.5.2
node running on centos7 puppet 4.5.2




On Thursday, August 18, 2016 at 12:32:12 PM UTC-4, mike r wrote:
>
> Im trying to run an Nginx module, my install.pp has the following line
>
>
>
> $agent_version = $::puppetversion
>   
> #  if $agent_version < 3.8 {
> #fail(" Node ${::fqdn} has a Puppet agent version: 
> ${agent_version} which is not compatible with this module. Need to have 
> minimum Puppet agent 3.8 -")
>  # }
>  
> the IF statement is commented out, yet when I run agent on target, it 
> looks like its cached the old version of the manifest, it still tries to do 
> the IF statement
>
> [root@centos7node state]# 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 400 on SERVER: 
> Evaluation Error: Error while evaluating a Resource Statement, Evaluation 
> Error: *Error while evaluating a Function Call,  Node centos7node has 
> a Puppet agent version: 4.5.2 which is not compatible with this module. 
> Need to have minimum Puppet agent 3.8 - at 
> /etc/puppetlabs/code/environments/production/modules/nginx/manifests/install.pp:18:3
>  
> on node centos7node*
> Warning: Not using cache on failed catalog
> Error: Could not retrieve catalog; skipping run
>
>
>
> Not sure where the caching is occuring, on Master or Agent, Im guessing on 
> master. Any way to clear the cache on both ends? Didnt see anything in 
> docs. 
>
>
>

-- 
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/8f59511f-243d-4fc1-8782-cc5ebf5e7585%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Changes to module not picked up by agent

2016-08-18 Thread mike r
Puppet 4.5.2



On Thursday, August 18, 2016 at 12:32:12 PM UTC-4, mike r wrote:
>
> Im trying to run an Nginx module, my install.pp has the following line
>
>
>
> $agent_version = $::puppetversion
>   
> #  if $agent_version < 3.8 {
> #fail(" Node ${::fqdn} has a Puppet agent version: 
> ${agent_version} which is not compatible with this module. Need to have 
> minimum Puppet agent 3.8 -")
>  # }
>  
> the IF statement is commented out, yet when I run agent on target, it 
> looks like its cached the old version of the manifest, it still tries to do 
> the IF statement
>
> [root@centos7node state]# 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 400 on SERVER: 
> Evaluation Error: Error while evaluating a Resource Statement, Evaluation 
> Error: *Error while evaluating a Function Call,  Node centos7node has 
> a Puppet agent version: 4.5.2 which is not compatible with this module. 
> Need to have minimum Puppet agent 3.8 - at 
> /etc/puppetlabs/code/environments/production/modules/nginx/manifests/install.pp:18:3
>  
> on node centos7node*
> Warning: Not using cache on failed catalog
> Error: Could not retrieve catalog; skipping run
>
>
>
> Not sure where the caching is occuring, on Master or Agent, Im guessing on 
> master. Any way to clear the cache on both ends? Didnt see anything in 
> docs. 
>
>
>

-- 
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/0d078221-7c0d-41b6-bf01-61dd46b76a84%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Changes to module not picked up by agent

2016-08-18 Thread mike r
Im trying to run an Nginx module, my install.pp has the following line



$agent_version = $::puppetversion
  
#  if $agent_version < 3.8 {
#fail(" Node ${::fqdn} has a Puppet agent version: ${agent_version} 
which is not compatible with this module. Need to have minimum Puppet 
agent 3.8 -")
 # }
 
the IF statement is commented out, yet when I run agent on target, it looks 
like its cached the old version of the manifest, it still tries to do the 
IF statement

[root@centos7node state]# 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 400 on SERVER: 
Evaluation Error: Error while evaluating a Resource Statement, Evaluation 
Error: *Error while evaluating a Function Call,  Node centos7node has a 
Puppet agent version: 4.5.2 which is not compatible with this module. Need 
to have minimum Puppet agent 3.8 - at 
/etc/puppetlabs/code/environments/production/modules/nginx/manifests/install.pp:18:3
 
on node centos7node*
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run



Not sure where the caching is occuring, on Master or Agent, Im guessing on 
master. Any way to clear the cache on both ends? Didnt see anything in 
docs. 


-- 
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/fc6d2627-42d8-4662-86b7-217329ec1fca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet control, Hiera data, puppetfile, and r10k and git merging woes

2016-08-18 Thread Mike Sharpton
The static branches are basically Puppet environments in which nodes are 
bound/pointed to them in their puppet.conf.  This way we can open CR's per 
set of nodes and move up the chain.  Also, I may have found another option 
on Gary's site.  We could r10k our hiera data and split it from our control 
repo.  More to come.  Thanks again for thoughts.

On Thursday, August 18, 2016 at 10:00:01 AM UTC-5, Christopher Wood wrote:
>
> I'm missing why you need static branches. I'm picturing something more 
> like: 
>
> git checkout production 
> git checkout -b ticket1234 
> # make changes, commit, push, test, repeat 
> git merge production # catch up on any prod changes, retest 
> git tag ticket.1234 
> git checkout production 
> git merge ticket1234 
> git branch -d ticket1234 
>
> That way everybody's changes are working pretty close to what production 
> is right now. 
>
> The alternatives are curating your branches, periodically re-branching 
> from production, or just accepting the current state, as near as I can tell 
> off the cuff. If you want to maintain something it requires maintenance 
> work no matter the tool you pick. 
>
>
> On Thu, Aug 18, 2016 at 05:27:40AM -0700, Mike Sharpton wrote: 
> >Thanks for your reply.  We based our initial design on shit Gary 
> says. 
> > This may be our only option as you say, to have hiera data changes 
> made 
> >to each static branch/puppet environment by hand and not merge.  We 
> need 
> >the static branches for separation of Puppet environments.  Problem 
> with 
> >this approach is humans will make errors between each branch 
> sometimes or 
> >always.  The branches/environments will eventually become snow flakes 
> over 
> >time as far as Hieradata.  Perhaps we can possibly merge them weekly 
> to 
> >lower this risk.  Assuming no code changes are in flight, which there 
> most 
> >likely always will be.  The search continues. Thanks again, 
> >Mike 
> > 
> >On Wednesday, August 17, 2016 at 3:52:31 PM UTC-5, Christopher Wood 
> wrote: 
> > 
> >  It sounds like these might help: 
> > 
> >  [1]https://puppet.com/blog/git-workflows-puppet-and-r10k 
> > 
> >  [2]http://garylarizza.com/blog/categories/r10k/ 
> > 
> >  Seems like you would benefit from having all teams work from 
> branches of 
> >  current production and merge back, rather than maintaining a 
> >  semi-permanent dev branch shared by everybody. This is usually 
> where I 
> >  suggest that people review commits and talk to each other and 
> figure out 
> >  what's good, but sometimes that's like pulling teeth. 
> > 
> >  On Wed, Aug 17, 2016 at 01:21:45PM -0700, Mike Sharpton wrote: 
> >  >Hey all, 
> >  >We are coming up on an issue in our environment in where we 
> have 
> >  multiple 
> >  >Puppet environments that are backed by git branches in a 
> puppet 
> >  control 
> >  >repo.  Our Hiera data is stored inside these branches and 
> changed 
> >  >frequently by our Operations teams.  Of which we then have 
> them 
> >  merge 
> >  >changes up the environment chain and r10k through our Puppet 
> >  environments. 
> >  > This is all fine. 
> >  >Ex, dev -> test -> production, hiera data changes are moved up 
> and 
> >  tested 
> >  >each step of the way. 
> >  >When things aren't fine is when we are testing code in our dev 
> or 
> >  test 
> >  >branch and we have changed the tags for modules/repos inside 
> the 
> >  >Puppetfile of those branches that we don't want in production 
> right 
> >  away 
> >  >(dev/test).  This code only applies to dev environment, on 
> purpose. 
> >
> >  >Our operations team then comes along with their hiera changes 
> and 
> >  merges 
> >  >the puppetfile module/repo changes up the chain along with the 
> >  hiera data. 
> >  > Effectively moving our Puppetfile changes up the chain when 
> we 
> >  don't want 
> >  >to.  We have thought about splitting hiera data out our puppet 
> >  control 
> >  >module like it was before Puppet 4, but this leaves us no room 
> to 
> >  test 
> >  >hiera data up our environment chain and also leaves us with 
> some CI 
> >  work 
> >  >to make this feasible.  Having th

Re: [Puppet Users] Puppet control, Hiera data, puppetfile, and r10k and git merging woes

2016-08-18 Thread Mike Sharpton
Rob,

Thanks for your reply.  When our ops team makes a change in hieradata to 
the dev branch for example, all dev machines (in the dev puppet 
environment) will receive the new hiera data (we want this to happen).  We 
then ask them to merge that up to test, and finally to production.  If an 
engineer/developer is testing some new version of a repo/pupept module and 
has incremented the tag in puppetfile in the dev branch for this module, 
when the ops team merges the control module from dev to test, the 
puppetfile and tag are also merged as this is all included in a control 
repo.  Puppetfile is newer than where I am merging to, merge it.

We may have a fix of which we didn't think about.  Hot fix push direct to 
the branch you need to for hiera data then merge to all, even in the wrong 
direction of an upward flow.  dev -> test -> production is a logical flow. 
 In this case if ops doesn't change Puppetfile in their hot fix branch, it 
will see the puppetfile it is merging to is newer and not merge it.  I 
think this will work, we are testing it now.  If this works, I will post to 
this thread.  This may help people even though it goes against logical 
merge paths in my head.  I am not a developer by any means, perhaps this 
makes perfect sense to them.

Mike

On Thursday, August 18, 2016 at 8:01:00 AM UTC-5, Rob Nelson wrote:
>
> Mike, is there a reason that Puppetfile changes and hiera changes are 
> being made in sync, when they aren't tied to each other? Perhaps those 
> Puppetfile changes that are not ready to be merged should be in a branch 
> called 'experimental' (or even a more-persistent-than-normal feature 
> branch) and only merged to 'dev' when it's time to start promoting the 
> code. You've probably already thought of that, but throwing it out there 
> just in case.
>
> On Thursday, August 18, 2016, Mike Sharpton <shar...@gmail.com 
> > wrote:
>
>> Thanks for your reply.  We based our initial design on shit Gary says.  
>> This may be our only option as you say, to have hiera data changes made to 
>> each static branch/puppet environment by hand and not merge.  We need the 
>> static branches for separation of Puppet environments.  Problem with this 
>> approach is humans will make errors between each branch sometimes or 
>> always.  The branches/environments will eventually become snow flakes over 
>> time as far as Hieradata.  Perhaps we can possibly merge them weekly to 
>> lower this risk.  Assuming no code changes are in flight, which there most 
>> likely always will be.  The search continues. Thanks again,
>>
>> Mike
>>
>>
>>
>> On Wednesday, August 17, 2016 at 3:52:31 PM UTC-5, Christopher Wood wrote:
>>>
>>> It sounds like these might help: 
>>>
>>> https://puppet.com/blog/git-workflows-puppet-and-r10k 
>>>
>>> http://garylarizza.com/blog/categories/r10k/ 
>>>
>>> Seems like you would benefit from having all teams work from branches of 
>>> current production and merge back, rather than maintaining a semi-permanent 
>>> dev branch shared by everybody. This is usually where I suggest that people 
>>> review commits and talk to each other and figure out what's good, but 
>>> sometimes that's like pulling teeth. 
>>>
>>>
>>>
>>> On Wed, Aug 17, 2016 at 01:21:45PM -0700, Mike Sharpton wrote: 
>>> >Hey all, 
>>> >We are coming up on an issue in our environment in where we have 
>>> multiple 
>>> >Puppet environments that are backed by git branches in a puppet 
>>> control 
>>> >repo.  Our Hiera data is stored inside these branches and changed 
>>> >frequently by our Operations teams.  Of which we then have them 
>>> merge 
>>> >changes up the environment chain and r10k through our Puppet 
>>> environments. 
>>> > This is all fine. 
>>> >Ex, dev -> test -> production, hiera data changes are moved up and 
>>> tested 
>>> >each step of the way. 
>>> >When things aren't fine is when we are testing code in our dev or 
>>> test 
>>> >branch and we have changed the tags for modules/repos inside the 
>>> >Puppetfile of those branches that we don't want in production right 
>>> away 
>>> >(dev/test).  This code only applies to dev environment, on purpose. 
>>>   
>>> >Our operations team then comes along with their hiera changes and 
>>> merges 
>>> >the puppetfile module/repo changes up the chain along with the 
>>> hiera data. 
>>> > Effectively moving our Puppet

Re: [Puppet Users] Puppet control, Hiera data, puppetfile, and r10k and git merging woes

2016-08-18 Thread Mike Sharpton
Thanks for your reply.  We based our initial design on shit Gary says. 
 This may be our only option as you say, to have hiera data changes made to 
each static branch/puppet environment by hand and not merge.  We need the 
static branches for separation of Puppet environments.  Problem with this 
approach is humans will make errors between each branch sometimes or 
always.  The branches/environments will eventually become snow flakes over 
time as far as Hieradata.  Perhaps we can possibly merge them weekly to 
lower this risk.  Assuming no code changes are in flight, which there most 
likely always will be.  The search continues. Thanks again,

Mike



On Wednesday, August 17, 2016 at 3:52:31 PM UTC-5, Christopher Wood wrote:
>
> It sounds like these might help: 
>
> https://puppet.com/blog/git-workflows-puppet-and-r10k 
>
> http://garylarizza.com/blog/categories/r10k/ 
>
> Seems like you would benefit from having all teams work from branches of 
> current production and merge back, rather than maintaining a semi-permanent 
> dev branch shared by everybody. This is usually where I suggest that people 
> review commits and talk to each other and figure out what's good, but 
> sometimes that's like pulling teeth. 
>
>
>
> On Wed, Aug 17, 2016 at 01:21:45PM -0700, Mike Sharpton wrote: 
> >Hey all, 
> >We are coming up on an issue in our environment in where we have 
> multiple 
> >Puppet environments that are backed by git branches in a puppet 
> control 
> >repo.  Our Hiera data is stored inside these branches and changed 
> >frequently by our Operations teams.  Of which we then have them merge 
> >changes up the environment chain and r10k through our Puppet 
> environments. 
> > This is all fine. 
> >Ex, dev -> test -> production, hiera data changes are moved up and 
> tested 
> >each step of the way. 
> >When things aren't fine is when we are testing code in our dev or 
> test 
> >branch and we have changed the tags for modules/repos inside the 
> >Puppetfile of those branches that we don't want in production right 
> away 
> >(dev/test).  This code only applies to dev environment, on purpose.   
> >Our operations team then comes along with their hiera changes and 
> merges 
> >the puppetfile module/repo changes up the chain along with the hiera 
> data. 
> > Effectively moving our Puppetfile changes up the chain when we don't 
> want 
> >to.  We have thought about splitting hiera data out our puppet 
> control 
> >module like it was before Puppet 4, but this leaves us no room to 
> test 
> >hiera data up our environment chain and also leaves us with some CI 
> work 
> >to make this feasible.  Having the hieradata in each environment is 
> too 
> >nice.  We also attempted to monkey with .gitignore, but this is not 
> meant 
> >to do what we are trying to do.  Don't merge Puppetfile unless I want 
> to.  
> >Has anyone ran into this and found a somewhat elegant solution? 
> > Everything we are coming up with is either not easy to manage, or 
> just 
> >doesn't make sense to do.  Perhaps we are missing something simple 
> and are 
> >over thinking things.  Thanks in advance. 
> >Mike 
> > 
> >-- 
> >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 [1]puppet-users...@googlegroups.com . 
> >To view this discussion on the web visit 
> >[2]
> https://groups.google.com/d/msgid/puppet-users/9d9e18a4-a6e4-4d04-b0b3-377b848a8504%40googlegroups.com.
>  
>
> >For more options, visit [3]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/cfcde2dc-2904-4286-bd01-c934857c0ee5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Puppet control, Hiera data, puppetfile, and r10k and git merging woes

2016-08-17 Thread Mike Sharpton
Hey all,

We are coming up on an issue in our environment in where we have multiple 
Puppet environments that are backed by git branches in a puppet control 
repo.  Our Hiera data is stored inside these branches and changed 
frequently by our Operations teams.  Of which we then have them merge 
changes up the environment chain and r10k through our Puppet environments. 
 This is all fine.

Ex, dev -> test -> production, hiera data changes are moved up and tested 
each step of the way.

When things aren't fine is when we are testing code in our dev or test 
branch and we have changed the tags for modules/repos inside the Puppetfile 
of those branches that we don't want in production right away (dev/test). 
 This code only applies to dev environment, on purpose.  

Our operations team then comes along with their hiera changes and merges 
the puppetfile module/repo changes up the chain along with the hiera data. 
 Effectively moving our Puppetfile changes up the chain when we don't want 
to.  We have thought about splitting hiera data out our puppet control 
module like it was before Puppet 4, but this leaves us no room to test 
hiera data up our environment chain and also leaves us with some CI work to 
make this feasible.  Having the hieradata in each environment is too nice. 
 We also attempted to monkey with .gitignore, but this is not meant to do 
what we are trying to do.  Don't merge Puppetfile unless I want to. 

Has anyone ran into this and found a somewhat elegant solution?  Everything 
we are coming up with is either not easy to manage, or just doesn't make 
sense to do.  Perhaps we are missing something simple and are over thinking 
things.  Thanks in advance.

Mike

-- 
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/9d9e18a4-a6e4-4d04-b0b3-377b848a8504%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] new CIS Benchmark compliance module for RHEL 7

2016-07-31 Thread mike r
testing welcome. thanks.

https://forge.puppet.com/perfecto25/cis_rhel7

-- 
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/1e5045af-c1e9-41b0-be75-794c00512944%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] File_line help (regex?)

2016-07-19 Thread mike r
trying to make sure my grub conf file contains a string,


cat /etc/default/grub

GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
*GRUB_CMDLINE_LINUX="crashkernel=auto audit=1 rd.lvm.lv=rhel/root 
rd.lvm.lv=rhel/swap rhgb quiet"*
GRUB_DISABLE_RECOVERY="true"

my manifest has this,


$file = '/etc/default/grub'

file_line { "(5.2.3) - ${file}: audit=1":
 ensure=> present,
 path  => $file,
 line  => 'audit=1',
 match => *'^GRUB_CMDLINE_LINUX=".*audit=1.*$*',
}

I used Rubular regex editor and the regex works in rubular, it should match 
the line and pass, since hte line contains "audit=1", but during puppet 
run, it throws an exception,

/Stage[main]/Cis_rhel7::Rule::Rule_5_2_3/File_line[(5.2.3) - 
/etc/default/grub: audit=1]/ensure: current_value absent, should be present 
(noop)

Cant figure out why its not matching. 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/e1f77ab6-f07a-4ef8-871c-c7592da1a818%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Not able to execute puppet cert list

2016-07-13 Thread Mike Hendon
Hi Jim,

Try: sudo /usr/bin/puppet cert list --all

Regards,
Mike.

On Tuesday, 12 July 2016 08:13:12 UTC+1, jiminfote...@gmail.com wrote:
>
> Good Folks,
>
> Having an issue while executing puppet cert list a normal user it doesn't 
> give me a list of outstanding pending certificates..
>
> Please find below
>
> [jim@puppet ~]$ puppet cert list
> [jim@puppet ~]$ puppet cert list --all
> [jim@puppet ~]$ sudo puppet cert list --all
> [sudo] password for jim: 
> sudo: puppet: command not found
> [root@puppet ~]# puppet cert list
>   "agent1.netgear" (SHA256) 15:8F:C1:34:5B:BD:0A:0D:F8:EA:79:84:EE:37:
> A0:39:BE:2D:E4:BD:E9:B4:14:5B:AE:77:B4:82:96:12:B7:7D
>   "agent2.netgear" (SHA256) 62:04:E8:8F:29:2B:2A:F4:DE:8B:CB:76:49:24:
> AF:26:BE:C7:24:2E:06:7C:53:69:8F:49:77:79:34:4A:5E:2B
>   "agent3.netgear" (SHA256) C5:1C:19:F2:79:BC:3E:F0:A6:CB:1B:C0:B9:33:
> 2A:58:FD:15:07:92:1E:02:B9:6A:7A:64:A6:B7:29:B4:F9:8E
> [root@puppet ~]# su - jim
> [jim@puppet ~]$ puppet cert list
> [jim@puppet ~]$  
>
>
>
> When I do execute commands should I be root or jim ? or Should I be jim 
> but execute commands with sudo ?? My suoders file has already allowed jim 
> to execute any command so if I am not to execute puppet command it should 
> be some settings within puppet itself.. Also what is the best practice to 
> execute commands with root user user or normal user on agents and server.
>
> Please guide me 
>
> Thanks
> Jim
>

-- 
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/bd9cdbb6-7222-46d3-ac4f-ee2787b37754%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] File_line only if the file exists

2016-07-08 Thread mike r
Quick question, Im writing a module that makes sure file_line exists but 
cant figure out how to only apply this if the target file exists, heres the 
module so far


$file = '/etc/modprobe.d/CIS.conf'

file { $file :
  ensure => file,
  mode   => '0600',
  owner  => 'root',
  group  => 'root',
}


file_line { "(1.1.18) ${file} - cramfs":
  ensure  => present,
  path=> $file,
  line=> 'install cramfs /bin/true',
  require => File[$file],
}

file_line { "(1.1.19) ${file} - freevxfs":
  ensure  => present,
  path=> $file,
  line=> 'install freevxfs /bin/true',
  require => File[$file],
}


I added the Require for each file_line but when I test on a node I get 
this, 

*Notice: 
/Stage[main]/Cis_rhel7::Rule::Rule_1_1_18/File[/etc/modprobe.d/CIS.conf]/ensure:
 
current_value absent, should be file (noop)*


*Error: /Stage[main]/Cis_rhel7::Rule::Rule_1_1_18/File_line[(1.1.18) 
/etc/modprobe.d/CIS.conf - cramfs]: Could not evaluate: No such file or 
directory @ rb_sysopen - /etc/modprobe.d/CIS.confError: 
/Stage[main]/Cis_rhel7::Rule::Rule_1_1_18/File_line[(1.1.19) 
/etc/modprobe.d/CIS.conf - freevxfs]: Could not evaluate: No such file or 
directory @ rb_sysopen - /etc/modprobe.d/CIS.confError: 
/Stage[main]/Cis_rhel7::Rule::Rule_1_1_18/File_line[(1.1.20) 
/etc/modprobe.d/CIS.conf - jffs2]: Could not evaluate: No such file or 
directory @ rb_sysopen - /etc/modprobe.d/CIS.conf*
Error: /Stage[main]/Cis_rhel7::Rule::Rule_1_1_18/File_line[(1.1.21) 
/etc/modprobe.d/CIS.conf - hfs]: Could not evaluate: No such file or 
directory @ rb_sysopen - /etc/modprobe.d/CIS.conf
Error: /Stage[main]/Cis_rhel7::Rule::Rule_1_1_18/File_line[(1.1.22) 
/etc/modprobe.d/CIS.conf - hfsplus]: Could not evaluate: No such file or 
directory @ rb_sysopen - /etc/modprobe.d/CIS.conf
Error: /Stage[main]/Cis_rhel7::Rule::Rule_1_1_18/File_line[(1.1.23) 
/etc/modprobe.d/CIS.conf - squashfs]: Could not evaluate: No such file or 
directory @ rb_sysopen - /etc/modprobe.d/CIS.conf
Error: /Stage[main]/Cis_rhel7::Rule::Rule_1_1_18/File_line[(1.1.24) 
/etc/modprobe.d/CIS.conf - udf]: Could not evaluate: No such file or 
directory @ rb_sysopen - /etc/modprobe.d/CIS.conf
Info: Class[Cis_rhel7::Rule::Rule_1_1_18]: Unscheduling all events on 
Class[Cis_rhel7::Rule::Rule_1_1_18]

All my resources are have a resource default of NOOP, since Im doing a 
compliance check. Cant figure out how to make File_line only get applied if 
the file exists. 

-- 
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/dbcdf341-8f37-4a5a-a67e-a8150f34d949%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: cached file in module

2016-07-07 Thread mike r
using PE 2016.1.2 (4.4.2)



On Thursday, July 7, 2016 at 11:15:19 AM UTC-4, mike r wrote:
>
> Hi all, Im writing a module that serves a shell script located in 
> $basemodulepath/module/files/script.sh
>
> I recently had to update the shell script, but my agents are receiving the 
> old version of the script. 
>
> I checked the node's /opt/puppetlabs/puppet/cache but its not cached 
> there. Cant find a cached copy on the puppet master as well. 
>
> also checked /opt/puppetlabs/server on master and cached script isnt 
> there. 
>

-- 
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/c7130902-a0c6-4e52-a368-8cbcad710beb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] cached file in module

2016-07-07 Thread mike r
Hi all, Im writing a module that serves a shell script located in 
$basemodulepath/module/files/script.sh

I recently had to update the shell script, but my agents are receiving the 
old version of the script. 

I checked the node's /opt/puppetlabs/puppet/cache but its not cached there. 
Cant find a cached copy on the puppet master as well. 

also checked /opt/puppetlabs/server on master and cached script isnt there. 

-- 
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/f08f447f-3073-4ff2-b472-9da7de6b5758%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: notify behavior on a service Puppet 4.2.2

2016-06-20 Thread Mike Sharpton
Found the cause, it isn't notify or relationships.  It's the fact that the 
init script is no good.  It always exits zero even when it isn't running. 
 This does not help.  I had to use the hasstatus parameter.  All is well.

On Monday, June 20, 2016 at 10:55:06 AM UTC-5, Mike Sharpton wrote:
>
> Hey all,
>
> I have a simple chunk of code, in which if a file is changed, I notify a 
> service to restart.  This all works fine.  I had thought that notify is 
> simply just a notify that forces something to run.  I also thought that the 
> code that you are notifying will always run, regardless of the dependent 
> object being ran (even if the file doesn't change, the service code is 
> still executed).  In my testing, this does not appear to be the case.
>
> Code snip:
>
> file { 'something':source => 
> "puppet:///modules/${module_name}/something",path   => 
> "/somepath/something",mode   => "0755",owner  => "root",group  => 
> "root",ensure => "file",notify => Service['someservice'],  }  service 
> { 'someservice':enable   => 'true',ensure   => 'running',provider 
> => 'redhat',  }   
>
> What I am finding is that I can stop someservice above and do a puppet run. 
> The service is not started by Puppet.  The service block of code is not 
> executed at all unless file "something" changes.  Is this the expected 
> behavior?  I read the puppet doc and it doesn't get real clear on this.  I 
> would think the service code would always execute, but it appears the notify 
> relationship is stopping that from happening.
>
> Mike
>
>
>

-- 
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/8b822153-0817-4e54-a7bd-dd02bee09755%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Hiera lookup fail : doesan't find json file

2016-06-20 Thread Mike Sharpton
You would need to have sac in your hiera.yaml hierarchy unless you are 
defining this somewhere in a variable?  Is that what nt_location is?  Also, 
if you changed hiera.yaml, you have to restart puppetserver.

On Monday, June 20, 2016 at 7:52:21 AM UTC-5, chris wrote:
>
> Given this /etc/puppetlabs/code/hiera.yaml
>
>
> ---
> :backends: 
>   - json
> :hierarchy: 
>   - "%{hostname}.%{nt_environment}.%{nt_location}"
>   - "%{nt_type}.%{nt_environment}.%{nt_location}"
>   - "%{nt_type}.%{nt_environment}"
>   - "%{nt_environment}.%{nt_location}"
>   - "%{nt_environment}"
>   - "%{nt_location}"
>   - world
>   - default
> :logger: console # debug
> :json:
> :datadir: '/etc/puppetlabs/code/environments/%{::environment}/hieradata' 
> # this is the default anyway
>
> and there exists 
> /etc/puppetlabs/code/environments/prod/hieradata/sac.json, this cmd
>
>
> puppet lookup --debug icinga_servers --environment prod
>
>
> produces
>
>
> Debug: hiera(): Looking for data source puppetmaster.opsDebug: hiera(): 
> Looking for data source ops.sacDebug: hiera(): Looking for data source 
> opsDebug: hiera(): Looking for data source sacDebug: hiera(): Looking for 
> data source worldDebug: hiera(): Looking for data source default
>
> (& lots more of course).
>
>
> Why can't it find the 
> /etc/puppetlabs/code/environments/prod/hieradata/sac.json file which 
> contains the key I'm looking for ? 
> (Puppet server 2.4)
>
>
> Thanks
>
> Chris
>

-- 
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/e826ef72-f745-4c33-9117-0b686a282735%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: notify behavior on a service Puppet 4.2.2

2016-06-20 Thread Mike Sharpton
In looking more, it appears if you complete the relationsip with a require 
going the other way, it will run the service code each time.  Trying more 
things.

On Monday, June 20, 2016 at 10:55:06 AM UTC-5, Mike Sharpton wrote:
>
> Hey all,
>
> I have a simple chunk of code, in which if a file is changed, I notify a 
> service to restart.  This all works fine.  I had thought that notify is 
> simply just a notify that forces something to run.  I also thought that the 
> code that you are notifying will always run, regardless of the dependent 
> object being ran (even if the file doesn't change, the service code is 
> still executed).  In my testing, this does not appear to be the case.
>
> Code snip:
>
> file { 'something':source => 
> "puppet:///modules/${module_name}/something",path   => 
> "/somepath/something",mode   => "0755",owner  => "root",group  => 
> "root",ensure => "file",notify => Service['someservice'],  }  service 
> { 'someservice':enable   => 'true',ensure   => 'running',provider 
> => 'redhat',  }   
>
> What I am finding is that I can stop someservice above and do a puppet run. 
> The service is not started by Puppet.  The service block of code is not 
> executed at all unless file "something" changes.  Is this the expected 
> behavior?  I read the puppet doc and it doesn't get real clear on this.  I 
> would think the service code would always execute, but it appears the notify 
> relationship is stopping that from happening.
>
> Mike
>
>
>

-- 
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/794b093f-9f99-4b61-9f99-0372a72738ba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] notify behavior on a service Puppet 4.2.2

2016-06-20 Thread Mike Sharpton
Hey all,

I have a simple chunk of code, in which if a file is changed, I notify a 
service to restart.  This all works fine.  I had thought that notify is 
simply just a notify that forces something to run.  I also thought that the 
code that you are notifying will always run, regardless of the dependent 
object being ran (even if the file doesn't change, the service code is 
still executed).  In my testing, this does not appear to be the case.

Code snip:

file { 'something':source => "puppet:///modules/${module_name}/something",  
  path   => "/somepath/something",mode   => "0755",owner  => "root",
group  => "root",ensure => "file",notify => Service['someservice'],  }  
service { 'someservice':enable   => 'true',ensure   => 'running',
provider => 'redhat',  }   

What I am finding is that I can stop someservice above and do a puppet run. The 
service is not started by Puppet.  The service block of code is not executed at 
all unless file "something" changes.  Is this the expected behavior?  I read 
the puppet doc and it doesn't get real clear on this.  I would think the 
service code would always execute, but it appears the notify relationship is 
stopping that from happening.

Mike


-- 
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/d76188f0-0a4c-4498-85ad-5cca6c740375%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Augeas help

2016-06-10 Thread mike r
Hello, Im tryign to use Augeas in my manifest to manage /etc/fstab file

specifically I want to make sure my /etc/fstab file has the following line

/tmp /tmp nodev,noexec 0 0


Augeas syntax is like learning Chinese, Im trying to make my manifest 
figure out whether 

1) /etc/fstab has a line ^/tmp, if not add a new line with /tmp

2) if this line exists, then if it has nodev option, if not, append the 
'nodev' to this line (/tmp nodev)

3) if this line exists, check if noexec option is there, of not, append to 
the line (/tmp nodev, noexec)

anyone have idea how to actually write this out? 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/48405a04-ab52-4b78-bb05-64d4c3f59a1c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] PuppetDB Query based on facts

2016-06-03 Thread Mike Sharpton
I was messing around in psql to see if I could figure out the table 
structure and just query without the API wrapper, I couldn't before you 
replied.  Price is right losing horn.

On Friday, June 3, 2016 at 1:37:59 PM UTC-5, Mike Sharpton wrote:
>
> Doh!  Quotes matter, didn't think of it.  That appears to work, I grepped 
> and piped and have my list.  Thanks very much again, you have saved me work 
> twice now.  
>
> Mike
>
> On Friday, June 3, 2016 at 12:43:17 PM UTC-5, Wyatt Alt wrote:
>>
>> Mike,
>>
>> Where I was going with that is you might get results with
>>
>> curl -X GET http://localhost:8080/pdb/query/v4/nodes -d 'query=["and", 
>> ["=", ["fact", "operatingsystemmajrelease"], "7"], ["=", ["fact", "facta"], 
>> "true"]]'
>>
>> or
>>
>> curl -X GET http://localhost:8080/pdb/query/v4/nodes -d 'query=["and", 
>> ["=", ["fact", "operatingsystemmajrelease"], "7"], ["=", ["fact", "facta"], 
>> "True"]]'
>>
>> Let me know if one of those does it.
>>
>> Wyatt
>>
>>
>> On Fri, Jun 3, 2016 at 10:37 AM, Mike Sharpton <shar...@gmail.com> wrote:
>>
>>> Yep, the value of my fact is a string.  I will keep googling around to 
>>> see what I can find.  Thanks,
>>>
>>> Mike
>>>
>>>
>>> On Friday, June 3, 2016 at 11:31:28 AM UTC-5, Wyatt Alt wrote:
>>>>
>>>> Hey Mike, 
>>>>
>>>> I think operatingsystemmajrelease might be a string instead of an int, 
>>>> based on https://tickets.puppetlabs.com/browse/FACT-962. You also 
>>>> might 
>>>> verify that facta is valued with a real boolean instead of a 
>>>> stringified 
>>>> bool (the reference to casing made me wonder.) 
>>>>
>>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/puppet-users/08f94fe4-c922-4ead-aced-400212c7a058%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/puppet-users/08f94fe4-c922-4ead-aced-400212c7a058%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>>> 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/95fc0dbb-8c04-441f-97b3-1da4841b7f4f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] PuppetDB Query based on facts

2016-06-03 Thread Mike Sharpton
Doh!  Quotes matter, didn't think of it.  That appears to work, I grepped 
and piped and have my list.  Thanks very much again, you have saved me work 
twice now.  

Mike

On Friday, June 3, 2016 at 12:43:17 PM UTC-5, Wyatt Alt wrote:
>
> Mike,
>
> Where I was going with that is you might get results with
>
> curl -X GET http://localhost:8080/pdb/query/v4/nodes -d 'query=["and", 
> ["=", ["fact", "operatingsystemmajrelease"], "7"], ["=", ["fact", "facta"], 
> "true"]]'
>
> or
>
> curl -X GET http://localhost:8080/pdb/query/v4/nodes -d 'query=["and", 
> ["=", ["fact", "operatingsystemmajrelease"], "7"], ["=", ["fact", "facta"], 
> "True"]]'
>
> Let me know if one of those does it.
>
> Wyatt
>
>
> On Fri, Jun 3, 2016 at 10:37 AM, Mike Sharpton <shar...@gmail.com 
> > wrote:
>
>> Yep, the value of my fact is a string.  I will keep googling around to 
>> see what I can find.  Thanks,
>>
>> Mike
>>
>>
>> On Friday, June 3, 2016 at 11:31:28 AM UTC-5, Wyatt Alt wrote:
>>>
>>> Hey Mike, 
>>>
>>> I think operatingsystemmajrelease might be a string instead of an int, 
>>> based on https://tickets.puppetlabs.com/browse/FACT-962. You also might 
>>> verify that facta is valued with a real boolean instead of a stringified 
>>> bool (the reference to casing made me wonder.) 
>>>
>>> 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...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/puppet-users/08f94fe4-c922-4ead-aced-400212c7a058%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/puppet-users/08f94fe4-c922-4ead-aced-400212c7a058%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>> 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/3419859f-6b0b-4a70-adad-4e910fa7c74f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] PuppetDB Query based on facts

2016-06-03 Thread Mike Sharpton
Yep, the value of my fact is a string.  I will keep googling around to see 
what I can find.  Thanks,

Mike

On Friday, June 3, 2016 at 11:31:28 AM UTC-5, Wyatt Alt wrote:
>
> Hey Mike, 
>
> I think operatingsystemmajrelease might be a string instead of an int, 
> based on https://tickets.puppetlabs.com/browse/FACT-962. You also might 
> verify that facta is valued with a real boolean instead of a stringified 
> bool (the reference to casing made me wonder.) 
>
> 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/08f94fe4-c922-4ead-aced-400212c7a058%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] PuppetDB Query based on facts

2016-06-03 Thread Mike Sharpton
Wyatt,

Thanks for your reply.  I changed out my url and facta to my fact name, 
nothing is returned except this.

[ ]

To ensure it wasn't my fact that was messing this up, I tried another 
standard fact is_pe.  The value should be uppercase "False" but this 
returns a 500 when run that post/GET.

:8080/pdb/query/v4/nodes -d 'query=["and", ["=", ["fact", 
"operatingsystemmajrelease"], 7], ["=", ["fact", "is_pe"], False]]'

This returns nothing as well.  I have about 350 nodes of this type.

:8080/pdb/query/v4/nodes -d 'query=["and", ["=", ["fact", 
"operatingsystemmajrelease"], 7], ["=", ["fact", "is_pe"], false]]'

My fact value is lowercase as well, true is the value.  Any ideas?  

Thanks in advance,
Mike



On Friday, June 3, 2016 at 9:56:41 AM UTC-5, Wyatt Alt wrote:
>
> Hey Mike,
> I'm thinking you want something like this:
>
> curl -X GET http://localhost:8080/pdb/query/v4/nodes -d 'query=["and", 
> ["=", ["fact", "operatingsystemmajrelease"], 7], ["=", ["fact", "facta"], 
> true]]'
>
> Wyatt
>
>
>
> On Fri, Jun 3, 2016 at 6:40 AM, Mike Sharpton <shar...@gmail.com 
> > wrote:
>
>> Hey all,
>>
>> I am trying to do what should be a simple thing.  I need to query 
>> PuppetDB to gather a list of machines based on arbitrary facta being equal 
>> to true and the operatingsystemmajrelease fact being 7.  I have searched 
>> around and found a few examples, but can't get them to work properly.  I 
>> saw and example from Wyatt on here, but I must be doing something wrong as 
>> I can't even get that to run.  I have PuppetDB 3.2.0.
>>
>> I'm not sure if I should be running my query against this endpoint 
>> /pdb/query/v4/facts/, or drill into the facta uri and run a in/and against 
>> the operatingsystemmajrelease fact to get what I need.  All I need back is 
>> the certname of the machines in which facta is true and 
>> operatingsystemmajrelease is 7.  If someone has a quick one liner, it would 
>> be appreciated, otherwise I can bust out the data and filter it with 
>> Excel.  Thanks,
>>
>> Mike
>>
>> -- 
>> 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/5a1fec0e-1d02-442f-9465-9660a6087a8f%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/puppet-users/5a1fec0e-1d02-442f-9465-9660a6087a8f%40googlegroups.com?utm_medium=email_source=footer>
>> .
>> 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/5560a1c7-b2a9-482c-a1cd-e493b3dad2b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] PuppetDB Query based on facts

2016-06-03 Thread Mike Sharpton
Hey all,

I am trying to do what should be a simple thing.  I need to query PuppetDB 
to gather a list of machines based on arbitrary facta being equal to true 
and the operatingsystemmajrelease fact being 7.  I have searched around and 
found a few examples, but can't get them to work properly.  I saw and 
example from Wyatt on here, but I must be doing something wrong as I can't 
even get that to run.  I have PuppetDB 3.2.0.

I'm not sure if I should be running my query against this endpoint 
/pdb/query/v4/facts/, or drill into the facta uri and run a in/and against 
the operatingsystemmajrelease fact to get what I need.  All I need back is 
the certname of the machines in which facta is true and 
operatingsystemmajrelease is 7.  If someone has a quick one liner, it would 
be appreciated, otherwise I can bust out the data and filter it with Excel. 
 Thanks,

Mike

-- 
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/5a1fec0e-1d02-442f-9465-9660a6087a8f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Puppetserver crashes when using Code-Manager and file sync

2016-05-13 Thread mike r



env: PE2016.1, puppet 4.4.2 on Centos7x64 (VM), monolithic

PuppetMaster VM has 6GB of RAM with 4 CPUs

I recently setup and enabled Code Manager (Code Manager autoconfigure = 
True)

I am seeing lots of puppetserver crashes, cant startup my puppetserver due 
to java errors


[root@puppetmaster3 ~]# tail -f 
/var/log/puppetlabs/puppetserver/puppetserver.log
at clojure.lang.AFn.run(AFn.java:22) [puppet-server-release.jar:na]
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
[na:1.8.0_91]
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
[na:1.8.0_91]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91]
2016-05-13 12:54:37,715 INFO  [main] [p.t.internal] Beginning shutdown 
sequence
2016-05-13 12:54:37,722 INFO  [async-dispatch-2] 
[p.e.s.j.pe-jruby-metrics-service] PE JRuby Metrics Service: stopping 
metrics sampler job
2016-05-13 12:54:37,731 INFO  [async-dispatch-2] 
[p.e.s.j.pe-jruby-metrics-service] PE JRuby Metrics Service: stopped 
metrics sampler job
2016-05-13 12:54:37,738 INFO  [async-dispatch-2] 
[p.e.s.f.file-sync-client-service] Stopping file sync client service
2016-05-13 13:24:20,006 INFO  [main] [o.e.j.u.log] Logging initialized 
@149083ms
2016-05-13 14:25:48,102 INFO  [main] [o.e.j.u.log] Logging initialized 
@71630ms
2016-05-13 14:26:01,476 INFO  [async-dispatch-2] [p.t.s.w.jetty9-service] 
Initializing web server(s).
2016-05-13 14:26:01,781 INFO  [async-dispatch-2] 
[p.e.s.f.file-sync-storage-core] Initializing file sync server data dir: 
/opt/puppetlabs/server/data/puppetserver/filesync/storage
2016-05-13 14:26:01,817 INFO  [async-dispatch-2] 
[p.e.s.f.file-sync-storage-core] Initializing Git repository at 
/opt/puppetlabs/server/data/puppetserver/filesync/storage/puppet-code.git
2016-05-13 14:26:02,117 INFO  [async-dispatch-2] 
[p.e.s.f.file-sync-storage-service] File sync storage service mounting 
repositories at /file-sync-git
2016-05-13 14:26:03,455 INFO  [async-dispatch-2] 
[p.e.s.f.file-sync-storage-service] Registering file sync storage HTTP API
2016-05-13 14:26:03,461 INFO  [async-dispatch-2] [p.t.s.s.status-service] 
Registering status callback function for file-sync-storage-service service
2016-05-13 14:26:03,481 INFO  [async-dispatch-2] [p.c.services] Starting 
code-manager v1 API...
2016-05-13 14:26:03,520 INFO  [async-dispatch-2] [p.t.s.s.status-service] 
Registering status callback function for code-manager-service service
2016-05-13 14:26:03,931 INFO  [async-dispatch-2] [p.c.config] Writing r10k 
config to "/opt/puppetlabs/server/data/code-manager/r10k.yaml"
2016-05-13 14:26:04,124 INFO  [async-dispatch-2] [p.t.s.s.status-service] 
Registering status callback function for pe-puppet-profiler service
2016-05-13 14:26:04,178 INFO  [async-dispatch-2] 
[p.s.j.jruby-puppet-service] Initializing the JRuby service
2016-05-13 14:26:04,244 INFO  [async-dispatch-2] 
[p.s.p.puppet-admin-service] Starting Puppet Admin web app
2016-05-13 14:26:04,367 INFO  [clojure-agent-send-pool-0] 
[p.s.j.jruby-puppet-internal] Creating JRuby instance with id 1.
2016-05-13 14:26:32,728 WARN  [clojure-agent-send-pool-0] [puppet-server] 
Puppet Setting 'pluginsync' is deprecated.
   (at 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/defaults.rb:1623:in 
`handle')
2016-05-13 14:26:32,824 INFO  [clojure-agent-send-pool-0] [puppet-server] 
Puppet Puppet settings initialized; run mode: master
2016-05-13 14:26:36,743 INFO  [clojure-agent-send-pool-0] 
[p.s.j.jruby-puppet-agents] Finished creating JRubyPuppet instance 1 of 3
2016-05-13 14:26:36,744 INFO  [clojure-agent-send-pool-0] 
[p.s.j.jruby-puppet-internal] Creating JRuby instance with id 2.
2016-05-13 14:26:36,831 INFO  [async-dispatch-2] 
[p.s.c.puppet-server-config-core] Not overriding webserver settings with 
values from core Puppet
2016-05-13 14:26:36,872 INFO  [async-dispatch-2] 
[p.e.s.f.file-sync-client-service] Initializing file sync client service
2016-05-13 14:26:36,908 INFO  [async-dispatch-2] [p.t.s.s.status-service] 
Registering status callback function for file-sync-client-service service
2016-05-13 14:26:36,922 INFO  [async-dispatch-2] 
[p.e.s.f.file-sync-client-service] Registering file sync client HTTP API
2016-05-13 14:26:38,560 ERROR [async-dispatch-2] [p.t.internal] Error 
during service init!!!
java.lang.NullPointerException: null
at 
org.eclipse.jgit.internal.storage.file.UnpackedObjectCache$Table.index(UnpackedObjectCache.java:146)
 
~[puppet-server-release.jar:na]
at 
org.eclipse.jgit.internal.storage.file.UnpackedObjectCache$Table.contains(UnpackedObjectCache.java:109)
 
~[puppet-server-release.jar:na]
at 
org.eclipse.jgit.internal.storage.file.UnpackedObjectCache.isUnpacked(UnpackedObjectCache.java:64)
 
~[puppet-server-release.jar:na]
at 

[Puppet Users] Puppet Cheat Sheet - updated

2016-05-09 Thread mike r
new cheat sheet up,

https://perfecto25.wordpress.com/puppet/puppet-cheat-sheet/


-- 
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/f83edbd1-2a34-4a44-b627-b5c69c4e8e06%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] PuppetDB Issue with large array-valued fact

2016-04-26 Thread Mike Sharpton
Thanks Wyatt, I dropped it a while back after realizing how easy this was. 
 All is back now, and metrics are returning to normal.  The large facts are 
now gone and so are our issues.  :-)  I was wrong on the GC, it's at the 
default of one hour.  I was thinking node-ttl, which we set to 1 week. 
 Thanks again, case closed.

On Tuesday, April 26, 2016 at 3:49:13 PM UTC-5, Wyatt Alt wrote:
>
> Mike, 
>
> If you have no issue dropping and recreating the full database, that's 
> totally a workaround here (you know your requirements better than I, so 
> please don't take this as an endorsement of the approach :-) ). 
>
> To do this just stop PuppetDB, drop the puppetdb database, and recreate 
> the database with the options you want (the usual ones are described 
> here, but some people use different: 
> https://docs.puppet.com/puppetdb/latest/configure.html#using-postgresql), 
> and restart PuppetDB. 
>
> PuppetDB won't recreate the database for you but once that's in place 
> it'll create the tables/indices on startup. You may also consider 
> setting gc-interval to something less than 1 week, unless there's a good 
> reason for it being so long. A one-week interval will allow a lot of 
> time for bloat to build up. 
>
> 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/ef981bb8-6615-43fb-887b-ab3e2547a45b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Puppet install failure

2016-04-26 Thread Mike Sharpton
It appears have installed Puppet 3, not 4, this explains why the directory 
is not there. 

On Tuesday, April 26, 2016 at 2:40:41 PM UTC-5, Paul Trepanier wrote:
>
> Hi Folks,
>
> ..on CentOS 7
>
> # rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm
> # yum install puppet-server
> # puppet resource package puppet-server ensure=latest
>
> After doing this, there is NO /opt/puppetlabs directory.
>
> Any idea what the issue is?  All the docs say /opt/puppetlabs should be 
> there.
>
> [root@puppetmaster puppet]# yum list installed | grep -i pup
> facter.x86_64  1:2.4.6-1.el7   
> @puppetlabs-products
> hiera.noarch   1.3.4-1.el7 
> @puppetlabs-products
> puppet.noarch  3.8.6-1.el7 
> @puppetlabs-products
> puppet-server.noarch   3.8.6-1.el7 
> @puppetlabs-products
> puppetlabs-release.noarch  7-12   
>  installed
> ruby-augeas.x86_64 0.4.1-3.el7 
> @puppetlabs-deps
> ruby-shadow.x86_64 1:2.2.0-2.el7   
> @puppetlabs-deps
>
>
> Thanks!
>
> Paul
>

-- 
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/22b804a6-3523-45db-adf1-9e3f8de2ec17%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] PuppetDB Issue with large array-valued fact

2016-04-26 Thread Mike Sharpton
Besides, drop, and let it recreate I mean.

On Tuesday, April 26, 2016 at 11:50:09 AM UTC-5, Mike Sharpton wrote:
>
> Thanks Wyatt.  I see what you mean, this may take too long. What if I got 
> desperate and decided to just drop the entire PuppetDB.  Is there an easy 
> way to do this?  I really don't care about historical data as we use this 
> basically for monitoring of the environment.
>
> On Tuesday, April 26, 2016 at 10:45:40 AM UTC-5, Wyatt Alt wrote:
>>
>> Hey Mike, give this a shot (in a psql session): 
>>
>> begin; 
>> delete from facts where fact_path_id in (select id from fact_paths where 
>> name=any('{"disks", "partitions", "mountpoints"}')); 
>> delete from fact_paths where id not in (select fact_path_id from facts); 
>> delete from fact_values where id not in (select fact_value_id from 
>> facts); 
>> commit; 
>>
>>
>> If you hit a transaction rollback you may need to run it with PDB 
>> stopped. Those last two deletes may take some time since your 
>> gc-interval is long, so you should probably run it in tmux/screen or 
>> something. 
>>
>> 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/e6d088ae-a8b7-4a03-9d70-9d1871e1759d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] PuppetDB Issue with large array-valued fact

2016-04-26 Thread Mike Sharpton
Thanks Wyatt.  I see what you mean, this may take too long. What if I got 
desperate and decided to just drop the entire PuppetDB.  Is there an easy 
way to do this?  I really don't care about historical data as we use this 
basically for monitoring of the environment.

On Tuesday, April 26, 2016 at 10:45:40 AM UTC-5, Wyatt Alt wrote:
>
> Hey Mike, give this a shot (in a psql session): 
>
> begin; 
> delete from facts where fact_path_id in (select id from fact_paths where 
> name=any('{"disks", "partitions", "mountpoints"}')); 
> delete from fact_paths where id not in (select fact_path_id from facts); 
> delete from fact_values where id not in (select fact_value_id from facts); 
> commit; 
>
>
> If you hit a transaction rollback you may need to run it with PDB 
> stopped. Those last two deletes may take some time since your 
> gc-interval is long, so you should probably run it in tmux/screen or 
> something. 
>
> 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/fa7d0b01-49c2-4a6a-bb4c-8090f6024373%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] PuppetDB Issue with large array-valued fact

2016-04-26 Thread Mike Sharpton
Wyatt,

We implemented the code to make these facts be nothing.  We can see it 
working on nodes that are small, and it worked in our test environment. 
 However, we still have the issue that it cannot replace facts as PuppetDB 
still chokes on emptying the facts for the nodes with large facts.  I tried 
to deactivating a node, but it still exists in the DB obviously until GC 
happens (a week for me).  This is too long.  Is there a query I can run to 
wipe out all these facts in the PuppetDB?  I don't care about them anyway. 
 Thanks again in advance.

Mike

On Tuesday, April 19, 2016 at 10:49:27 PM UTC-5, Wyatt Alt wrote:
>
>
>
> On 04/19/2016 10:39 AM, Mike Sharpton wrote:
>
>  Again,* thank you* very much.  If I could buy you a beer, I would.  The 
> machines in question are a mix of RHEL5/6/7.
>
> Hah, you're very welcome. Thanks for confirming the OS; that means this 
> isn't just a Solaris issue like that facter ticket suggests.
>
>

-- 
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/d20f930b-96da-4fc4-80d7-c432b3552eb4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] PuppetDB Issue with large array-valued fact

2016-04-19 Thread Mike Sharpton
Wyatt,

Thank you very much for your time and reply.  I greatly appreciate it.  I 
ran your query and your suspicions are correct.  Some DB servers lead the 
pack with a massive amount of data due to all the disk that is there.  We 
will probably just make these facts nil on all machines as we don't need 
them.  I would assume this will relieve the strain on PuppetDB and remove 
the resets/etc.  Again,* thank you* very much.  If I could buy you a beer, 
I would.  The machines in question are a mix of RHEL5/6/7.

Mike

On Tuesday, April 19, 2016 at 10:53:28 AM UTC-5, Wyatt Alt wrote:
>
> Hey Mike, 
>
> The unsatisfying answer is that PuppetDB handles giant facts 
> (particularly array-valued facts) pretty badly right now, and facter's 
> disks, partitions, and mountpoints facts can all get pretty huge in 
> cases such as SANs and similar. Can you try and see if the bulk of those 
> fact paths are coming from a small set of your nodes? I expect this 
> query might help: 
>
> https://gist.github.com/wkalt/4a58b9a97c79eee31971e5fc04dec0e4 
>
> You can mask the facts on a per-node basis by creating a custom fact 
> with value nil and weight 100 as described here: 
>
> https://docs.puppet.com/facter/3.1/custom_facts.html#fact-precedence 
>
> (this assumes you aren't using these facts for anything, but that sounds 
> like the case.) 
>
> Longer term, this is something we need to fix on our end. I created 
> https://tickets.puppetlabs.com/browse/PDB-2631 to track the issue. 
> https://tickets.puppetlabs.com/browse/FACT-1345 may also be related. 
>
> If you get those nodes tracked down, would you mind telling us the 
> operating system? 
>
> 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/e09f34ec-fe6e-4d9a-9149-239e666f633c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Puppet on windows ignoring puppet.conf

2016-04-19 Thread Mike Sharpton
Note sure if they changed the path with 1.4.1.  The path used to be what is 
below.  May want to try that.

C:\programdata\PuppetLabs\puppet\etc

On Tuesday, April 19, 2016 at 9:38:20 AM UTC-5, Mattis Haase wrote:
>
> Hello,
>
> we have been using puppet for unix machines for quite a while and it works 
> fine.
>
> I have installed the latest puppet-agent (1.4.1) on Windows Server 2012R2. 
> The installation went fine and the communication between the puppetmaster 
> and the client works.
>
> However, it uses the production environment, ignoring the environment 
> setting in:
>
> c:\program files\puppet labs\puppet\etc\puppet.conf
>
>
> It is worth noting that this folder did originally not exist. The folder 
> for the conf files was:
>
> c:\program files\puppet labs\puppet\puppet\conf
>
>
> However, all documentation points torwards the first folder. I put the 
> same puppet conf into these three folders:
>
> c:\program files\puppet labs\puppet\puppet\conf
> c:\program files\puppet labs\puppet\puppet\etc
> c:\program files\puppet labs\puppet\etc
>
>
> The contents of the file are this:
>
> # This file can be used to override the default puppet settings.
> # See the following links for more details on what settings are available:
> # - 
> https://docs.puppetlabs.com/puppet/latest/reference/config_important_settings.html
> # - 
> https://docs.puppetlabs.com/puppet/latest/reference/config_about_settings.html
> # - 
> https://docs.puppetlabs.com/puppet/latest/reference/config_file_main.html
> # - https://docs.puppetlabs.com/puppet/latest/reference/configuration.html
> [main]
> server=puppetmaster.develop.local
> environment=develop
>
>
> However, it still tries to pull from the production environment.
>  
>
> puppet.bat agent --configprint environment
> production
>
>
> I restarted the service, to no avail. 
>

-- 
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/51f8bdbc-875e-44a5-bbbf-4014e31b3ebc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] PuppetDB Issue with large array-valued fact

2016-04-19 Thread Mike Sharpton
Hello all,

We are running Puppet 4.2.2 and PuppetDB 3.2.0 with around 2400 nodes and 
growing.  I am noticing some bad behavior with our PuppetDB, which is only 
going to get worse if what is below is correct.  I see the error below in 
the puppetdb log.

* ERROR [p.p.mq-listener] [cfe52545-29f8-4538-bf32-6ed41922be90] [replace 
facts] Retrying after attempt 8, due to: org.postgresql.util.PSQLException: 
This connection has been closed.*
*org.postgresql.util.PSQLException: This connection has been closed.*


I see this in the postgres log

*incomplete message from client*

and I can see the command queue jumping up after the connection has been 
reset for obvious reasons.  

I searched around and found this article.

https://groups.google.com/forum/#!topic/puppet-users/o_4K-UcuTQQ

I can see that this may be causing the issue I am seeing as we have several 
large array-valued structured facts. 


* count |name*
*---+*
* 26848 | partitions*
* 26014 | disks*
*  6141 | mountpoints*
*   494 | networking*
*   133 | processors*
*22 | os*
*15 | memory*
*14 | dmi*
*13 | ssh*
* 9 | dhcp_servers*
* 5 | system_uptime*
* 5 | identity*
* 4 | ruby*
* 4 | load_average*s



I can't get rid of these facts out of the box.  There doesn't seem to be 
anyway to filter facts, which is what it appears I need to do.  This fact 
also clutters PuppetBoard heavily.  Anyone ran into this issue before and 
found a way around it, or how to fix it?  Thanks in advance,

Mike




-- 
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/5e503d08-ee8b-426b-81a7-ae06e06b01c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppetdb garbage collection failing

2016-04-19 Thread Mike Sharpton
Hello Wyatt, 

I think I have ran into an issue with large structured facts.  I posted a 
new message about it, but I was wondering if you have a solution for large 
partitions and disks facts?  I am not sure what to do as I cannot disable 
facts, and I have a large number of nodes.  Your help is appreciated. 
 Thanks,

Mike

On Monday, September 28, 2015 at 12:41:43 PM UTC-5, 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...@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?utm_medium=email_source=footer>
> 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/a8edf4e5-184f-455e-9547-e10aaea6f388%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] referencing boolean within puppet manifest

2016-04-13 Thread Mike Reed
Thank you for the explanation Garrett.  I've seen similar things like that 
in my web searches but failed to put it all together.

I'll roll with this until we upgrade to 4.0

Cheers,

Mike

On Tuesday, April 12, 2016 at 6:31:47 PM UTC-7, Garrett Honeycutt wrote:
>
> On 4/12/16 2:53 PM, Mike Reed wrote: 
> > Hello all, 
> > 
> > I've recently experienced some inconsistencies around referencing 
> > Boolean values within a puppet manifest.  We've written some custom 
> > Boolean facts and we look to the true/false values within our manifests 
> > to help make decisions on what should or shouldn't be done. 
> > 
> > The issue I have is the different behavior I see when referencing the 
> > fact value.  For instance, in some cases I have to reference the Boolean 
> > value with quotes (ie.. 'true') in order to get things working right. 
> >  In other cases, removing the quotes returns the results I would expect. 
> > 
> > I understand that this is most likely due to what the fact is returning 
> > but I was wondering if there's a 'best practice' for approaching 
> > something like this.  I've also played around with stringify_facts and 
> > achieved varied results (in terms of referencing the Boolean values) and 
> > that may have only confused me.   
> > 
> > We're currently running: Puppet v:3.8.6/Hiera v:1.3.4 
> > 
> > I realize this question touches on a few different things but does 
> > anybody have a brief explanation for how I might consistently reference 
> > these Boolean values throughout our puppet infrastructure?   
> > 
> > Here's an example of a custom fact that we use: 
> > 
> > require 'facter' 
> > 
> > Facter.add(:nvidia_installed) do 
> >   setcode do 
> > tools_test = Facter::Util::Resolution.exec("/usr/bin/nvidia-smi") 
> > if tools_test 
> >   nvidia_installed = true 
> > else 
> >   nvidia_installed = false 
> > end 
> >   end 
> > end 
> > 
> > In order to reference this particular value within my manifest, I have 
> > to reference the value without quotes:   elsif ($::class == 
> > 'render_workstation') and ($::nvidia_installed == false) { 
> > 
> > As always, thank you in advance for the help and support. 
> > 
> > Cheers, 
> > 
> > Mike 
> > 
>
> Hi Mike, 
>
> Booleans such as true vs. stringified booleans such as 'true' have long 
> been a sore spot within the Puppet ecosystem. 
>
> You want to set stringify_facts = false in your puppet.conf. This will 
> allow you to have other data types as facts such as booleans, arrays, 
> and hashes. 
>
> Recommend using this design pattern to deal with stringified booleans in 
> Puppet v3. 
>
>   if is_string($my_param) == true { 
> $my_param_bool = str2bool($my_param) 
>   } else { 
> $my_param_bool = $my_param 
>   } 
>   validate_bool($my_param_bool) 
>
> So given the param, $my_param, this will ensure it is an actual boolean. 
> In your code you reference $my_param_bool instead of $my_param. 
>
>
> Best regards, 
> -g 
>
> -- 
> Garrett Honeycutt 
> @learnpuppet 
> Puppet Training with LearnPuppet.com 
> Mobile: +1.206.414.8658 
>

-- 
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/a3a388d6-c037-4029-bdf3-d4abed521f1e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] referencing boolean within puppet manifest

2016-04-12 Thread Mike Reed
Hello all,

I've recently experienced some inconsistencies around referencing Boolean 
values within a puppet manifest.  We've written some custom Boolean facts 
and we look to the true/false values within our manifests to help make 
decisions on what should or shouldn't be done.

The issue I have is the different behavior I see when referencing the fact 
value.  For instance, in some cases I have to reference the Boolean value 
with quotes (ie.. 'true') in order to get things working right.  In other 
cases, removing the quotes returns the results I would expect.

I understand that this is most likely due to what the fact is returning but 
I was wondering if there's a 'best practice' for approaching something like 
this.  I've also played around with stringify_facts and achieved varied 
results (in terms of referencing the Boolean values) and that may have only 
confused me.  

We're currently running: Puppet v:3.8.6/Hiera v:1.3.4

I realize this question touches on a few different things but does anybody 
have a brief explanation for how I might consistently reference these 
Boolean values throughout our puppet infrastructure?  

Here's an example of a custom fact that we use:

require 'facter'

Facter.add(:nvidia_installed) do
  setcode do
tools_test = Facter::Util::Resolution.exec("/usr/bin/nvidia-smi")
if tools_test
  nvidia_installed = true
else
  nvidia_installed = false
end
  end
end

In order to reference this particular value within my manifest, I have to 
reference the value without quotes:   elsif ($::class == 
'render_workstation') and ($::nvidia_installed == false) {

As always, thank you in advance for the help and support.

Cheers,

Mike


-- 
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/24c74385-59e2-4610-8915-0ead4ac52e72%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: PE Puppet Server startup error - .git removed

2016-04-09 Thread mike r
figured out the problem, was missing a .git file in 
my /etc/puppetlabs/code/environments/production path


[root@puppetmaster3 production]# pwd
/etc/puppetlabs/code/environments/production
[root@puppetmaster3 production]# ll
total 12
drwxr-xr-x.  4 pe-puppet pe-puppet   70 Apr  5 09:01 .
drwxr-xr-x.  4 pe-puppet pe-puppet   34 Apr  5 09:03 ..
-rw-r--r--.  1 pe-puppet pe-puppet  879 Apr  4 23:49 environment.conf
-rw-r--r--.  1 pe-puppet pe-puppet  112 Apr  4 23:48 .git
drwxr-xr-x.  2 pe-puppet pe-puppet   20 Apr  5 14:42 manifests
drwxr-xr-x. 19 root  root  4096 Apr  5 10:41 modules
[root@puppetmaster3 production]# cat .git
gitdir: 
/opt/puppetlabs/server/data/puppetserver/filesync/client/puppet-code.git/modules/environments/production[root@puppetmaster3
 
production]# 





On Friday, April 8, 2016 at 2:20:48 PM UTC-4, mike r wrote:
>
> Hi all, trying to startup my PE 4.2 server, its complaining about a .git 
> missing from puppet-code
>
>
> from puppetserver.conf
>
>
>
> 2016-04-08 13:53:34,273 INFO  [main] [o.e.j.u.log] Logging initialized 
> @13448ms
> 2016-04-08 13:53:36,189 INFO  [main] [p.t.s.w.jetty9-service] Initializing 
> web server(s).
> 2016-04-08 13:53:36,288 INFO  [main] [p.t.s.s.status-service] Registering 
> status callback function for pe-puppet-profiler service
> 2016-04-08 13:53:36,293 INFO  [main] [p.s.j.jruby-puppet-service] 
> Initializing the JRuby service
> 2016-04-08 13:53:36,349 INFO  [main] [p.t.s.s.status-service] Registering 
> status callback function for pe-jruby-metrics service
> 2016-04-08 13:53:36,388 INFO  [main] [p.s.p.puppet-admin-service] Starting 
> Puppet Admin web app
> 2016-04-08 13:53:50,415 INFO  [clojure-agent-send-pool-0] [puppet-server] 
> Puppet Puppet settings initialized; run mode: master
> 2016-04-08 13:53:51,344 INFO  [clojure-agent-send-pool-0] 
> [p.s.j.jruby-puppet-agents] Finished creating JRubyPuppet instance 1 of 1
> 2016-04-08 13:53:51,357 INFO  [main] [p.s.c.puppet-server-config-core] Not 
> overriding webserver settings with values from core Puppet
> 2016-04-08 13:53:51,358 INFO  [main] [p.e.s.f.file-sync-client-service] 
> Initializing file sync client service
> 2016-04-08 13:53:51,372 INFO  [main] [p.e.s.f.file-sync-client-service] 
> Registering file sync client HTTP API
> 2016-04-08 13:53:51,373 INFO  [main] [p.t.s.s.status-service] Registering 
> status callback function for file-sync-client-service service
> *2016-04-08 13:53:53,260 ERROR [main] [p.t.internal] Error during service 
> init!!!*
> *clojure.lang.ExceptionInfo: throw+: {:type 
> ":puppetlabs.enterprise.file-sync-errors/submodule-error", :repo-name 
> "puppet-code", :repo-path 
> "/opt/puppetlabs/server/data/puppetserver/filesync/client/puppet-code.git", 
> :submodule-path "environments/production", :live-dir 
> "/etc/puppetlabs/code", :message "Submodule environments/production of 
> repository puppet-code has had its .git file removed. Please delete all of 
> the files (including hidden files) in the live directory at 
> /etc/puppetlabs/code and perform another commit on the storage server to 
> restore the contents of the live directory to the correct state."}*
> at 
> puppetlabs.enterprise.services.file_sync_client.file_sync_client_core$eval17850$dirty_submodules__17851$fn__17852$fn__17853.invoke(file_sync_client_core.clj:676)
>  
> ~[na:na]
> at clojure.core.protocols$fn__6086.invoke(protocols.clj:143) 
> ~[puppet-server-release.jar:na]
> at clojure.core.protocols$fn__6057$G__6052__6066.invoke(protocols.clj:19) 
> ~[puppet-server-release.jar:na]
> at clojure.core.protocols$seq_reduce.invoke(protocols.clj:31) 
> ~[puppet-server-release.jar:na]
> at clojure.core.protocols$fn__6080.invoke(protocols.clj:48) 
> ~[puppet-server-release.jar:na]
>
>
> My modulepath has a git repo where I track all my changes to a repo on 
> github,
>
> [root@puppetmaster3 code]# pwd
> /etc/puppetlabs/code
> [root@puppetmaster3 code]# ls -a
> .  ..  environments * .git*  .gitmodules  hieradata  hiera.yaml
> [root@puppetmaster3 code]# 
>
>
> puppet-code.git is also there, 
> /opt/puppetlabs/server/data/puppetserver/filesync/client
> [root@puppetmaster3 client]# ls -a
> .  ..  puppet-code  puppet-code.git
> [root@puppetmaster3 client]# 
>
> Why is it asking me to delete my /etc/puppetlabs/code directory?
>

-- 
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/5e5ff2af-aa07-4109-96ec-a245d1e0c0d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] PE Puppet Server startup error - .git removed

2016-04-08 Thread mike r
Hi all, trying to startup my PE 4.2 server, its complaining about a .git 
missing from puppet-code


from puppetserver.conf



2016-04-08 13:53:34,273 INFO  [main] [o.e.j.u.log] Logging initialized 
@13448ms
2016-04-08 13:53:36,189 INFO  [main] [p.t.s.w.jetty9-service] Initializing 
web server(s).
2016-04-08 13:53:36,288 INFO  [main] [p.t.s.s.status-service] Registering 
status callback function for pe-puppet-profiler service
2016-04-08 13:53:36,293 INFO  [main] [p.s.j.jruby-puppet-service] 
Initializing the JRuby service
2016-04-08 13:53:36,349 INFO  [main] [p.t.s.s.status-service] Registering 
status callback function for pe-jruby-metrics service
2016-04-08 13:53:36,388 INFO  [main] [p.s.p.puppet-admin-service] Starting 
Puppet Admin web app
2016-04-08 13:53:50,415 INFO  [clojure-agent-send-pool-0] [puppet-server] 
Puppet Puppet settings initialized; run mode: master
2016-04-08 13:53:51,344 INFO  [clojure-agent-send-pool-0] 
[p.s.j.jruby-puppet-agents] Finished creating JRubyPuppet instance 1 of 1
2016-04-08 13:53:51,357 INFO  [main] [p.s.c.puppet-server-config-core] Not 
overriding webserver settings with values from core Puppet
2016-04-08 13:53:51,358 INFO  [main] [p.e.s.f.file-sync-client-service] 
Initializing file sync client service
2016-04-08 13:53:51,372 INFO  [main] [p.e.s.f.file-sync-client-service] 
Registering file sync client HTTP API
2016-04-08 13:53:51,373 INFO  [main] [p.t.s.s.status-service] Registering 
status callback function for file-sync-client-service service
*2016-04-08 13:53:53,260 ERROR [main] [p.t.internal] Error during service 
init!!!*
*clojure.lang.ExceptionInfo: throw+: {:type 
":puppetlabs.enterprise.file-sync-errors/submodule-error", :repo-name 
"puppet-code", :repo-path 
"/opt/puppetlabs/server/data/puppetserver/filesync/client/puppet-code.git", 
:submodule-path "environments/production", :live-dir 
"/etc/puppetlabs/code", :message "Submodule environments/production of 
repository puppet-code has had its .git file removed. Please delete all of 
the files (including hidden files) in the live directory at 
/etc/puppetlabs/code and perform another commit on the storage server to 
restore the contents of the live directory to the correct state."}*
at 
puppetlabs.enterprise.services.file_sync_client.file_sync_client_core$eval17850$dirty_submodules__17851$fn__17852$fn__17853.invoke(file_sync_client_core.clj:676)
 
~[na:na]
at clojure.core.protocols$fn__6086.invoke(protocols.clj:143) 
~[puppet-server-release.jar:na]
at clojure.core.protocols$fn__6057$G__6052__6066.invoke(protocols.clj:19) 
~[puppet-server-release.jar:na]
at clojure.core.protocols$seq_reduce.invoke(protocols.clj:31) 
~[puppet-server-release.jar:na]
at clojure.core.protocols$fn__6080.invoke(protocols.clj:48) 
~[puppet-server-release.jar:na]


My modulepath has a git repo where I track all my changes to a repo on 
github,

[root@puppetmaster3 code]# pwd
/etc/puppetlabs/code
[root@puppetmaster3 code]# ls -a
.  ..  environments * .git*  .gitmodules  hieradata  hiera.yaml
[root@puppetmaster3 code]# 


puppet-code.git is also there, 
/opt/puppetlabs/server/data/puppetserver/filesync/client
[root@puppetmaster3 client]# ls -a
.  ..  puppet-code  puppet-code.git
[root@puppetmaster3 client]# 

Why is it asking me to delete my /etc/puppetlabs/code directory?

-- 
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/1f5542d0-7900-4e0e-b0d3-71df041c15e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Windows Remote Desktop Services (Could not find a suitable provider for dism)

2016-04-07 Thread mike r
I had the same error trying to run DISM module on a Win2008 box, then I 
realized win2008 doesnt have dism, only 2008 R2.

module is not compatible with target OS

On Wednesday, March 6, 2013 at 8:42:10 AM UTC-5, jim wrote:
>
> Hello all
>
> Was wondering if someone could help or advise where i'm going wrong 
>
> i'm trying to install Windows 2008 R2 Remote Desktop Services via Puppet 
> using either DISM or Powershell modules from the forge and getting the same 
> error
>
> When using DISM
>
>
> class roles::trm::remote_desktop_services {
> dism { 'AppServer':
> ensure => present,
> }
> dism { 'AppServer-UI':
> ensure => present,
> }
> dism { 'Printing-XPSServices-Features':
> ensure => present,
> }
> }
>
> when this initially runs, I get pink error messages which I assume its 
> because it requires a reboot to complete the install of this service.
>
> Question: Best approach for rebooting host, when installing features ?
>
> Once i've rebooted the host, and rerun the puppet agent I get the 
> following error:
>
> *err: Could not find a suitable provider for dism*
>
> So I thought it could be the dism module doesn't support Remote Desktop 
> Services.
>
> then tried the Powershell Module
>
> #exec { 'install_remote_desktop_services':
> #command   => 'Import-Module ServerManager
> #  Add-WindowsFeature -Name RDS-RD-Server -Restart  | 
> Out-File 
> c:\Installs\Puppet_Confirmation\install_remote_desktop_services.txt',
> #provider  => powershell,
> #creates   => 
> 'C:/Installs/Puppet_Confirmation/install_remote_desktop_services.txt',
> #}
>
>
> which installs fine and reboots the host etc, but upon running the agent 
> again, I get the same error as above:
>
> *err: Could not find a suitable provider for dism*
>
> If anyone could help, it would be much appreciated
>
> regards
>
> Jim 
>
>
>
>

-- 
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/8213641a-6d82-4b9a-ab6b-6ff843ab07e4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] unable to create home directory

2016-04-04 Thread Mike Hendon
In that case just have puppet create the directory if it doesn't already 
exist and ensure that the ownership is set correctly.
Then have the ssh_authorized_keys resource require the directory resource.

On Monday, 4 April 2016 14:23:11 UTC+1, Patrick G. wrote:
>
> I don't need to create the user just /home//.ssh because the 
> user exist in ldap.
> So how do I give access to puppet to create only /home/admin/.ssh
>
>
>
> Op vrijdag 1 april 2016 16:32:43 UTC+2 schreef Mike Hendon:
>>
>>
>> On Friday, 1 April 2016 14:34:01 UTC+1, jcbollinger wrote:
>>>
>>>
>>>
>>> On Thursday, March 31, 2016 at 9:34:04 AM UTC-5, Warron French wrote:
>>>>
>>>> Isn't .ssh created after the first time a user attempts an SSH outbound 
>>>> connection, not at initial creation of homedirs?
>>>>
>>>
>>> Inasmuch as we seem to be talking about OpenSSH or a work-alike, yes, 
>>> the ssh client creates the .ssh/ directory automatically at need.  In no 
>>> way does that mean it cannot or should not be created by another mechanism, 
>>> however.  The directory needs to exist so that Puppet can manage an 
>>> authorized key entry within.  If it does not already exist at the time of 
>>> the catalog run, then Puppet needs to create it.  Puppet is trying to do 
>>> so, but failing.
>>>
>>>
>>> John
>>>
>>>
>> To create the admin home directory first the ssh key resource should be 
>> dependent on an admin user resource. 
>>
>

-- 
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/d40118b0-887a-4324-ad5e-d2e97c878753%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] MCO fails to listen to puppetmaster AMQ

2016-04-01 Thread mike r
HI all, Im playing around with PE 4.2, trying to learn MCO architecture

I have 1 PE master on Ubuntu with AMQ broker
1 test node running Centos7 with PE agent
1 test node running Centos 5.7 with Open source puppet agent

first question, is it possible to enable the open source puppet agent to 
talk to PE AMQ broker? Or can PE Master talk and manage PE agents only?

2nd question:
my Centos7 (with PE agent) is setup correctly, I can run "mco ping" from PE 
Master and Centos7 replies back

on Centos5, I installed mcollective rpm on this Centos5 node and configured 
my certs and priv/pub keys

[root@centos57 ssl]# pwd
/etc/mcollective/ssl

[root@centos57 ssl]# tree
.
|-- ca.cert.pem
|-- centos57.cert.pem
|-- centos57.private_key.pem
|-- clients
|   |-- peadmin-public.pem
|   `-- puppet-dashboard-public.pem
|-- mcollective-private.pem
`-- mcollective-public.pem

1 directory, 7 files


I copied the* centos57.cert.pem, centos57.private_key.pem *files from the 
/var/lib/puppet/ssl dir. This node however isnt talking to Puppetmaster, 

cat /var/log/mcollective.log

I, [2016-04-01T21:58:14.535657 #5270]  INFO -- : activemq.rb:129:in 
`on_connectfail' TCP Connection to 
stomp+ssl://mcollective@puppetmaster2:61613 failed on attempt 42
E, [2016-04-01T21:58:44.537839 #5270] ERROR -- : activemq.rb:149:in 
`on_ssl_connectfail' SSL session creation with 
stomp+ssl://mcollective@puppetmaster2:61613 failed: nested asn1 error
I, [2016-04-01T21:58:44.538121 #5270]  INFO -- : activemq.rb:129:in 
`on_connectfail' TCP Connection to 
stomp+ssl://mcollective@puppetmaster2:61613 failed on attempt 43
E, [2016-04-01T21:59:14.539604 #5270] ERROR -- : activemq.rb:149:in 
`on_ssl_connectfail' SSL session creation with 
stomp+ssl://mcollective@puppetmaster2:61613 failed: nested asn1 error
I, [2016-04-01T21:59:14.539953 #5270]  INFO -- : activemq.rb:129:in 
`on_connectfail' TCP Connection to 
stomp+ssl://mcollective@puppetmaster2:61613 failed on attempt 44
E, [2016-04-01T21:59:44.541296 #5270] ERROR -- : activemq.rb:149:in 
`on_ssl_connectfail' SSL session creation with 
stomp+ssl://mcollective@puppetmaster2:61613 failed: nested asn1 error
I, [2016-04-01T21:59:44.541629 #5270]  INFO -- : activemq.rb:129:in 
`on_connectfail' TCP Connection to 
stomp+ssl://mcollective@puppetmaster2:61613 failed on attempt 45
E, [2016-04-01T22:00:14.543349 #5270] ERROR -- : activemq.rb:149:in 
`on_ssl_connectfail' SSL session creation with 
stomp+ssl://mcollective@puppetmaster2:61613 failed: nested asn1 error
I, [2016-04-01T22:00:14.543682 #5270]  INFO -- : activemq.rb:129:in 
`on_connectfail' TCP Connection to 
stomp+ssl://mcollective@puppetmaster2:61613 failed on attempt 46

my Centos57 mcollective server.cfg is setup like this

main_collective = mcollective
collectives = mcollective
libdir = /usr/libexec/mcollective
logfile = /var/log/mcollective.log
loglevel = info
daemonize = 1

# Plugins
securityprovider = psk
plugin.psk = unset

connector = activemq
plugin.activemq.pool.size = 1
plugin.activemq.pool.1.host = puppetmaster2
plugin.activemq.pool.1.port = 61613
plugin.activemq.pool.1.user = mcollective
plugin.activemq.pool.1.password = gKtrMuPIK5k3Fh621FYX
plugin.activemq.pool.1.ssl = true
plugin.activemq.pool.1.ssl.ca = /etc/mcollective/ssl/ca.cert.pem
plugin.activemq.pool.1.ssl.cert = /etc/mcollective/ssl/centos57.cert.pem
plugin.activemq.pool.1.ssl.key = 
/etc/mcollective/ssl/centos57.private_key.pem
plugin.activemq.heartbeat_interval = 120
plugin.activemq.max_hbrlck_fails = 0

# Security plugin settings (required):
# ---
securityprovider   = ssl

# SSL plugin settings:
plugin.ssl_server_private  = /etc/mcollective/ssl/mcollective-private.pem
plugin.ssl_server_public   = /etc/mcollective/ssl/mcollective-public.pem
plugin.ssl_client_cert_dir = /etc/mcollective/ssl/clients
plugin.ssl_serializer  = yaml

# Facts
factsource = yaml
plugin.yaml = /etc/mcollective/facts.yaml

identity = centos57

Trying to understand what other config Im missing on my Centos57 box to 
make it listen to PE Master AMQ broker. 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/9a7becdb-2e65-4ca1-bd33-badbaf2c8d06%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] unable to create home directory

2016-04-01 Thread Mike Hendon

On Friday, 1 April 2016 14:34:01 UTC+1, jcbollinger wrote:
>
>
>
> On Thursday, March 31, 2016 at 9:34:04 AM UTC-5, Warron French wrote:
>>
>> Isn't .ssh created after the first time a user attempts an SSH outbound 
>> connection, not at initial creation of homedirs?
>>
>
> Inasmuch as we seem to be talking about OpenSSH or a work-alike, yes, the 
> ssh client creates the .ssh/ directory automatically at need.  In no way 
> does that mean it cannot or should not be created by another mechanism, 
> however.  The directory needs to exist so that Puppet can manage an 
> authorized key entry within.  If it does not already exist at the time of 
> the catalog run, then Puppet needs to create it.  Puppet is trying to do 
> so, but failing.
>
>
> John
>
>
To create the admin home directory first the ssh key resource should be 
dependent on an admin user resource. 

-- 
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/73f22c33-579e-4853-852a-b1f1ac31d9f0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] facter value - not returning expected result

2016-03-24 Thread Mike Reed
Hey Peter,

In the original code you provided me, the '$?' was the thing that was 
confusing me.  After some reading (and realizing my stupidity), I 
understand now that whatever is returned from #exec is what's passed to the 
block as the return value.  If I run my #exec on from a bash shell, after a 
successful run, I am returned the domain name (as that's what I'm grepping 
out).  Obviously, the returned domain name is not a boolean and thus, I'm 
comparing a string to a boolean value.

As you stated, it looks like my only option of getting the exit code is via 
'$?' so that's what I'll roll with.

Again, thank you very much.  I owe you a beer.

Cheers mate,

Mike.

On Thursday, March 24, 2016 at 4:08:09 PM UTC-7, Peter Huene wrote:
>
> Hi Mike,
>
> On Thu, Mar 24, 2016 at 3:58 PM, Mike Reed <mjohn...@gmail.com 
> > wrote:
>
>> Hey Peter,
>>
>> I've done some additional reading and I believe I understand what's 
>> happening now.   
>>
>> Thank you very much for the information and help.
>>
>
> Glad you got things working; let me know if there are any other questions 
> that come up.  
>  
>
>>
>> Cheers,
>>
>> Mike
>>
>>
>> On Thursday, March 24, 2016 at 2:25:38 PM UTC-7, Mike Reed wrote:
>>>
>>> Hey Peter,
>>>
>>> Thank you for the reply and the information.
>>>
>>> In terms of the piped greps, the second  string is actually our 
>>> internal domain name (which I removed and replaced with ) for 
>>> security sake.
>>>
>>> I'm a little confused by code above as I'm still not getting what I 
>>> would expect from your code above.  I think part of my confusion is how the 
>>> recommended code gives me a true/false value.  I've changed the fact to now 
>>> look like this:
>>>
>>> require 'facter'
>>>
>>> Facter.add(:pbis_joined) do
>>>   setcode do
>>>   !Facter::Util::Resolution.exec(%q{/opt/pbis/bin/domainjoin-cli 
>>> query | grep -i 'domain' | grep -i ''}).nil? && $?.success?
>>>   end
>>> end
>>>
>>> The issue I'm seeing is that on a machine that is added to the domain, I 
>>> would expect the /opt/pbis...command to return true (as evidenced by the 
>>> exit status of zero on the command line).  However, upon running this new 
>>> fact, I get a value of: pbis_joined => false; even though I know the 
>>> machine is on the domain and running the command manually does give me an 
>>> exit status of '0' on this particular machine.  
>>>
>>> I tried this new fact on another machine that I know is not joined to 
>>> the domain and I do get a 'false' on that box.  
>>>
>>> If the problem is that #exec returns nil or a string; and being that I'm 
>>> looking to evaluate against an integer, could I not just do something like 
>>> 'domain_return.to_i' in the original code? 
>>>
>>
> I wasn't very clear on what #exec returns: the string it returns is the 
> stdout output of the executed process as a string; thus it would not 
> contain a representation of the exit code as you've already surmised.
>
> Unfortunately, right now Ruby's built-in `$?` global variable is the only 
> way of getting at the exit code from the executed process with the way the 
> Facter execution API is currently defined.
>  
>
>>
>>> I wanted to thank you again for your help.  It is very much appreciated.
>>>
>>> Cheers,
>>>
>>> Mike
>>>
>>>
>>>
>>> On Thursday, March 24, 2016 at 1:06:48 PM UTC-7, Peter Huene wrote:
>>>>
>>>> Hi Mike,
>>>>
>>>> On Thu, Mar 24, 2016 at 12:30 PM, Mike Reed <mjohn...@gmail.com> wrote:
>>>>
>>>>> Hey Peter,
>>>>>
>>>>> Thank you for the reply.
>>>>>
>>>>> If I run the command on a machine that I know is 'joined' to the 
>>>>> domain and run 'echo $?' immediately after, I get a return of '0'.  
>>>>>
>>>>
>>>> If you're going solely off of grep's exit status, try this:
>>>>
>>>> ```
>>>> Facter.add(:pbis_joined) do
>>>>   setcode do
>>>>   !Facter::Util::Resolution.exec(%q{/opt/pbis/bin/domainjoin-cli 
>>>> query | grep -i 'domain' | grep -i ''}).nil? && $?.success?
>>>>   end
>>>> end
>>>> ```
>>>>
>>>> Breaking that down:
>>>>
>>>> ```
>>>> !Fac

Re: [Puppet Users] facter value - not returning expected result

2016-03-24 Thread Mike Reed
Hey Peter,

I've done some additional reading and I believe I understand what's 
happening now.   

Thank you very much for the information and help.

Cheers,

Mike

On Thursday, March 24, 2016 at 2:25:38 PM UTC-7, Mike Reed wrote:
>
> Hey Peter,
>
> Thank you for the reply and the information.
>
> In terms of the piped greps, the second  string is actually our 
> internal domain name (which I removed and replaced with ) for 
> security sake.
>
> I'm a little confused by code above as I'm still not getting what I would 
> expect from your code above.  I think part of my confusion is how the 
> recommended code gives me a true/false value.  I've changed the fact to now 
> look like this:
>
> require 'facter'
>
> Facter.add(:pbis_joined) do
>   setcode do
>   !Facter::Util::Resolution.exec(%q{/opt/pbis/bin/domainjoin-cli query 
> | grep -i 'domain' | grep -i ''}).nil? && $?.success?
>   end
> end
>
> The issue I'm seeing is that on a machine that is added to the domain, I 
> would expect the /opt/pbis...command to return true (as evidenced by the 
> exit status of zero on the command line).  However, upon running this new 
> fact, I get a value of: pbis_joined => false; even though I know the 
> machine is on the domain and running the command manually does give me an 
> exit status of '0' on this particular machine.  
>
> I tried this new fact on another machine that I know is not joined to the 
> domain and I do get a 'false' on that box.  
>
> If the problem is that #exec returns nil or a string; and being that I'm 
> looking to evaluate against an integer, could I not just do something like 
> 'domain_return.to_i' in the original code? 
>
> I wanted to thank you again for your help.  It is very much appreciated.
>
> Cheers,
>
> Mike
>
>
>
> On Thursday, March 24, 2016 at 1:06:48 PM UTC-7, Peter Huene wrote:
>>
>> Hi Mike,
>>
>> On Thu, Mar 24, 2016 at 12:30 PM, Mike Reed <mjohn...@gmail.com> wrote:
>>
>>> Hey Peter,
>>>
>>> Thank you for the reply.
>>>
>>> If I run the command on a machine that I know is 'joined' to the domain 
>>> and run 'echo $?' immediately after, I get a return of '0'.  
>>>
>>
>> If you're going solely off of grep's exit status, try this:
>>
>> ```
>> Facter.add(:pbis_joined) do
>>   setcode do
>>   !Facter::Util::Resolution.exec(%q{/opt/pbis/bin/domainjoin-cli 
>> query | grep -i 'domain' | grep -i ''}).nil? && $?.success?
>>   end
>> end
>> ```
>>
>> Breaking that down:
>>
>> ```
>> !Facter::Util::Resolution.exec(%q{/opt/pbis/bin/domainjoin-cli query | 
>> grep -i 'domain' | grep -i ''}).nil?
>> ```
>>
>> This runs the command and ensures #exec doesn't return nil (which will 
>> happen if it failed to execute the command, e.g. command not found).
>>
>> ```
>> $?.success?
>> ```
>>
>> This ensures the executed process exited with a zero exit code (i.e. $? 
>> in a shell == 0).
>>
>> On an aside: do you need the piped greps?  Seems like the latter grep 
>> would be all that's needed assuming you're looking for just "", 
>> unless you intended this to be either "domain" or "", which won't 
>> work as currently constructed.
>>  
>>
>>>
>>> Thank you again,
>>>
>>> Mike
>>>
>>> On Thursday, March 24, 2016 at 12:13:53 PM UTC-7, Peter Huene wrote:
>>>>
>>>> Hi Mike,
>>>>
>>>> On Thu, Mar 24, 2016 at 11:59 AM, Mike Reed <mjohn...@gmail.com> wrote:
>>>>
>>>>> Hey all,
>>>>>
>>>>> I'm a little stumped on why this fact is returning the incorrect value 
>>>>> and I was hoping somebody would have some advice on this one.
>>>>>
>>>>> The fact is very basic and looks like this:
>>>>>
>>>>> # custom fact for detecting if machine is joined to the domain
>>>>> require 'facter'
>>>>>
>>>>> Facter.add(:pbis_joined) do
>>>>>   setcode do
>>>>>   domain_check = %q{/opt/pbis/bin/domainjoin-cli query | grep -i 
>>>>> 'domain' | grep -i ''}
>>>>> domain_return = Facter::Util::Resolution.exec(domain_check)
>>>>> if domain_return == 0
>>>>>
>>>>
>>>> Facter::Util::Resolution.exec returns the command's output as a string 
>>>> or nil if the command failed.  Thus, I would expect this conditional 
&

Re: [Puppet Users] facter value - not returning expected result

2016-03-24 Thread Mike Reed
Hey Peter,

Thank you for the reply and the information.

In terms of the piped greps, the second  string is actually our 
internal domain name (which I removed and replaced with ) for 
security sake.

I'm a little confused by code above as I'm still not getting what I would 
expect from your code above.  I think part of my confusion is how the 
recommended code gives me a true/false value.  I've changed the fact to now 
look like this:

require 'facter'

Facter.add(:pbis_joined) do
  setcode do
  !Facter::Util::Resolution.exec(%q{/opt/pbis/bin/domainjoin-cli query 
| grep -i 'domain' | grep -i ''}).nil? && $?.success?
  end
end

The issue I'm seeing is that on a machine that is added to the domain, I 
would expect the /opt/pbis...command to return true (as evidenced by the 
exit status of zero on the command line).  However, upon running this new 
fact, I get a value of: pbis_joined => false; even though I know the 
machine is on the domain and running the command manually does give me an 
exit status of '0' on this particular machine.  

I tried this new fact on another machine that I know is not joined to the 
domain and I do get a 'false' on that box.  

If the problem is that #exec returns nil or a string; and being that I'm 
looking to evaluate against an integer, could I not just do something like 
'domain_return.to_i' in the original code? 

I wanted to thank you again for your help.  It is very much appreciated.

Cheers,

Mike



On Thursday, March 24, 2016 at 1:06:48 PM UTC-7, Peter Huene wrote:
>
> Hi Mike,
>
> On Thu, Mar 24, 2016 at 12:30 PM, Mike Reed <mjohn...@gmail.com 
> > wrote:
>
>> Hey Peter,
>>
>> Thank you for the reply.
>>
>> If I run the command on a machine that I know is 'joined' to the domain 
>> and run 'echo $?' immediately after, I get a return of '0'.  
>>
>
> If you're going solely off of grep's exit status, try this:
>
> ```
> Facter.add(:pbis_joined) do
>   setcode do
>   !Facter::Util::Resolution.exec(%q{/opt/pbis/bin/domainjoin-cli 
> query | grep -i 'domain' | grep -i ''}).nil? && $?.success?
>   end
> end
> ```
>
> Breaking that down:
>
> ```
> !Facter::Util::Resolution.exec(%q{/opt/pbis/bin/domainjoin-cli query | 
> grep -i 'domain' | grep -i ''}).nil?
> ```
>
> This runs the command and ensures #exec doesn't return nil (which will 
> happen if it failed to execute the command, e.g. command not found).
>
> ```
> $?.success?
> ```
>
> This ensures the executed process exited with a zero exit code (i.e. $? in 
> a shell == 0).
>
> On an aside: do you need the piped greps?  Seems like the latter grep 
> would be all that's needed assuming you're looking for just "", 
> unless you intended this to be either "domain" or "", which won't 
> work as currently constructed.
>  
>
>>
>> Thank you again,
>>
>> Mike
>>
>> On Thursday, March 24, 2016 at 12:13:53 PM UTC-7, Peter Huene wrote:
>>>
>>> Hi Mike,
>>>
>>> On Thu, Mar 24, 2016 at 11:59 AM, Mike Reed <mjohn...@gmail.com> wrote:
>>>
>>>> Hey all,
>>>>
>>>> I'm a little stumped on why this fact is returning the incorrect value 
>>>> and I was hoping somebody would have some advice on this one.
>>>>
>>>> The fact is very basic and looks like this:
>>>>
>>>> # custom fact for detecting if machine is joined to the domain
>>>> require 'facter'
>>>>
>>>> Facter.add(:pbis_joined) do
>>>>   setcode do
>>>>   domain_check = %q{/opt/pbis/bin/domainjoin-cli query | grep -i 
>>>> 'domain' | grep -i ''}
>>>> domain_return = Facter::Util::Resolution.exec(domain_check)
>>>> if domain_return == 0
>>>>
>>>
>>> Facter::Util::Resolution.exec returns the command's output as a string 
>>> or nil if the command failed.  Thus, I would expect this conditional 
>>> (`domain_return == 0`) to never evaluate to true because a string or a nil 
>>> can never equal 0.
>>>
>>> What does the command output if you run it manually when you expect the 
>>> `pbis_joined` facter to be true?
>>>  
>>>
>>>>   pbis_joined = true
>>>> else
>>>>   pbis_joined = false
>>>> end
>>>>   end
>>>> end
>>>>
>>>
>>> Also, the `pbis_joined` local variable serves no purpose here, as it is 
>>> the return value from the block that sets the fact's value.
>>>  
>>>
>>>>
>>>> Regardless of whether the

Re: [Puppet Users] facter value - not returning expected result

2016-03-24 Thread Mike Reed
Hey Peter,

Thank you for the reply.

If I run the command on a machine that I know is 'joined' to the domain and 
run 'echo $?' immediately after, I get a return of '0'.  

Thank you again,

Mike

On Thursday, March 24, 2016 at 12:13:53 PM UTC-7, Peter Huene wrote:
>
> Hi Mike,
>
> On Thu, Mar 24, 2016 at 11:59 AM, Mike Reed <mjohn...@gmail.com 
> > wrote:
>
>> Hey all,
>>
>> I'm a little stumped on why this fact is returning the incorrect value 
>> and I was hoping somebody would have some advice on this one.
>>
>> The fact is very basic and looks like this:
>>
>> # custom fact for detecting if machine is joined to the domain
>> require 'facter'
>>
>> Facter.add(:pbis_joined) do
>>   setcode do
>>   domain_check = %q{/opt/pbis/bin/domainjoin-cli query | grep -i 
>> 'domain' | grep -i ''}
>> domain_return = Facter::Util::Resolution.exec(domain_check)
>> if domain_return == 0
>>
>
> Facter::Util::Resolution.exec returns the command's output as a string or 
> nil if the command failed.  Thus, I would expect this conditional 
> (`domain_return == 0`) to never evaluate to true because a string or a nil 
> can never equal 0.
>
> What does the command output if you run it manually when you expect the 
> `pbis_joined` facter to be true?
>  
>
>>   pbis_joined = true
>> else
>>   pbis_joined = false
>> end
>>   end
>> end
>>
>
> Also, the `pbis_joined` local variable serves no purpose here, as it is 
> the return value from the block that sets the fact's value.
>  
>
>>
>> Regardless of whether the domain_check command is a success on the 
>> client, I always get a value of 'true' from the fact.  In fact, if I 
>> completely remove the /opt/pbis folder from the machine and run the fact 
>> again, I still get a value of 'true'.  Additionally, If I manually run the 
>> domain_check command on a machine that I know is not joined to the domain, 
>> I will still get a value of 'true' from the fact.  
>>
>> I've also tried both single '=' and double '==' for the 'if 
>> domain_return' piece of the fact and neither seem to give me what I want.  
>> I then thought that the domain_check object may not be considered an 
>> integer when comparing against the '0' so I added 'domain_return.to_i' and 
>> still got the same result.
>>
>> The code within the manifest that looks to this fact looks like this:  if 
>> ($::pbis_joined == true) {etc,etc,etc}
>>
>> I do have stringify_facts set to 'false' within puppet.conf on both the 
>> client and the master.
>>
>> Puppet version 3.6.2/Hiera version: 1.3.4
>>
>> Does anybody have any suggestions they can give me as to why I'm not 
>> getting the correct return value?
>>
>> As always, thanks to everybody for their help and support.
>>
>> Cheers,
>>
>> Mike
>>
>>
>>
>>
>>  
>>
>> -- 
>> 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/a1f8ece8-627b-478d-a108-97c91d76d654%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/puppet-users/a1f8ece8-627b-478d-a108-97c91d76d654%40googlegroups.com?utm_medium=email_source=footer>
>> .
>> 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/c7d8d40d-5121-426e-a208-a8a4af3bffb1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] facter value - not returning expected result

2016-03-24 Thread Mike Reed
Hey all,

I'm a little stumped on why this fact is returning the incorrect value and 
I was hoping somebody would have some advice on this one.

The fact is very basic and looks like this:

# custom fact for detecting if machine is joined to the domain
require 'facter'

Facter.add(:pbis_joined) do
  setcode do
  domain_check = %q{/opt/pbis/bin/domainjoin-cli query | grep -i 
'domain' | grep -i ''}
domain_return = Facter::Util::Resolution.exec(domain_check)
if domain_return == 0
  pbis_joined = true
else
  pbis_joined = false
end
  end
end

Regardless of whether the domain_check command is a success on the client, 
I always get a value of 'true' from the fact.  In fact, if I completely 
remove the /opt/pbis folder from the machine and run the fact again, I 
still get a value of 'true'.  Additionally, If I manually run the 
domain_check command on a machine that I know is not joined to the domain, 
I will still get a value of 'true' from the fact.  

I've also tried both single '=' and double '==' for the 'if domain_return' 
piece of the fact and neither seem to give me what I want.  I then thought 
that the domain_check object may not be considered an integer when 
comparing against the '0' so I added 'domain_return.to_i' and still got the 
same result.

The code within the manifest that looks to this fact looks like this:  if 
($::pbis_joined == true) {etc,etc,etc}

I do have stringify_facts set to 'false' within puppet.conf on both the 
client and the master.

Puppet version 3.6.2/Hiera version: 1.3.4

Does anybody have any suggestions they can give me as to why I'm not 
getting the correct return value?

As always, thanks to everybody for their help and support.

Cheers,

Mike




 

-- 
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/a1f8ece8-627b-478d-a108-97c91d76d654%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Iteration over fact array - index doesn't seem to work

2016-02-10 Thread Mike Reed
Hey John,

After changing 'stringify_facts' to false on both master and client, things 
are working as expected.

Thank you again for the insight; not sure how I missed that one.

Cheers,

Mike

On Wednesday, February 10, 2016 at 6:12:40 AM UTC-8, jcbollinger wrote:
>
>
>
> On Tuesday, February 9, 2016 at 5:00:12 PM UTC-6, Mike Reed wrote:
>  
>
>>
>> Running 'facter -p' on the client side (assuming we have two video cards 
>> installed), I receive a result of:  video_card_id => ["17c2", "17c2"]
>> This result means to me that I was returned two strings, each of which 
>> are contained within a typical ruby'ish collection.
>>
>> Now, if I try and reference the first item in the collection - like below 
>> - using video_card_id[0] within a puppet manifest, I get an error
>>
>> notify { "Installing driver version: ({$::video_card_id[0]})" : }
>>
>> Error: Could not retrieve catalog from remote server: Error 400 on 
>> SERVER: ::video_card_id is not a hash or array when accessing it with 0.
>> [...]
>>
>
>  
>
>> Both server and client are running:  Puppet 3.6.2/Facter 2.1.0
>>
>>
> Structured facts were a forward-looking feature in Puppet 3.6, not enabled 
> by default.  When they are not enabled, Puppet squashes all fact values to 
> strings.  You must configure both the agent and the master to support 
> structured facts, by setting the stringify_facts configuration option to 
> false.  The docs discuss this 
> <https://docs.puppetlabs.com/puppet/3.6/reference/config_important_settings.html#recommended-and-safe>,
>  
> but they don't say much more than the above.
>
>
> 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/7104fab0-9373-4afe-aea2-3ff32289089e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Iteration over fact array - index doesn't seem to work

2016-02-09 Thread Mike Reed
Hello all,

I'm working with a custom fact that's returning an array as it's value. 
 The fact looks like this:

require 'facter'

Facter.add(:video_card_id) do
  confine :kernel => :linux
  setcode do 

# create array for card id's
id_array = Array.new
  
# determine id of card #
id_query  = %q{lspci | grep -i 'vga' | awk '{print $8}'}
id_return = Facter::Util::Resolution.exec(id_query)

# add id's to array
id_return.each { |id| id_array.push(id) }
id_array.map! { |x| x.chomp }

# return id array
id_array
  end
end


Running 'facter -p' on the client side (assuming we have two video cards 
installed), I receive a result of:  video_card_id => ["17c2", "17c2"]
This result means to me that I was returned two strings, each of which are 
contained within a typical ruby'ish collection.

Now, if I try and reference the first item in the collection - like below - 
using video_card_id[0] within a puppet manifest, I get an error

notify { "Installing driver version: ({$::video_card_id[0]})" : }

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
::video_card_id is not a hash or array when accessing it with 0.


This fact is part of a larger design that incorporates the fact's value 
into something like this:

class nvidia::config (
  $model_hash = {
  '009d' => "$::nvidia::params::quadro_fx_4500_driver",
  '06dc' => "$::nvidia::params::quadro_6000_driver",
  '06d9' => "$::nvidia::params::quadro_5000_driver",
  '11ba' => "$::nvidia::params::quadro_K5000_driver",
  '17c2' => "$::nvidia::params::gtx_titanx_driver",
  '17f0' => "$::nvidia::params::quadro_M6000_driver",
  }

) inherits nvidia::params {

  if ($::is_virtual == true) and ($::class == 'server') {
notify { 'This is a virtual machine and the nvidia driver doesn\'t get 
intalled' : 
  }

# only run nvidia installer if the machine is a workstation and the 
driver is not already installed
  } elsif ($::class == 'workstation') and ($::nvidia_installed == false ) { 
   
# let 'em know what you're doing
notify { "Installing driver version: 
${model_hash[$::video_card_id[0]]}" : }

# stop kde before driver install
exec { 'kdm-stop' :
  command => '/usr/bin/service kdm stop',
  unless  => '/usr/bin/service kdm status | grep -i "stop" ',
  before  => Exec['nvidia-driver-install'],
}

# install nvidia driver
exec { 'nvidia-driver-install' :
  command => "/usr/src/{$model_hash[$::video_card_id[0]]}.run -s -X 
-N --force-tls=new --no-x-check --no-cc-version-check",
  require => 
File["/usr/src/${model_hash[$::video_card_id[0]]}.run"],
  notify  => Exec['reboot_after_nvidia'],
}

# reboot after nvidia install
exec { 'reboot_after_nvidia' :
  command => "/sbin/reboot",
  refreshonly => true,
} 
}
}

I've done quite a bit of reading around this but can't quite figure out 
what I'm doing wrong.  When testing my array indexing via Ruby, things work 
fine so my thought is that this is a DSL thing that I've missed.  I've done 
some reading around future parser but I don't understand it enough to tell 
if that's my problem.  

If anybody could help shed some light on this one, I'd be most grateful. 
 This is similar to another of my posts', with the exception that before I 
wasn't using an array as a fact's value and thus, I'm quite confused.   
(Old Post: 
 https://groups.google.com/forum/#!topic/puppet-users/1ol4b1euTiE)

Both server and client are running:  Puppet 3.6.2/Facter 2.1.0

Thank you in advance for your help.

Cheers,

Mike



-- 
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/03753d71-b1c8-495e-8155-8b2be10526b7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Schedule Vcsrepo to sync local with remote

2016-02-03 Thread mike r
Hello everyone, 

Im trying to use vcsrepo to sync my PE Master files with a remote git 
repository

I wanted to sync every 15 min in case there are new commits on remote. Is 
there a way to set vcsrepo to run on PE Master periodically without using a 
cron job?

this is what my vcsrepo class looks like,


cat vcsrepo.pp

 vcsrepo { "${modulepath}/nginx/files/repo":
ensure   => latest,
provider => git,
source   => https://github.com/myremote.git,
revision => 'master',
force=> true,
  }

Trying to avoid using cron but cant figure if its possible to run this on 
PE Master as 'puppet apply vcsrepo.pp' every 15 min or so. 

-- 
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/69ac8a70-7d36-425c-a08d-36163ec32691%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] scheduling a Git repo sync on PE master

2016-02-02 Thread mike r
Hi everyone quick question, 

Im trying to update some files in my one of my modules/nginx/files based on 
a file located in some remote repo. My nginx module is distributing a HTML 
file to all managed nodes, and I need to make sure this HTML file is the 
latest commit from the remote repo. Im pulling this HTML file from Git 
remote into my nginx/files/repo folder, and from there, serving the HTML 
file to my managed nodes.

I installed the vcsrepo module on my PE master but trying to decide a good 
way to schedule a periodic pull from the remote repo to my nginx/files 
directory. 

I have a pull_repo.pp 


 vcsrepo { 
'/etc/puppetlabs/code/environments/production/modules/nginx/files/repo':
ensure => latest,
provider   => git,
source => 'https://github.com/puppetlabs/exercise-webpage.git',
revision   => 'master',
force  => true,
  }
  
This works and pulls in the freshest HTML file each time. Whats a good way 
of scheduling this to run on my PE master? Should I setup a regular cron 
job 'crontab -e'  and have it do 'puppet apply pull_repo.pp' or is there a 
more recomended method to run something scheduled on PE master?

-- 
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/357d8208-08b8-4a24-85da-eba24f27a246%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Getting Yum errors for nginx install

2016-01-27 Thread mike r
running nginx module on centos 6.6 (only getting this error for centos 66, 
also tried centos 7 and ubuntu 12,14 and no errors,)

wondering if anyone has seen this output.

*Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install nginx' returned 1: 
Error: Nothing to do*
*Error: /Stage[main]/Nginx::Install/Package[nginx]/ensure: change from 
purged to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y install 
nginx' returned 1: Error: Nothing to do*



my install.pp looks like this,


 # check node agent version
$fqdn = $::fqdn

if $puppet_agent_version < '3.8' {
  fail(" Node ${fqdn} has a Puppet agent version: 
${puppet_agent_version} which is not compatible with this module. Need to 
have minimum Puppet agent 3.8 -")
}


package { 'nginx':
  name   => $package_name,
  ensure => present,
}


file { [$nginx_dirs]:
  ensure  => directory,
  mode=> '0644',
  owner   => 'root',
  group   => 'root',
  require => Package['nginx'],
}


user { 'nginx_user':
  name => $user,
  ensure   => 'present',
  comment  => "${user}",
  home => '/var/www',
  password => '*',
  password_max_age => '9',
  password_min_age => '0',
  shell=> '/usr/sbin/nologin',
  require  => Package['nginx'],
}


}



-- 
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/605d8d82-5ffe-4400-9700-e7faee6f6092%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Getting Yum errors for nginx install

2016-01-27 Thread mike r
looks like issues w  my repos.d, had to install 

sudo yum install epel-release



On Wednesday, January 27, 2016 at 8:12:16 AM UTC-5, mike r wrote:
>
> running nginx module on centos 6.6 (only getting this error for centos 66, 
> also tried centos 7 and ubuntu 12,14 and no errors,)
>
> wondering if anyone has seen this output.
>
> *Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install nginx' returned 1: 
> Error: Nothing to do*
> *Error: /Stage[main]/Nginx::Install/Package[nginx]/ensure: change from 
> purged to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y install 
> nginx' returned 1: Error: Nothing to do*
>
>
>
> my install.pp looks like this,
>
>
>  # check node agent version
> $fqdn = $::fqdn
>
> if $puppet_agent_version < '3.8' {
>   fail(" Node ${fqdn} has a Puppet agent version: 
> ${puppet_agent_version} which is not compatible with this module. Need to 
> have minimum Puppet agent 3.8 -")
> }
>
>
> package { 'nginx':
>   name   => $package_name,
>   ensure => present,
> }
>
>
> file { [$nginx_dirs]:
>   ensure  => directory,
>   mode=> '0644',
>   owner   => 'root',
>   group   => 'root',
>   require => Package['nginx'],
> }
>
>
> user { 'nginx_user':
>   name => $user,
>   ensure   => 'present',
>   comment  => "${user}",
>   home => '/var/www',
>   password => '*',
>   password_max_age => '9',
>   password_min_age => '0',
>   shell=> '/usr/sbin/nologin',
>   require  => Package['nginx'],
> }
>
>
> }
>
>
>
>

-- 
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/80477951-d429-4dbc-b27e-3e41809510bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Referencing hash values within module

2016-01-22 Thread Mike Reed
Hello Thomas,

Thank you for your comments and thoughts.  I'm still trying to understand 
basic programming and I see now that I'm mixing things up.  

I also wanted to thank you for taking the time to put the code up on gist, 
in order to give me a clear example of what you are talking about.  I very 
much appreciate it.

Cheers,

Mike

On Friday, January 22, 2016 at 1:11:38 AM UTC-8, Thomas Müller wrote:
>
> Hi Mike
>
> Am Donnerstag, 21. Januar 2016 23:20:38 UTC+1 schrieb Mike Reed:
>>
>> ... check the values by running a facter -p, which results in something 
>> like:
>>
>> nvidia_installed => false
>> video_card_id => 17c2
>> class => workstation
>>
>  
> ...
>  
>
>>
>>   if ($::is_virtual == true) and ($::class == 'server') {
>> notify { 'This is a virtual machine and the nvidia driver doesn\'t 
>> get intalled' : 
>>   }
>> # only run nvidia installer if the machine is a workstation and the 
>> driver is not already installed
>>   } elsif ($::class == 'workstation') and ($::nvidia_installed == 
>> 'false') {
>>
>  
>
>>   if ($::video_card_id == $model_hash[key]) {
>>
>
> What is key? key is a bare word not a variable. Maybe you meant "if 
> (!empty($model_hash[$::video_card_id])" ?
>
> https://gist.github.com/vinzent/5e5f187a8d1dcb000f8a/revisions
>  
>
>> notify { "Installing driver for ($model_hash[key])" : }
>> exec { 'kdm-stop' :
>>
>  
>
>> Also, as a bonus question, if I wanted to use this code in another 
>> module, is it as simple as "include ::nvidia::driver_install"?
>>
>
> it should be as easy as that.
>
> I do see some problems with the exec reboot. It will initiate the reboot 
> while puppet is applying changes. this might produce unexpected results.
>
> - 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/8e5fe5e2-722b-4c8a-be3c-5d7e0ae7aee0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Referencing hash values within module

2016-01-22 Thread Mike Reed
Hey John,

Your comments make absolute sense and after making some changes, things are 
working as expected.  I've corrected my if statement to include the 'in' 
operator along with changing the syntax for how I'm retrieving the 
key/value pairs - ${model_hash[$::video_card_id]} - and that fixed things 
right up.

Your bonus comments are very helpful and I'll be making some changes based 
on your recommendations.  

Also, I wanted to thank you again - as always - for taking the time to not 
only explain the issue, but also for enlightening me on how I can make 
fundamental changes that will make my code better.  

Your help is very much appreciated.  

Cheers,

Mike 

On Friday, January 22, 2016 at 9:09:53 AM UTC-8, jcbollinger wrote:
>
>
> On Thursday, January 21, 2016 at 4:20:38 PM UTC-6, Mike Reed wrote:
>
> Hello all,
>>
>> I've got a module that I've been working on in an attempt to make things 
>> a little smarter and I figured using a hash would be an elegant solution to 
>> my problem.  The short story is that I've got various video cards in our 
>> production environment and I'd like to have a module that determines what 
>> driver will be installed, depending on the make of the card. 
>>
>> I've written some custom facts to help determine the class of the 
>> machine, what the video card id is and additionally, if the nvidia driver 
>> is currently installed.  These facts have been working fine for quite some 
>> time and I can check the values by running a facter -p, which results in 
>> something like:
>>
>> nvidia_installed => false
>> video_card_id => 17c2
>> class => workstation
>>
>> With that said, here's the module that I've written:
>>
>>  class nvidia::driver_install (
>>   
>>   $model_hash = {
>>   009d => "$::nvidia::params::quadro_fx_4500_driver",
>>   06dc => "$::nvidia::params::quadro_6000_driver",
>>   06d9 => "$::nvidia::params::quadro_5000_driver",
>>   11ba => "$::nvidia::params::quadro_K5000_driver",
>>   17c2 => "$::nvidia::params::gtx_titanx_driver",
>>   17f0 =>  "$::nvidia::params::quadro_M6000_driver",
>>   }
>>   
>> ) inherits nvidia::params {
>>
>>   if ($::is_virtual == true) and ($::class == 'server') {
>> notify { 'This is a virtual machine and the nvidia driver doesn\'t 
>> get intalled' : 
>>   }
>> # only run nvidia installer if the machine is a workstation and the 
>> driver is not already installed
>>   } elsif ($::class == 'workstation') and ($::nvidia_installed == 
>> 'false') {
>>   if ($::video_card_id == $model_hash[key]) {
>> notify { "Installing driver for ($model_hash[key])" : }
>> exec { 'kdm-stop' :
>>   command => '/usr/bin/service kdm stop' ,
>>   unless  => '/usr/bin/service kdm status | grep -i "stop" ' ,
>>   before  => Exec['nvidia-driver-install'] ,
>> }
>> # install nvidia driver
>> exec { 'nvidia-driver-install' :
>>   command => "/usr/src/($model_hash[value]).run -s -X -N 
>> --force-tls=new --no-x-check --no-cc-version-check" ,
>>   require => File["/usr/src/($model_hash[value]).run"] ,
>>   notify  => Exec['reboot_after_nvidia'] ,
>> }
>> # reboot after nvidia install
>> exec { 'reboot_after_nvidia' :
>>   command => "/sbin/reboot" ,
>>   refreshonly => true ,
>> }
>>   }
>>   }
>> }
>>
>> In addition, I've got most of my parameters saved into the 
>> ::nvidia::params.pp file of the module, which then points to hiera for its 
>> values:
>>
>> $quadro_fx_4500_driver   = hiera('nvidia::quadro_fx_4500_driver')
>> $quadro_6000_driver= hiera('nvidia::quadro_6000_driver')
>> $quadro_5000_driver= hiera('nvidia::quadro_5000_driver')
>> $quadro_K5000_driver = hiera('nvidia::quadro_K5000_driver')
>> $quadro_M6000_driver = hiera('nvidia::quadro_M6000_driver')
>> $gtx_titanx_driver= hiera('nvidia::gtx_titanx_driver')
>>
>> These values all resolve and if I use them by name (without the hash), 
>> things seem to work.
>>
>> My first question is, does it appear that my logic is correct?
>>
>
>
> I guess you're asking about the structure of your class and your approach 
> to the problem.  The word "logic" is not usually used in that sense for 
> Puppet DSL code.  Anyway, it l

[Puppet Users] Referencing hash values within module

2016-01-21 Thread Mike Reed
Hello all,

I've got a module that I've been working on in an attempt to make things a 
little smarter and I figured using a hash would be an elegant solution to 
my problem.  The short story is that I've got various video cards in our 
production environment and I'd like to have a module that determines what 
driver will be installed, depending on the make of the card. 

I've written some custom facts to help determine the class of the machine, 
what the video card id is and additionally, if the nvidia driver is 
currently installed.  These facts have been working fine for quite some 
time and I can check the values by running a facter -p, which results in 
something like:

nvidia_installed => false
video_card_id => 17c2
class => workstation

With that said, here's the module that I've written:

 class nvidia::driver_install (
  
  $model_hash = {
  009d => "$::nvidia::params::quadro_fx_4500_driver",
  06dc => "$::nvidia::params::quadro_6000_driver",
  06d9 => "$::nvidia::params::quadro_5000_driver",
  11ba => "$::nvidia::params::quadro_K5000_driver",
  17c2 => "$::nvidia::params::gtx_titanx_driver",
  17f0 =>  "$::nvidia::params::quadro_M6000_driver",
  }
  
) inherits nvidia::params {

  if ($::is_virtual == true) and ($::class == 'server') {
notify { 'This is a virtual machine and the nvidia driver doesn\'t get 
intalled' : 
  }
# only run nvidia installer if the machine is a workstation and the 
driver is not already installed
  } elsif ($::class == 'workstation') and ($::nvidia_installed == 'false') {
  if ($::video_card_id == $model_hash[key]) {
notify { "Installing driver for ($model_hash[key])" : }
exec { 'kdm-stop' :
  command => '/usr/bin/service kdm stop' ,
  unless  => '/usr/bin/service kdm status | grep -i "stop" ' ,
  before  => Exec['nvidia-driver-install'] ,
}
# install nvidia driver
exec { 'nvidia-driver-install' :
  command => "/usr/src/($model_hash[value]).run -s -X -N 
--force-tls=new --no-x-check --no-cc-version-check" ,
  require => File["/usr/src/($model_hash[value]).run"] ,
  notify  => Exec['reboot_after_nvidia'] ,
}
# reboot after nvidia install
exec { 'reboot_after_nvidia' :
  command => "/sbin/reboot" ,
  refreshonly => true ,
}
  }
  }
}

In addition, I've got most of my parameters saved into the 
::nvidia::params.pp file of the module, which then points to hiera for its 
values:

$quadro_fx_4500_driver   = hiera('nvidia::quadro_fx_4500_driver')
$quadro_6000_driver= hiera('nvidia::quadro_6000_driver')
$quadro_5000_driver= hiera('nvidia::quadro_5000_driver')
$quadro_K5000_driver = hiera('nvidia::quadro_K5000_driver')
$quadro_M6000_driver = hiera('nvidia::quadro_M6000_driver')
$gtx_titanx_driver= hiera('nvidia::gtx_titanx_driver')

These values all resolve and if I use them by name (without the hash), 
things seem to work.

My first question is, does it appear that my logic is correct?  After 
reading the puppet docs about data types and hashes in particular, it 
appears to me that I've got the correct syntax.  With the above module in 
place, I can run a puppet job; but nothing ever gets applied to the host 
(no errors are ever reported and the jobs completes successfully).  This 
leads me to believe that I'm using the hash incorrectly and because of 
that, values aren't being determined and therefore this particular piece of 
the module doesn't get applied.  Might you have any thoughts on why this 
doesn't appear to work?

Also, as a bonus question, if I wanted to use this code in another module, 
is it as simple as "include ::nvidia::driver_install"?

Thank you in advance to everybody for your help and your assistance.  Your 
help is very much appreciated.

Cheers,

Mike

-- 
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/cfbdb396-0f91-4950-a161-a4e1c52eefe0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Facter - custom fact regex

2016-01-14 Thread Mike Reed
Hey Hristo,

This did not work for me but I wanted to thank you for the info.  It turns 
out the fact wasn't being sync'd correctly to the client and therefore not 
all my changes were being reflected locally.

Thank you again for the info. 

Cheers,

Mike.

On Wednesday, January 13, 2016 at 3:26:18 AM UTC-8, Hristo Mohamed wrote:
>
> Try :
> setcode { network }
>
> From puppett docs:
>
>
>1. A call to Facter.add('fact_name'), which determines the name of the 
>fact
>2. A setcode statement for simple resolutions, which is evaluated to 
>determine the fact’s value.
>
>
> On Wed, Jan 13, 2016 at 12:42 AM, Mike Reed <mjohn...@gmail.com 
> > wrote:
>
>> Hello all,
>>
>> I'm having some trouble with a custom fact and I was hoping somebody 
>> could tell me what I'm doing wrong.  
>>
>> Here is an example of the code:
>>
>> require 'facter'
>> Facter.add('network') do
>>   setcode do
>> hostname = Facter.value(:hostname)
>> ipaddress = Facter.value(:ipaddress)
>> case 
>>   when 
>> ipaddres.match(/^(\d[10]\.)(\d[10]\.)([1][2][7]\.)([1-9][1-9][1-9])?/)
>> network = 'net1'  
>>   when hostname.match(/^nettwo/)
>> network = 'net2'
>>   when hostname.match(/^netthree/)
>> network = 'net3'
>>   when hostname.match(/^netfour/)
>> network = 'net4'
>>   else
>> network = 'nonet'
>>   end
>> network
>> end
>> end
>>
>> I've gotten myself into a pickle in that most hosts have a hostname 
>> prefix to designate what network they are on.  In this case, I don't have a 
>> prefix but the physical ip is different and my thoughts were to regex match 
>> the ip address and bingo...but no luck.
>>
>> Puppet runs and pluginsync does pull down the fact but I never get the 
>> value of network back.   No errors are displayed or logged when running 
>> 'facter -p' but again, I never get the value of network back.  I've done 
>> quite a bit of reading and can't figure out why this one doesn't work.  
>>
>> Does anybody perhaps have any suggestions as to how I might accomplish 
>> this?
>>
>> Thank you in advance for your assistance.
>>
>> Cheers,
>>
>> Mike
>>
>> -- 
>> 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/cbf9ea68-fffd-4e14-a467-486d8832bc0e%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/puppet-users/cbf9ea68-fffd-4e14-a467-486d8832bc0e%40googlegroups.com?utm_medium=email_source=footer>
>> .
>> 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/4d44092b-6b1f-4999-8a52-c7b0b41a5150%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Facter - custom fact regex

2016-01-14 Thread Mike Reed
Thank you for the info John.  I did fix the typo and it looks like the fact 
wasn't sync'd correctly to the client.  It's all fixed up now and working 
as expected.

You've always been a great help and I very much appreciate your time.

Let me know where to send the six pack.

Cheers,

Mike

On Wednesday, January 13, 2016 at 6:31:20 AM UTC-8, jcbollinger wrote:
>
>
>
> On Tuesday, January 12, 2016 at 5:42:45 PM UTC-6, Mike Reed wrote:
>>
>> Hello all,
>>
>> I'm having some trouble with a custom fact and I was hoping somebody 
>> could tell me what I'm doing wrong.  
>>
>> Here is an example of the code:
>>
>> require 'facter'
>> Facter.add('network') do
>>   setcode do
>> hostname = Facter.value(:hostname)
>> ipaddress = Facter.value(:ipaddress)
>> case 
>>   when 
>> ipaddres.match(/^(\d[10]\.)(\d[10]\.)([1][2][7]\.)([1-9][1-9][1-9])?/)
>> network = 'net1'  
>>   when hostname.match(/^nettwo/)
>> network = 'net2'
>>   when hostname.match(/^netthree/)
>> network = 'net3'
>>   when hostname.match(/^netfour/)
>> network = 'net4'
>>   else
>> network = 'nonet'
>>   end
>> network
>> end
>> end
>>
>> I've gotten myself into a pickle in that most hosts have a hostname 
>> prefix to designate what network they are on.  In this case, I don't have a 
>> prefix but the physical ip is different and my thoughts were to regex match 
>> the ip address and bingo...but no luck.
>>
>> Puppet runs and pluginsync does pull down the fact but I never get the 
>> value of network back.   No errors are displayed or logged when running 
>> 'facter -p' but again, I never get the value of network back.  I've done 
>> quite a bit of reading and can't figure out why this one doesn't work.
>>
>
>
> You misspell "ipaddress" in the first "when" clause.  I wouldn't have 
> expected that to cause the fact to be silently ignored, and maybe it 
> doesn't, but you should fix it regardless.
>
> Otherwise, I don't see anything inherently wrong with your fact code.  If 
> after you fix the misspelling, the fact is not submitted to the master, and 
> 'facter -p' neither prints it nor emits any error message, then my first 
> guess would be that it has not properly been synced, your assertion to the 
> contrary notwithstanding.  In that case, look into where the synced file 
> actually went (if anywhere).  If it is indeed in a subdirectory "facter" of 
> some directory in the Ruby load path, then verify that the file and every 
> directory in the path to it is accessible to puppet and facter.  Even with 
> the agent running with privilege, as normally it must do, it is possible 
> for it to be denied access to some files and directories.
>
>
> 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/87f28dbb-00c3-420f-9985-123c38c8c2c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Facter - custom fact regex

2016-01-14 Thread Mike Reed
That is a great idea and I'll get that changed to something else.

Cheers,

Mike

On Thursday, January 14, 2016 at 10:23:06 AM UTC-8, Thomas Müller wrote:
>
> IMHO the fact "network" is a default fact from facter >= 3. i would change 
> the name.
>

-- 
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/04bddc6a-0b09-4c41-8675-46d63ce8910e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Facter - custom fact regex

2016-01-12 Thread Mike Reed
Hello all,

I'm having some trouble with a custom fact and I was hoping somebody could 
tell me what I'm doing wrong.  

Here is an example of the code:

require 'facter'
Facter.add('network') do
  setcode do
hostname = Facter.value(:hostname)
ipaddress = Facter.value(:ipaddress)
case 
  when 
ipaddres.match(/^(\d[10]\.)(\d[10]\.)([1][2][7]\.)([1-9][1-9][1-9])?/)
network = 'net1'  
  when hostname.match(/^nettwo/)
network = 'net2'
  when hostname.match(/^netthree/)
network = 'net3'
  when hostname.match(/^netfour/)
network = 'net4'
  else
network = 'nonet'
  end
network
end
end

I've gotten myself into a pickle in that most hosts have a hostname prefix 
to designate what network they are on.  In this case, I don't have a prefix 
but the physical ip is different and my thoughts were to regex match the ip 
address and bingo...but no luck.

Puppet runs and pluginsync does pull down the fact but I never get the 
value of network back.   No errors are displayed or logged when running 
'facter -p' but again, I never get the value of network back.  I've done 
quite a bit of reading and can't figure out why this one doesn't work.  

Does anybody perhaps have any suggestions as to how I might accomplish this?

Thank you in advance for your assistance.

Cheers,

Mike

-- 
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/cbf9ea68-fffd-4e14-a467-486d8832bc0e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: Check code quality with SonarQube

2015-09-25 Thread Mike Skint
Just checking in David,  wondering about the future parser progress. How is 
it going? 

 Also may have found a bug, though it may be down to the future parser.  
I'm seeing a parse error in sonarqube for a manifest that runs fine under 
puppet 3.x and puppet with the future parser enabled.

On Friday, August 21, 2015 at 12:58:41 AM UTC-7, David Racodon wrote:
>
> Thank you Mike! ... and thanks to Iain as well who's co-developing the 
> plugin with me.
>
> Glad you like it!
>
> As a bonus, I also released a JSON plugin. It provides similar 
> https://github.com/puppet-community/metadata-json-lint checks, plus 
> additional checks such as enforcing a specific license or author. See 
> https://github.com/racodond/sonar-json-plugin/releases/tag/1.0
>
>
> David RACODON
> Freelance QA Consultant
> LinkedIn <https://ch.linkedin.com/pub/david-racodon/11/62/283> | Twitter 
> <https://twitter.com/davidracodon>
>
> On Thu, Aug 20, 2015 at 11:26 PM, Mike Skint <jesk...@gmail.com 
> > wrote:
>
>> David,
>>
>> what an outstanding tool!  so so sweet!
>>
>> thank you!
>>
>>
>>
>>
>>
>> On Thursday, August 20, 2015 at 1:51:09 PM UTC-7, David Racodon wrote:
>>>
>>> Hi Mike,
>>>
>>> How does sonarqube differ from puppet-lint
>>>
>>>
>>> SonarQube provides more checks than puppet-lint and similar checks have 
>>> fewer false negatives.
>>> Checks are not only coding style related. There are checks:
>>>
>>>- to detect potential bugs: duplicated hash keys should be removed, 
>>>duplicated parameters should be removed, ...
>>>- to warn about deprecated structures: deprecated node inheritance 
>>>should not be used, ...
>>>- to point out complex code: case and selectors statements should 
>>>not be nested, classes and defines should not be too complex, ...
>>>- to point out pitfalls: if...elsif structures should be terminated 
>>>by an else statement, empty blocks should be removed, ...
>>>- ...
>>>
>>> and a lot more valuable checks are being implemented.
>>>
>>> As stated before, it comes with a nice web interface to browse issues, 
>>> it computes metrics (lines of code, complexity, comments lines, number of 
>>> resources, ...), it keeps history, you can focus on new code, you can get 
>>> an overview of your entire Puppet code base, it checks for duplication, it 
>>> computes technical debt, the analysis is way faster, etc.
>>>
>>> The best way to discover how SonarQube can bring you value is to either 
>>> browse the demo instance at http://nemo.sonarqube.org or install it and 
>>> give it a try on your source code. By the way, I just built a package to 
>>> analyze your Puppet code in less than two minutes. So feel free to give it 
>>> a try: 
>>> https://github.com/racodond/package-test-sonarqube-puppet/archive/master.zip
>>>
>>>
>>>  also does it test for the future parser?
>>>
>>>
>>> Not in this first version but we're working hard on it.
>>>
>>> Cheers, 
>>>
>>> David RACODON
>>> Freelance QA Consultant
>>> LinkedIn <https://ch.linkedin.com/pub/david-racodon/11/62/283> | Twitter 
>>> <https://twitter.com/davidracodon>
>>>
>>> On Thu, Aug 20, 2015 at 7:47 PM, Mike Skint <jesk...@gmail.com> wrote:
>>>
>>>> This is interesting,  thanks.  
>>>>
>>>> How does sonarqube differ from puppet-lint, also does it test for the 
>>>> future parser?
>>>>
>>>> cheers.
>>>>
>>>> On Tuesday, August 18, 2015 at 11:13:11 PM UTC-7, David Racodon wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> Iain and I developed a SonarQube <http://www.sonarqube.org/> plugin 
>>>>> to check code quality of Puppet modules. This first version comes with 
>>>>> over 
>>>>> 40 rules spanning from potential bugs to coding style guidelines. It 
>>>>> fully 
>>>>> benefits from all the nice features coming with SonarQube 
>>>>> <http://nemo.sonarqube.org/>: efficient web interface to browse 
>>>>> issues and metrics, ability to focus your effort on new code (added or 
>>>>> modified) only, computation of technical debt and a lot more.
>>>>>
>>>>> It is fully open source and free. So, feel free to give it a try. T

[Puppet Users] Re: Do you use Audit attribute or "puppet inspect" ?

2015-09-21 Thread Mike Skint
Jo,  
we use the audit functionality extensively,  I've added my comment to 
PUP-893 and we are an enterprise customer.

On Monday, September 14, 2015 at 2:01:33 AM UTC-7, Jo wrote:
>
> I have numerous clients using the audit attribute to track changes to 
> files not managed by Puppet. This provides tripwire-like functionality for 
> observing changes to files not directly managed by Puppet. It also allows 
> for backing up each version of the file to the file bucket. 
>
> Therefore I was a bit shocked to find that they planned to drop support 
> for this entirely, as per3  
> 
> https://tickets.puppetlabs.com/browse/PUP-89 
> 
>
> If you make use of audit or “puppet inspect”, or would like to use the 
> functionality provided for tripwire-like tracking of resource changes, 
> please add your comments to this issue.
>
> If you have been unable to get “puppet inspect” working with recent Puppet 
> 3 or Puppet 4 versions, you may want to track 
> https://tickets.puppetlabs.com/browse/PUP-5233
>
> -- 
> Jo Rhett
> Net Consonance : net philanthropy to improve open source and 
> internet projects.
>
>

-- 
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/ed7de5b1-1690-494b-9d9a-087752a3039e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Check code quality with SonarQube

2015-08-20 Thread Mike Skint
This is interesting,  thanks.  

How does sonarqube differ from puppet-lint, also does it test for the 
future parser?

cheers.

On Tuesday, August 18, 2015 at 11:13:11 PM UTC-7, David Racodon wrote:

 Hi,

 Iain and I developed a SonarQube http://www.sonarqube.org/ plugin to 
 check code quality of Puppet modules. This first version comes with over 40 
 rules spanning from potential bugs to coding style guidelines. It fully 
 benefits from all the nice features coming with SonarQube 
 http://nemo.sonarqube.org/: efficient web interface to browse issues 
 and metrics, ability to focus your effort on new code (added or modified) 
 only, computation of technical debt and a lot more.

 It is fully open source and free. So, feel free to give it a try. The 
 release is available at: 
 https://github.com/iwarapter/sonar-puppet/releases/tag/1.0. To get 
 started with SonarQube, see 
 http://docs.sonarqube.org/display/SONAR/Documentation.

 Any feedback is more than welcome!

 Meanwhile, we'll keep adding new features.

 Enjoy!

 Iain Adams and David Racodon

 David RACODON
 Freelance QA Consultant
 LinkedIn https://ch.linkedin.com/pub/david-racodon/11/62/283 | Twitter 
 https://twitter.com/davidracodon


-- 
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/1b80776e-d9fb-411b-a367-01cdaa03d045%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: Check code quality with SonarQube

2015-08-20 Thread Mike Skint
David,

what an outstanding tool!  so so sweet!

thank you!





On Thursday, August 20, 2015 at 1:51:09 PM UTC-7, David Racodon wrote:

 Hi Mike,

 How does sonarqube differ from puppet-lint


 SonarQube provides more checks than puppet-lint and similar checks have 
 fewer false negatives.
 Checks are not only coding style related. There are checks:

- to detect potential bugs: duplicated hash keys should be removed, 
duplicated parameters should be removed, ...
- to warn about deprecated structures: deprecated node inheritance 
should not be used, ...
- to point out complex code: case and selectors statements should not 
be nested, classes and defines should not be too complex, ...
- to point out pitfalls: if...elsif structures should be terminated by 
an else statement, empty blocks should be removed, ...
- ...

 and a lot more valuable checks are being implemented.

 As stated before, it comes with a nice web interface to browse issues, it 
 computes metrics (lines of code, complexity, comments lines, number of 
 resources, ...), it keeps history, you can focus on new code, you can get 
 an overview of your entire Puppet code base, it checks for duplication, it 
 computes technical debt, the analysis is way faster, etc.

 The best way to discover how SonarQube can bring you value is to either 
 browse the demo instance at http://nemo.sonarqube.org or install it and 
 give it a try on your source code. By the way, I just built a package to 
 analyze your Puppet code in less than two minutes. So feel free to give it 
 a try: 
 https://github.com/racodond/package-test-sonarqube-puppet/archive/master.zip


  also does it test for the future parser?


 Not in this first version but we're working hard on it.

 Cheers, 

 David RACODON
 Freelance QA Consultant
 LinkedIn https://ch.linkedin.com/pub/david-racodon/11/62/283 | Twitter 
 https://twitter.com/davidracodon

 On Thu, Aug 20, 2015 at 7:47 PM, Mike Skint jesk...@gmail.com 
 javascript: wrote:

 This is interesting,  thanks.  

 How does sonarqube differ from puppet-lint, also does it test for the 
 future parser?

 cheers.

 On Tuesday, August 18, 2015 at 11:13:11 PM UTC-7, David Racodon wrote:

 Hi,

 Iain and I developed a SonarQube http://www.sonarqube.org/ plugin to 
 check code quality of Puppet modules. This first version comes with over 40 
 rules spanning from potential bugs to coding style guidelines. It fully 
 benefits from all the nice features coming with SonarQube 
 http://nemo.sonarqube.org/: efficient web interface to browse issues 
 and metrics, ability to focus your effort on new code (added or modified) 
 only, computation of technical debt and a lot more.

 It is fully open source and free. So, feel free to give it a try. The 
 release is available at: 
 https://github.com/iwarapter/sonar-puppet/releases/tag/1.0. To get 
 started with SonarQube, see 
 http://docs.sonarqube.org/display/SONAR/Documentation.

 Any feedback is more than welcome!

 Meanwhile, we'll keep adding new features.

 Enjoy!

 Iain Adams and David Racodon

 David RACODON
 Freelance QA Consultant
 LinkedIn https://ch.linkedin.com/pub/david-racodon/11/62/283 | Twitter 
 https://twitter.com/davidracodon

 -- 
 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 javascript:.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/puppet-users/1b80776e-d9fb-411b-a367-01cdaa03d045%40googlegroups.com
  
 https://groups.google.com/d/msgid/puppet-users/1b80776e-d9fb-411b-a367-01cdaa03d045%40googlegroups.com?utm_medium=emailutm_source=footer
 .

 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/dd9a9960-f0a3-42c9-904a-ead8dd94fc00%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: Check code quality with SonarQube

2015-08-20 Thread Mike Skint
thanks David,

looking forward to using it :)

On Thursday, August 20, 2015 at 1:51:09 PM UTC-7, David Racodon wrote:

 Hi Mike,

 How does sonarqube differ from puppet-lint


 SonarQube provides more checks than puppet-lint and similar checks have 
 fewer false negatives.
 Checks are not only coding style related. There are checks:

- to detect potential bugs: duplicated hash keys should be removed, 
duplicated parameters should be removed, ...
- to warn about deprecated structures: deprecated node inheritance 
should not be used, ...
- to point out complex code: case and selectors statements should not 
be nested, classes and defines should not be too complex, ...
- to point out pitfalls: if...elsif structures should be terminated by 
an else statement, empty blocks should be removed, ...
- ...

 and a lot more valuable checks are being implemented.

 As stated before, it comes with a nice web interface to browse issues, it 
 computes metrics (lines of code, complexity, comments lines, number of 
 resources, ...), it keeps history, you can focus on new code, you can get 
 an overview of your entire Puppet code base, it checks for duplication, it 
 computes technical debt, the analysis is way faster, etc.

 The best way to discover how SonarQube can bring you value is to either 
 browse the demo instance at http://nemo.sonarqube.org or install it and 
 give it a try on your source code. By the way, I just built a package to 
 analyze your Puppet code in less than two minutes. So feel free to give it 
 a try: 
 https://github.com/racodond/package-test-sonarqube-puppet/archive/master.zip


  also does it test for the future parser?


 Not in this first version but we're working hard on it.

 Cheers, 

 David RACODON
 Freelance QA Consultant
 LinkedIn https://ch.linkedin.com/pub/david-racodon/11/62/283 | Twitter 
 https://twitter.com/davidracodon

 On Thu, Aug 20, 2015 at 7:47 PM, Mike Skint jesk...@gmail.com 
 javascript: wrote:

 This is interesting,  thanks.  

 How does sonarqube differ from puppet-lint, also does it test for the 
 future parser?

 cheers.

 On Tuesday, August 18, 2015 at 11:13:11 PM UTC-7, David Racodon wrote:

 Hi,

 Iain and I developed a SonarQube http://www.sonarqube.org/ plugin to 
 check code quality of Puppet modules. This first version comes with over 40 
 rules spanning from potential bugs to coding style guidelines. It fully 
 benefits from all the nice features coming with SonarQube 
 http://nemo.sonarqube.org/: efficient web interface to browse issues 
 and metrics, ability to focus your effort on new code (added or modified) 
 only, computation of technical debt and a lot more.

 It is fully open source and free. So, feel free to give it a try. The 
 release is available at: 
 https://github.com/iwarapter/sonar-puppet/releases/tag/1.0. To get 
 started with SonarQube, see 
 http://docs.sonarqube.org/display/SONAR/Documentation.

 Any feedback is more than welcome!

 Meanwhile, we'll keep adding new features.

 Enjoy!

 Iain Adams and David Racodon

 David RACODON
 Freelance QA Consultant
 LinkedIn https://ch.linkedin.com/pub/david-racodon/11/62/283 | Twitter 
 https://twitter.com/davidracodon

 -- 
 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 javascript:.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/puppet-users/1b80776e-d9fb-411b-a367-01cdaa03d045%40googlegroups.com
  
 https://groups.google.com/d/msgid/puppet-users/1b80776e-d9fb-411b-a367-01cdaa03d045%40googlegroups.com?utm_medium=emailutm_source=footer
 .

 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/78e92938-65df-4f0b-bdf0-60b0c582b803%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Check code quality with SonarQube

2015-08-20 Thread Mike Skint
Ahh,  I see the future parser *isn't* yet supported.

On Thursday, August 20, 2015 at 10:47:44 AM UTC-7, Mike Skint wrote:

 This is interesting,  thanks.  

 How does sonarqube differ from puppet-lint, also does it test for the 
 future parser?

 cheers.

 On Tuesday, August 18, 2015 at 11:13:11 PM UTC-7, David Racodon wrote:

 Hi,

 Iain and I developed a SonarQube http://www.sonarqube.org/ plugin to 
 check code quality of Puppet modules. This first version comes with over 40 
 rules spanning from potential bugs to coding style guidelines. It fully 
 benefits from all the nice features coming with SonarQube 
 http://nemo.sonarqube.org/: efficient web interface to browse issues 
 and metrics, ability to focus your effort on new code (added or modified) 
 only, computation of technical debt and a lot more.

 It is fully open source and free. So, feel free to give it a try. The 
 release is available at: 
 https://github.com/iwarapter/sonar-puppet/releases/tag/1.0. To get 
 started with SonarQube, see 
 http://docs.sonarqube.org/display/SONAR/Documentation.

 Any feedback is more than welcome!

 Meanwhile, we'll keep adding new features.

 Enjoy!

 Iain Adams and David Racodon

 David RACODON
 Freelance QA Consultant
 LinkedIn https://ch.linkedin.com/pub/david-racodon/11/62/283 | Twitter 
 https://twitter.com/davidracodon



-- 
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/cece1c57-fb1c-42fa-b91e-8d58390ec65e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] String/Float comparison - Puppet and Facter

2015-08-04 Thread Mike Reed
Thanks you Martin, that is exactly what I needed.

Cheers,

m.

On Monday, August 3, 2015 at 11:07:09 PM UTC-7, Martin Alfke wrote:


 On 04 Aug 2015, at 00:39, Mike Reed mjohn...@gmail.com javascript: 
 wrote: 

  Hello all, 
  
  I've been trying to solve what seems to be a simple problem but have yet 
 to find the answer.   
  
  I'm trying to do a comparison between the value of a fact and some 
 arbitrary value: 
  
  if ($::class == 'workstation') and ($::kernelmajversion = '3.11') { 

 You compare two strings. 
 Have you tried versioncmp function instead? 
 versioncmp($::kernelmajversion, ‘3.11’) 

 https://docs.puppetlabs.com/references/latest/function.html#versioncmp 


  notify {My Kernel version is = ${kernel_test_version} and I'm 
 going to upgrade : } 
  
  file { 
 /usr/src/linux-headers-${kernel_test_version}_${kernel_release_test_version}~precise1_all.deb
  
 : 
mode   = '755', 
ensure = 'present', 
source = 
 puppet:///modules/kernel/${kernel_test_version}_${kernel_release_test_version}~precise1_all.deb
  

   } 
} 

elsif ($::class == 'workstation') and ($::kernelmajversion = '3.11') 
 { 
  notify {My Kernel version is = ${kernel_test_version} so I don't 
 need to upgrade: } 
} 
  
  
  After invoking a puppet run, I can never get the evaluation of if to 
 actually take place and as a result, the elsif is invoked and regardless of 
 whether or not the kernel version is = 3.11, the if statement is never 
 run.  From what I gather, this means that the evaluation of if is never 
 happening and the resulting elsif is automatically invoked. 
  
  I've also seen some errors that pertain to string/float comparisons and 
 to my knowledge, facter data is coming back as a string and my version 
 number in the if statement (3.11) is a float and therefore can't be 
 compared due to comparison rules of different data types. 
  
  Does anybody have some words of wisdom that may lead me to the correct 
 syntax for what I'm trying to achieve? 
  
  Thanks in advance to the community for the help. 
  
  Cheers, 
  
  Mike 
  
  
  
  -- 
  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 javascript:. 
  To view this discussion on the web visit 
 https://groups.google.com/d/msgid/puppet-users/5f9249a2-1bab-4f7e-84b5-f5fa6afd3ad7%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/7f1bfdb8-c1c5-4c9c-b7e8-d932425d700f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] String/Float comparison - Puppet and Facter

2015-08-03 Thread Mike Reed
Hello all,

I've been trying to solve what seems to be a simple problem but have yet to 
find the answer.  

I'm trying to do a comparison between the value of a fact and some 
arbitrary value:

if ($::class == 'workstation') and ($::kernelmajversion = '3.11') {
notify {My Kernel version is = ${kernel_test_version} and I'm going 
to upgrade : }

file { 
/usr/src/linux-headers-${kernel_test_version}_${kernel_release_test_version}~precise1_all.deb
 
:
  mode   = '755',
  ensure = 'present',
  source = 
puppet:///modules/kernel/${kernel_test_version}_${kernel_release_test_version}~precise1_all.deb
 }
  }
  
  elsif ($::class == 'workstation') and ($::kernelmajversion = '3.11') {
notify {My Kernel version is = ${kernel_test_version} so I don't need 
to upgrade: }
  }


After invoking a puppet run, I can never get the evaluation of if to 
actually take place and as a result, the elsif is invoked and regardless of 
whether or not the kernel version is = 3.11, the if statement is never 
run.  From what I gather, this means that the evaluation of if is never 
happening and the resulting elsif is automatically invoked.

I've also seen some errors that pertain to string/float comparisons and to 
my knowledge, facter data is coming back as a string and my version number 
in the if statement (3.11) is a float and therefore can't be compared due 
to comparison rules of different data types.

Does anybody have some words of wisdom that may lead me to the correct 
syntax for what I'm trying to achieve?

Thanks in advance to the community for the help.

Cheers,

Mike


-- 
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/5f9249a2-1bab-4f7e-84b5-f5fa6afd3ad7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Newbie: Agent doesn't find master

2015-07-27 Thread Mike Hendon
In the [agent] section of your puppet.conf:
   server=master.example.com

https://docs.puppetlabs.com/puppet/latest/reference/config_file_main.html


On Monday, 27 July 2015 14:41:17 UTC+1, Chris wrote:

 Dear All, 

 sorry, I'm a newbie. 

 My agent doesn't find the master. Where can I specify the master's 
 name? 

 It's working, when the master is called puppet, but not if it has 
 another name ... 

 TIA 

 - Chris 


-- 
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/eb640987-6c48-4700-9233-a0ecd1a9409b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Preferred package provider on Mac?

2015-07-21 Thread Mike Turner
Hi all,

Is there currently a preferred package provider for Mac?  I'm trying to 
determine whether pkgdmg or gem is the better option for a set of packages 
I'm installing.

Thanks,

Mike Turner

-- 
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/7c934833-8c4a-4fe2-a827-0cf9c41e6b73%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Update Windows Tomcat using Puppet

2015-06-26 Thread Mike A.
If there's no way I can use Puppet to install/update Tomcat directly, 
should I use Chocolatey instead?

How reliable is Chocolatey in a production server?

Anyone have any experience?



On Thursday, June 25, 2015 at 8:47:26 PM UTC+8, Mike A. wrote:

 Hi,

 I'm new in using Puppet but I was able to install the server and several 
 clients

 Almost all of our servers are running Windows 2008 with Tomcat 7 
 installed. I would like to know if it's possible to update the installed 
 tomcat to version 8 using Puppet.

 If someone can point me to a tutorial on how to do it, I would greatly 
 appreciate it.

 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/6dce982f-9b18-4886-9bbb-52689ffbdbee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


  1   2   3   4   >