Lately I’ve noticed my class imports are going super slow. Talking 20 minutes or so, with constant/frequent timeout failures causing me to have to retry. We have ~800 classes per environment across 20 environments (don’t ask why we have so many environments…) I know there is an issue around 1024 classes but I “should” be below that. Specifically this is Puppet 4.9.4 on Foreman 1.16.0 and RHEL 7.4
My Smart proxy log shows this frequently during a class import:
W, [2018-03-28T15:37:58.095007 bdabd58c] WARN -- : Puppet server classes cache is disabled, classes retrieval can be slow.
I take this to mean my classes cache is disabled - which I don’t believe to be true (see files below)
How can i “verify” whether this is a false positive log message (and why its triggering) or whether there is something I’m missing in terms of configuring all this to ensure the classes cache is used? Is there some API I can hit to verify whether the classes cache is truly enabled or not?
Note: these below files have been in place and all services (and servers) restarted numerous times without resolving it at this point, so i don’t believe it to be a service restart to update new settings type issue…
PuppetServer itself:
[root@fmnpmpro4 foreman-proxy]# cat /etc/puppetlabs/puppetserver/conf.d/puppetserver.conf | grep environment-class-cache
environment-class-cache-enabled: true
Foreman Proxy’s puppet.yml
[root@fmnpmpro4 settings.d]# cat puppet.yml
---
# Puppet management
:enabled: https
# valid providers:
# puppet_proxy_puppetrun (for puppetrun/kick, deprecated in Puppet 3)
# puppet_proxy_mcollective (uses mco puppet)
# puppet_proxy_ssh (run puppet over ssh)
# puppet_proxy_salt (uses salt puppet.run)
# puppet_proxy_customrun (calls a custom command with args)
#:use_provider: puppet_proxy_puppetrun
:puppet_version: 4.9.4
Foreman Proxy’s Puppet Proxy Legacy
[root@fmnpmpro4 settings.d]# cat puppet_proxy_legacy.yml
#
# puppet_proxy_legacy module is used for puppet versions prior to 4.0
#
# puppet_proxy_legacy is configured automatcially based on
# :puppet_version setting in smart-proxy's puppet.yml configuration file.
#
---
:puppet_conf: /etc/puppetlabs/puppet/puppet.conf
#
# Override use of Puppet's API to list environments, by default it will use only if
# environmentpath is given in puppet.conf, else will look for environments in puppet.conf
# (Puppet versions prior to 4.0 only)
#:use_environment_api: true
#
# URL of the puppet master itself for API requests. Required if puppet_use_environment_api is set to true.
:puppet_url: https://fmnpmpro4.<REMOVED>:8140
#
# SSL certificates used to access the environment API. Required if puppet_use_environment_api is set to true.
:puppet_ssl_ca: /etc/puppetlabs/puppet/ssl/certs/ca.pem
:puppet_ssl_cert: /etc/puppetlabs/puppet/ssl/certs/fmnpmpro4.<REMOVED>.pem
:puppet_ssl_key: /etc/puppetlabs/puppet/ssl/private_keys/fmnpmpro4.<REMOVED>.pem
#
# Enable/disable puppet class cache
# Cache options
#:use_cache: true
Foreman Proxy puppet_proxy_puppet_api.yml
[root@fmnpmpro4 settings.d]# cat puppet_proxy_puppet_api.yml
#
# puppet_proxy_pupppet_api module is used for puppet versions 4.0 and higher
#
# puppet_proxy_pupppet_api is configured automatcially based on
# :puppet_version setting in smart-proxy's puppet.yml configuration file.
#
---
# URL of the puppet master itself for API requests.
:puppet_url: https://fmnpmpro4.<REMOVED>:8140
#
# SSL certificates used to access the puppet API
:puppet_ssl_ca: /etc/puppetlabs/puppet/ssl/certs/ca.pem
:puppet_ssl_cert: /etc/puppetlabs/puppet/ssl/certs/host.pem
:puppet_ssl_key: /etc/puppetlabs/puppet/ssl/private_keys/host.pem
:api_timeout: 180