puppet cert --list
Be mindful of your free space! I've now rolled out 20 servers or so in my puppet setup (soon to be duplicated to over 142 servers once I get these running right. All I'll have to do is spin up a new server, give it an IP and hostname and tell it where the Puppet Master is and Puppet will handle the rest!), and I've found that I'm starting to easily fill up the drive with old reports. Especially when re-running puppet syncs more frequently than the normal 30 min run-interval. I started getting the above error with a lot of various puppet commands, the simplest one, just trying to list certs. Then I checked a "df -h":
Error: header too long
# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 16G 15G 0 100% /
#!/bin/sh days="+1" # more than a day old for d in `find /var/lib/puppet/reports -mindepth 1 -maxdepth 1 -type d` do find $d -type f -name \*.yaml -mtime $days | sort -r | tail -n +2 | xargs /bin/rm -f done
# cd /var/lib/puppet # find ./|grep betamem ./ssl/ca/requests/betamem.example.com
# rm -f /var/lib/puppet/ssl/certificate_requests/* # /etc/init.d/puppet restart Stopping puppet agent: [ OK ] Starting puppet agent: [ OK ]
# tail /var/log/messages -n1 puppet-master[22486]: betamem.example.com has a waiting certificate request # puppet cert --sign betamem.example.com Signed certificate request for betamem.example.com Removing file Puppet::SSL::CertificateRequest at '/var/lib/puppet/ssl/ca/requests/betamem.example.com.pem'
I had this same issue - reports filled up /var, and the new agent certificate on puppet master ended up empty. Thanks for the guide!
ReplyDeleteThanks worked great.
ReplyDelete