Puppet server classes cache is disabled, classes retrieval can be slow.

Solution Verified - Updated

Environment

  • Red Hat Satellite and Capsule.

Issue

  • Red Hat Satellite Capsule logs filled with the warning messages.
"Puppet server classes cache is disabled, classes retrieval can be slow."

Resolution

  • To avoid the warning in the logs, disable it in the code:
/usr/share/foreman-proxy/modules/puppet_proxy_puppet_api/v3_environment_classes_api_classes_retriever.rb

     63   def get_classes(environment)
     64     future = async_get_classes(environment)
     65     cache_used = @m.synchronize { !!@etag_cache[environment] } #etags are only available when classes cache is enabled
     66     client_timeout = cache_used ? DEFAULT_CLIENT_TIMEOUT : api_timeout
     67     logger.warn("Puppet server classes cache is disabled, classes retrieval can be slow.") unless cache_used 
  • Comment line number 67.

  • If the parameter in the puppet-server configuration is enabled that will remove the warning that it might impact the functionality of "import from environments” button at “puppet classes” in Satellite UI, it would not refresh the class cache.

# cat /etc/puppetlabs/puppetserver/conf.d/puppetserver.conf | grep environment-class-cache
    environment-class-cache-enabled: false

OR

  • Enable the cache for puppet:
# satellite-installer --scenario satellite --puppet-server-environment-class-cache-enabled true
# satellite-installer --scenario capsule --puppet-server-environment-class-cache-enabled true

For more KB articles/solutions related to Red Hat Satellite 6.x Puppet Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x Puppet Issues

SBR
Product(s)
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.