You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
check_puppet.rb doesn't complain when it doesn't have read permissions #11
check_puppet.rb gives a false sense of security if it doesn't have the correct read permissions, claiming no failed resources or events:
[dieter.plaetinck@dfvimeopweb1 ~]$ /usr/local/bin/check_puppet.rb -w 1200 -c 3600
OK: last run 8 minutes ago with 0 failed resources 0 failed events and currently enabled|time_since_last_run=522s;1200;3600;0 failed_resources=0;;;0 failed_events=0;;;0
[dieter.plaetinck@dfvimeopweb1 ~]$ sudo /usr/local/bin/check_puppet.rb -w 1200 -c 3600
OK: last run 8 minutes ago with 4 failed resources 4 failed events and currently enabled|time_since_last_run=526s;1200;3600;0 failed_resources=4;;;0 failed_events=4;;;0
For some reason, I'm getting this error even if the file is present and permission is correct:
UNKNOWN: Summary file not found or not readable. Check /var/lib/puppet/state/last_run_summary.yaml
Activity
ripienaar commentedon Jan 13, 2014
should be an easy check, wanna give it a try fixing it?
kstalledo commentedon Jan 13, 2017
For some reason, I'm getting this error even if the file is present and permission is correct:
UNKNOWN: Summary file not found or not readable. Check /var/lib/puppet/state/last_run_summary.yaml
Any idea?
ripienaar commentedon Jan 13, 2017
@kstakledo so where is your file called that? There is a CLI flag to configure the path.
kstalledo commentedon Jan 13, 2017
drwxr-xr-t 3 puppet puppet 4096 Jan 13 16:20 .
drwxr-x--- 12 puppet puppet 4096 Apr 9 2016 ..
-rw-r----- 1 root root 1024 Jan 13 16:20 classes.txt
drwxr-xr-x 2 root root 4096 Sep 29 2015 graphs
-rw-r----- 1 root root 160267 Jan 13 16:20 last_run_report.yaml
-rw-r--r-- 1 root root 874 Jan 13 16:20 last_run_summary.yaml
-rw-r----- 1 root root 6096 Jan 13 16:20 resources.txt
-rw-rw---- 1 root root 82239 Jan 13 16:20 state.yaml
root@dc1-aie-fms-01:/var/lib/puppet/state#
I already configured the flag. Same thing.
ripienaar commentedon Jan 13, 2017
And you ran the check as root?
kstalledo commentedon Jan 13, 2017
it's being ran as a different user, but as you can see the file is readable by everyone based on its permission.
ripienaar commentedon Jan 13, 2017
The parent dir is not.
kstalledo commentedon Jan 13, 2017
Good spot! Let me try and check.
kstalledo commentedon Jan 13, 2017
Nope, didn't work. Even with 777 permission on both the directory and the file.
ripienaar commentedon Jan 13, 2017
As the user you are running the the check as. Can you cat the file?
kstalledo commentedon Jan 13, 2017
just added the user that does the check to the puppet group. all working now. thanks!