[Puppet Users] suscribe

2012-09-18 Thread Lunixer


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



[Puppet Users] Puppetdashboard :: cannot add class

2012-09-27 Thread Lunixer
I have puppet running on WEBrick.
Dashboard works. I can see the hosts currently in puppet.
In Dashboard I can add hosts and create groups, but cannot add classes. The 
auto-search returns nothing when I click on a group or server and start 
typing in the Classes textbox.

Is this a common occurrence with Dashboard?
I have looked on the web and found no answer.

Appreciate any pointers.

Thanks.


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



[Puppet Users] Re: Puppetdashboard :: cannot add class

2012-09-27 Thread Lunixer
Wanted to add that I used the CLI with no success.

 rake nodeclass:add name=sudo 


-

On Thursday, September 27, 2012 3:35:02 PM UTC-7, Lunixer wrote:
>
> I have puppet running on WEBrick.
> Dashboard works. I can see the hosts currently in puppet.
> In Dashboard I can add hosts and create groups, but cannot add classes. 
> The auto-search returns nothing when I click on a group or server and start 
> typing in the Classes textbox.
>
> Is this a common occurrence with Dashboard?
> I have looked on the web and found no answer.
>
> Appreciate any pointers.
>
> Thanks.
>
>
>

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



[Puppet Users] Puppet/Passenger :: Could not retrieve catalog from remote server:Error 403 on server

2012-09-28 Thread Lunixer
Greetings,

I have a tested, working setup of Puppet and Webrick. I can add nodes, 
classes, etc.
Then I switched to Puppet/Passenger and get the error  below.
Puppet, Apache and Passenger are all up.

I have installed using *YUM *repos and *GEMs*. So, I have the most updated 
packages they have.

Puppet version: 2.7.19
Ruby version: 1.8.7 (2011-06-30 patchlevel 352 i386)
Apache: 2.2.15

The error is below.
I have found little references on the web. Has anyone come across such 
problem recently?

[root@puppetm01 ~]# puppet agent --test
err: Could not retrieve catalog from remote server: Error 403 on SERVER: 
*Forbidden 
request*: puppetm01.example.com(xxx.xxx.xxx.xxx) access to 
/catalog/puppetm01.example.com [find] at line 53
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run
err: Could not send report: Error 403 on SERVER: *Forbidden request*: 
puppetm01.example.com(xxx.xxx.xxx.xxx) access to 
/report/puppetm01.example.com [save] at line 53

Below is the path to the catalog file to which I believe the error points.

[root@puppetm01 ]# find /var/lib/puppet | grep catalog
./client_yaml/catalog
./client_yaml/catalog/puppetm01.example.com.yaml

Thanks in advance for any pointers.


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



[Puppet Users] Re: Puppetdashboard :: cannot add class

2012-09-28 Thread Lunixer
I figured this out.

On the dashboard:
- Click Add classs
- type in exactly the class name as it exist in the puppet modules 
directory and click create
- Edit a node or group and the auto search will find the class (a.k.a. 
module)



On Thursday, September 27, 2012 3:38:42 PM UTC-7, Lunixer wrote:
>
> Wanted to add that I used the CLI with no success.
>
>  rake nodeclass:add name=sudo 
>
>
> -
>
> On Thursday, September 27, 2012 3:35:02 PM UTC-7, Lunixer wrote:
>>
>> I have puppet running on WEBrick.
>> Dashboard works. I can see the hosts currently in puppet.
>> In Dashboard I can add hosts and create groups, but cannot add classes. 
>> The auto-search returns nothing when I click on a group or server and start 
>> typing in the Classes textbox.
>>
>> Is this a common occurrence with Dashboard?
>> I have looked on the web and found no answer.
>>
>> Appreciate any pointers.
>>
>> Thanks.
>>
>>
>>

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



Re: [Puppet Users] Puppet/Passenger :: Could not retrieve catalog from remote server:Error 403 on server

2012-09-28 Thread Lunixer
Thanks for the reply.

I have checked permissions per the master puppet.conf excerpt below
.
My understanding is that Passenger does not really install anything or 
copies files around. 
You only create a directory and copy the config.ru into it and change 
permissions to puppet.
The only thing that passenger does is to install a Apache module, then you 
configure your vhost with that info.

I don't know whether I could blame the problem on any of the other packages 
(I.e. ruby), because things work perfectly fine with WEBrick.

Below I added more information. Please let me know If anyone spots 
something out of place.

*[root@puppetm01 puppet]# cat puppet.conf*
[main]
user = puppet
group = puppet


*[root@puppetm01 ]# ls -l /var/lib/puppetmaster/*
-rw-r--r-- 1 puppet puppet  431 Sep 27 21:51 config.ru
drwxr-xr-x 2 puppet puppet 4096 Sep 27 21:31 public
drwxr-xr-x 2 puppet puppet 4096 Sep 27 21:31 tmp

*[root@puppetm01 ~]# ps -ef | grep puppet*
avahi 1989 1  0 09:34 ?   00:00:00 avahi-daemon: running 
[puppetm01.local]
root  2666 1  0 09:34 ?   00:00:01 /usr/bin/ruby /usr/sbin/puppetd
puppet9734  9541  2 12:35 ?   00:00:00 
master  
  

puppet9769 1  0 12:35 ?   00:00:00 Rack: /var/lib/puppetmaster  

 


*
[root@puppetm01 ]# grep puppet /etc/passwd*
puppet:x:52:52:Puppet:/var/lib/puppet:/sbin/nologin
puppetdb:x:494:488:PuppetDB daemon:/usr/share/puppetdb:/sbin/nologin
puppet-dashboard:x:492:489:Puppet 
Dashboard:/usr/share/puppet-dashboard:/sbin/nologin

*[root@puppetm01 ]# id -a puppet*
uid=52(puppet) gid=52(puppet) groups=52(puppet)
*
[root@puppetm01 ~]# passenger-memory-stats *

 Apache processes -
PID   PPID  VMSize   Private  Name
---
9534  1 26.8 MB  0.3 MB   /usr/sbin/httpd
9551  9534  26.7 MB  0.2 MB   /usr/sbin/httpd
9552  9534  26.8 MB  0.2 MB   /usr/sbin/httpd
9553  9534  27.0 MB  0.5 MB   /usr/sbin/httpd
9554  9534  27.0 MB  0.5 MB   /usr/sbin/httpd
9555  9534  26.8 MB  0.3 MB   /usr/sbin/httpd
9556  9534  26.8 MB  0.2 MB   /usr/sbin/httpd
9557  9534  26.9 MB  0.3 MB   /usr/sbin/httpd
9558  9534  26.8 MB  0.2 MB   /usr/sbin/httpd
9559  9534  26.8 MB  0.2 MB   /usr/sbin/httpd
### Processes: 10
### Total private dirty RSS: 3.00 MB


 Nginx processes 

### Processes: 0
### Total private dirty RSS: 0.00 MB


 Passenger processes 
PID   VMSize   Private  Name
-
9536  6.7 MB   0.2 MB   PassengerWatchdog
9539  17.8 MB  0.4 MB   PassengerHelperAgent
9541  18.7 MB  4.9 MB   Passenger spawn server
9544  13.2 MB  0.4 MB   PassengerLoggingAgent
9769  51.8 MB  26.0 MB  Rack: /var/lib/puppetmaster
9802  60.6 MB  36.6 MB  Passenger ApplicationSpawner: 
/usr/share/puppet-dashboard
9808  61.1 MB  37.2 MB  Rails: /usr/share/puppet-dashboard
### Processes: 7
### Total private dirty RSS: 105.69 MB

*
[root@puppetm01 ~]# passenger-status --verbose*
--- General information ---
max  = 12
count= 2
active   = 0
inactive = 2
Waiting on global queue: 0

--- Application groups ---
/usr/share/puppet-dashboard:
  App root: /usr/share/puppet-dashboard
  * PID: 9808Sessions: 0Processed: 2   Uptime: 58s
  URL : http://127.0.0.1:50447
  Password: xx

/var/lib/puppetmaster:
  App root: /var/lib/puppetmaster
  * PID: 9769Sessions: 0Processed: 2   Uptime: 1m 56s
  URL : http://127.0.0.1:55087
  Password: xx

*[root@puppetm01 ~]# tail -f /var/log/httpd/access_log
xxx.xxx.xxx.xxx - - [28/Sep/2012:12:39:20 -0700] "POST 
/production/catalog/puppetm01.example.com HTTP/1.1" 403 138 "-" "-"
xxx.xxx.xxx.xxx - - [28/Sep/2012:12:39:20 -0700] "PUT 
/production/report/puppetm01.example.com HTTP/1.1" 500 635 "-" "-"
xxx.xxx.xxx.xxx - - [28/Sep/2012:12:39:30 -0700] "POST 
/production/catalog/puppetm01.example.com HTTP/1.1" 403 138 "-" "-"
xxx.xxx.xxx.xxx - - [28/Sep/2012:12:39:33 -0700] "PUT 
/production/report/puppetm01.example.com HTTP/1.1" 403 137 "-" "-"


[root@puppetm01 ~]# find /var/lib/puppet | grep catalog | xargs ls -l
-rw-r-. 1 root root 13150 Sep 27 21:00 
/var/lib/puppet/client_yaml/catalog/puppetm01.example.com.yaml

/var/lib/puppet/client_yaml/catalog:
total 16
-rw-r-. 1 root root 13150 Sep 27 21:00 puppetm01.example.com.yaml*



Thanks,
LL
-


On Friday, September 28, 2012 10:53:35 AM UTC-7, Jo wrote:
>
> Check the owner of config.ru. The owner of this file is who passenger 
> will run the puppetmaster daemon as. I'm guessing that it's not owned by 
&g

Re: [Puppet Users] Puppet/Passenger :: Could not retrieve catalog from remote server:Error 403 on server

2012-09-29 Thread Lunixer
Adding more troubleshooting info at the link below.

http://pastebin.com/AvCJSQgk

I recreated the certificates and rebooted the system, but still same result.
I really hope to get to the bottom of this. I cannot find a meaningful 
reference anywhere.






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



Re: [Puppet Users] Puppet/Passenger :: Could not retrieve catalog from remote server:Error 403 on server

2012-10-01 Thread Lunixer
Does anyone have a hint to address this problem?

Or,

Is this destined to stump many a puppet enthusiast?
If this is a bug, where does one notify puppet labs of it?

LL


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



Re: [Puppet Users] Puppet/Passenger :: Could not retrieve catalog from remote server:Error 403 on server

2012-10-01 Thread Lunixer
I don't think this is trivial. If it were, I would have already found the 
problem by looking at the obvious things.
What I have seen from several posts is that there's other error similar to 
the one I've seen. I even came across a bug report filed a while back with 
the same error I see, but I lost the link and cannot find it.

The problem is not even from a client to the master. The testing I've done 
is all in the master.

I'll try strace instead of tcpdump, being that this is not a TCP 
communication problem over the wire but rather a file or directory access 
problem.


LL


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



[Puppet Users] Re: Need help with dashboad configuration..

2012-10-03 Thread Lunixer
It does take some reading.

The main doc page[1] has information plus several resources[2] here and 
there.
Follow the instructions here[3] to install the puppetlabs repo so you can 
use yum.
When you do "yum install puppet-dashboard", it creates the unix account. Do 
"grep puppet /etc/passwd" and you'll see the account there.

[1] http://docs.puppetlabs.com/dashboard/manual/1.2/bootstrapping.html
[2] http://www.how2centos.com/installing-puppet-dashboard-on-centos-5-5/
[3] http://docs.puppetlabs.com/guides/puppetlabs_package_repositories.html

LL


http://docs.puppetlabs.com/dashboard/manual/1.2/bootstrapping.html

On Wednesday, October 3, 2012 4:10:20 AM UTC-7, Rajeev Iyer wrote:
>
> Hi,
>
>   I am new to this.
>
> Can someone lead me to a step by step configuration for dashboard. The 
> ones on the web is too confusing.
> Like, it says we need to have an entry for puppet-dashboard in 
> /etc/passwd. So how does that look like?
>
> Rajeev
>
>

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



[Puppet Users] puppet time stamp check

2014-07-23 Thread Lunixer
Greetings,

I have an entry for a file in a puppet manifest that checks file properties.

/etc/puppet/modules/Linux/manifests/init.pp
file {"/etc/ld.so.conf": mode=>"644", owner=>"root", group=>"root",
checksum=>"md5", audit=>all; }

An admin patched the server and several file checksums changed. Now the
puppet client keeps sending messages like the one below.

Tue Jul 22 20:25:15 -0700 2014
/Stage[main]/Linux/File[/etc/ld.so.conf]/ctime (notice): audit change:
previously recorded value Wed Aug 21 14:52:17 -0700 2013 has been changed
to Tue Jul 22 20:25:10 -0700 2014

I was just given this task to solve but don't have much puppet knowledge.
I could not find much information by searching the web except for some bug
related threads.
Could you advice me how to fix that?


-- 

thanks,
[ Lunixer ]

-- 
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/CACZbbm6HCv-zrRfpUUaSwtFV8%2BG%3DDYjPeGJyN6u%2BquMiiHOijA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] puppet md5 checksum changed

2014-07-23 Thread Lunixer
I have an entry for a file in a puppet manifest that checks file
properties. One is the MD5 checksum.

/etc/puppet/modules/Solaris/manifests/init.pp
file {"/etc/logadm.conf": mode=>"644", owner=>"root", group=>"sys",
checksum=>"md5", audit=>all; }

Wed Jul 23 03:31:41 -0700 2014
/Stage[main]/Solaris/File[/etc/logadm.conf]/content (notice): audit change:
previously recorded value {md5}4313e436be52ffe7a8296aec05612c0b has been
changed to {md5}fee96725c6872531af6e65b410f62a3d

How do you make the message go away?

-- 

thanks,
[ Lunixer ]

-- 
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/CACZbbm5VPEu%2BrSF%3D0Jy7R0%2B3zdPYTTpLqN8boJYAfONX8Q%2BC3A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: puppet md5 checksum changed

2014-07-24 Thread Lunixer
Does anyone have a tip regarding this?
How do I stop it?

I know that the "audit=>all" is causing this.
It recorded the MD5 sum of the file when the audit ran for the first time.
But a newer file was created as a result of patching the client machine.
Is there a command I could rerun on the client or the server to make puppet
aware of the new MD5 sum?


Lun.



On Wed, Jul 23, 2014 at 3:58 PM, Lunixer  wrote:

>
> I have an entry for a file in a puppet manifest that checks file
> properties. One is the MD5 checksum.
>
> /etc/puppet/modules/Solaris/manifests/init.pp
> file {"/etc/logadm.conf": mode=>"644", owner=>"root", group=>"sys",
> checksum=>"md5", audit=>all; }
>
> Wed Jul 23 03:31:41 -0700 2014
> /Stage[main]/Solaris/File[/etc/logadm.conf]/content (notice): audit change:
> previously recorded value {md5}4313e436be52ffe7a8296aec05612c0b has been
> changed to {md5}fee96725c6872531af6e65b410f62a3d
>
> How do you make the message go away?
>
> --
>
> thanks,
> [ Lunixer ]
>



-- 

thanks,
[ Lunixer ]

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


Re: [Puppet Users] Re: puppet md5 checksum changed

2014-07-24 Thread Lunixer
Thanks for the pointer. I believe this does it.

No need to stop the puppet agent. Just two things:
- blank the /var/lib/puppet/state/state.yaml file
- run the puppet agent
New values are recorded.


Blank the file.
#  cp /dev/null state.yaml

Run the agent.

# /opt/puppet/bin/puppet agent --test
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/ensure: audit change:
newly-recorded value file
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/content: audit change:
newly-recorded value {md5}e08b47228d3d97a3dbe2004d821500b2
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/target: audit change:
newly-recorded value notlink
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/owner: audit change:
newly-recorded value 0
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/group: audit change:
newly-recorded value 3
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/mode: audit change:
newly-recorded value 644
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/type: audit change:
newly-recorded value file
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/seluser: audit change:
newly-recorded value
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/selrole: audit change:
newly-recorded value
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/seltype: audit change:
newly-recorded value
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/selrange: audit change:
newly-recorded value
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/ctime: audit change:
newly-recorded value Thu Jul 24 03:10:00 -0700 2014
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/mtime: audit change:
newly-recorded value Thu Jul 24 03:10:00 -0700 2014

Next run is  normal

# /opt/puppet/bin/puppet agent --test
warning: iconv couldn't be loaded, which is required for UTF-8/UTF-16
conversions
info: Caching catalog for host.example.com
info: Applying configuration version '1406237846'
notice: Finished catalog run in 0.42 second

The puppet agent writes the information to state.yaml.

# ls -l /var/lib/puppet/state
total 370
drwxr-xr-x   2 root root   5 Oct 25  2012 graphs
-rw-rw   1 root root  420363 Jul 24 14:19 last_run_report.yaml
-rw-rw   1 root root 243 Jul 24 14:19 last_run_summary.yaml
-rw-r--r--   1 root root2825 Jul 24 14:19 resources.txt
-rw-rw   1 root root   42639 Jul 24 14:19 state.yaml

The file state.yaml records the MD5 sum.

# view /var/lib/puppet/state/state.yaml
  "File[/etc/logadm.conf]":
!ruby/sym type: file
!ruby/sym checked: 2014-07-24 15:14:08.612241 -07:00
!ruby/sym target: !ruby/sym notlink
!ruby/sym owner: 0
!ruby/sym seltype:
!ruby/sym group: 3
!ruby/sym selrange:
!ruby/sym mode: "644"
!ruby/sym seluser:
!ruby/sym mtime: 2014-07-24 03:10:00.00 -07:00
!ruby/sym ensure: !ruby/sym file
!ruby/sym content: "{md5}e08b47228d3d97a3dbe2004d821500b2"
!ruby/sym selrole:
!ruby/sym ctime: 2014-07-24 03:10:00.00 -07:00

The last run is recorded in the file below.

# view /var/lib/puppet/state/last_run_report.yaml
"File[/etc/logadm.conf]": !ruby/object:Puppet::Resource::Status
  change_count: 0
  changed: false
  evaluation_time: 0.000796
  events: []
  failed: false
  file: *id001
  line: 73
  out_of_sync: false
  out_of_sync_count: 0
  resource: "File[/etc/logadm.conf]"
  resource_type: File
  skipped: false
  tags:
- file
- class
- Solaris
  time: 2014-07-24 15:14:08.611898 -07:00
  title: /etc/logadm.conf

Thanks,
Lun


On Thu, Jul 24, 2014 at 11:48 AM, Christopher Wood <
christopher_w...@pobox.com> wrote:

> I was vaguely nosy, and found a note that the checksum is stored in
> state.yaml. Maybe stop puppet, nuke the state file, and start puppet?
>
> http://puppetlabs.com/blog/all-about-auditing-with-puppet
>
> /var/lib/puppet/state/state.yaml
>
> NB: Untested advice, potentially dangerous, use at your own risk.
>
> On Thu, Jul 24, 2014 at 11:35:14AM -0700, Lunixer wrote:
> >Does anyone have a tip regarding this?
> >How do I stop it?
> >
> >I know that the "audit=>all" is causing this.
> >It recorded the MD5 sum of the file when the audit ran for the first
> time.
> >But a newer file was created as a result of patching the client
> machine.
> >Is there a command I could rerun on the client or the server to make
> >puppet aware of the new MD5 sum?
> >
> >Lun.
> >
> >On Wed, Jul 23, 2014 at 3:58 PM, Lunixer <[1]luni...@gmail.com>
> wrote:
> >
> >  I have an entry for a file in a puppet manifest that checks file
> >  properties. One is the MD5 checksum.
> >
> >  /etc/puppet/modules/Solaris/manifests/init.pp
> >  file {&

[Puppet Users] Re: puppet time stamp check

2014-07-24 Thread Lunixer
Adding this for informational purposes.
This problem was related to the one I posted in another thread. The fix is
below.

Blank the file.
#  cp /dev/null /var/lib/puppet/state/state.yaml

Run the agent.

# /opt/puppet/bin/puppet agent --test
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/ensure: audit change:
newly-recorded value file
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/content: audit change:
newly-recorded value {md5}e08b47228d3d97a3dbe2004d821500b2
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/target: audit change:
newly-recorded value notlink
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/owner: audit change:
newly-recorded value 0
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/group: audit change:
newly-recorded value 3
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/mode: audit change:
newly-recorded value 644
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/type: audit change:
newly-recorded value file
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/seluser: audit change:
newly-recorded value
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/selrole: audit change:
newly-recorded value
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/seltype: audit change:
newly-recorded value
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/selrange: audit change:
newly-recorded value
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/*ctime*: audit change:
newly-recorded value Thu Jul 24 03:10:00 -0700 2014
notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/*mtime*: audit change:
newly-recorded value Thu Jul 24 03:10:00 -0700 2014

Lun.


On Wed, Jul 23, 2014 at 3:44 PM, Lunixer  wrote:

> Greetings,
>
> I have an entry for a file in a puppet manifest that checks file
> properties.
>
> /etc/puppet/modules/Linux/manifests/init.pp
> file {"/etc/ld.so.conf": mode=>"644", owner=>"root", group=>"root",
> checksum=>"md5", audit=>all; }
>
> An admin patched the server and several file checksums changed. Now the
> puppet client keeps sending messages like the one below.
>
> Tue Jul 22 20:25:15 -0700 2014
> /Stage[main]/Linux/File[/etc/ld.so.conf]/ctime (notice): audit change:
> previously recorded value Wed Aug 21 14:52:17 -0700 2013 has been changed
> to Tue Jul 22 20:25:10 -0700 2014
>
> I was just given this task to solve but don't have much puppet knowledge.
> I could not find much information by searching the web except for some bug
> related threads.
> Could you advice me how to fix that?
>
>
> --
>
> thanks,
> [ Lunixer ]
>



-- 

thanks,
[ Lunixer ]

-- 
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/CACZbbm5G-TWV%3D1oB6q_tT2kvivnh7X13uYyZ%3Dnuu37nZDMisYQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] puppet template syntax problem: undefined method `each' for nil:NilClass

2015-08-18 Thread Lunixer
I was going through the Puppet Learning doc.
Got to the template section and the ERB file, which is using the 'each' 
method to print the $real_servers.
The puppet run fails with pointing to the 'each' method.
Is this a bug? does anyone have any pointers? 

Using:
centos 6.6
puppet 3.8.1
ruby 1.8.7

Thanks.

# cat /etc/puppet/modules/ntp/manifests/init.p 
class ntp {

# Choose platform, package name, and config file name
case $operatingsystem {
centos, redhat: {
$service_name = 'ntpd'
$conf_file = 'ntp.conf'
$default_servers = [ "0.centos.pool.ntp.org",
 "1.centos.pool.ntp.org",
 "2.centos.pool.ntp.org", ]
}
debian, ubuntu: {
$service_name = 'ntp'
$conf_file = 'ntp.conf.debian'
$default_servers = [ "0.debian.pool.ntp.org iburst",
 "1.debian.pool.ntp.org iburst",
 "2.debian.pool.ntp.org iburst",
"3.debian.pool.ntp.org iburst", ]
}
default: { fail("Unrecognized operating system for webserver") }
}

$servers_real = $default_servers

# Install the package
package { 'ntp':
ensure => installed,
}

# Get the config file
file { 'ntp.conf':
path => '/etc/ntp.conf',
ensure => file,
require => Package['ntp'],
content => template("ntp/${conf_file}.erb"),
}

# Manage the service
service { 'ntp':
name => $service_name,
ensure => running,
enable => true,
subscribe => File['ntp.conf'],
}

} #class



# cat /etc/puppet/modules/ntp/templates/ntp.conf.erb
<% @servers_real.each do |this_server| -%>
server <%= this_server %>
<% end -%>


#  puppet agent --test
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Failed to parse template ntp/ntp.conf.erb:
  Filepath: /etc/puppet/modules/ntp/templates/ntp.conf.erb
  Line: 2
  Detail: undefined method `each' for nil:NilClass
 at /etc/puppet/modules/ntp/manifests/init.pp:26 on node 
puppetmaster.example.com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

-- 
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/5d089681-9deb-4806-a3b1-4dbaa5bbe1d6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppet template syntax problem: undefined method `each' for nil:NilClass

2015-08-19 Thread Lunixer
The filename is actually correct.
The post above has the typo.

I had use this same module in it's simpler form as given in the learning 
doc and had no problems. It's only with the each part of it.
BTW, pardon my ignorance, how do you clear the puppet cache?

# ll manifests/manifests/ntp
total 8
-rw-r--r--. 1 root root 830 Aug 17 09:01 init.pp
 
 
# cat /etc/puppet/manifests/site.pp
include ntp

-- 
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/c157c583-acae-41ff-8c8f-c5cbdc827204%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppet template syntax problem: undefined method `each' for nil:NilClass

2015-08-19 Thread Lunixer
Also, to check whether it's ruby version issue, I put the code in a small 
script (test.rb) to test and there is no problem at all.
This seems to be a puppet template issue. A bug, maybe?

#!/usr/bin/env ruby

$default_servers = [ "0.debian.pool.ntp.org iburst",
 "1.debian.pool.ntp.org iburst",
 "2.debian.pool.ntp.org iburst",
 "3.debian.pool.ntp.org iburst", ]

$servers_real = $default_servers

$servers_real.each do |this_server|
  puts this_server
end 

No problem executing the code outside puppet.

#./test.rb

0.debian.pool.ntp.org iburst
1.debian.pool.ntp.org iburst
2.debian.pool.ntp.org iburst
3.debian.pool.ntp.org iburst




-- 
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/02e9d496-b1d9-4103-ab44-740ef33172fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppet template syntax problem: undefined method `each' for nil:NilClass

2015-08-20 Thread Lunixer
I destroyed the VM in which I was doing this and recreated it.
Created the module again as seen in the first post and it worked. No idea 
what was wrong.
Thanks for the pointers.

-- 
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/73585b00-ed10-42a4-acb3-5dd196639dde%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.