I began to integrate and work with foreman on version 1.14.x. Everything works fine, the logs are clean.
After upgrade to 1.15.x or 16.0 - even if i make a fresh installation on a new machine - i get every 3-5 minutes the warning:
Puppet server classes cache is disabled, classes retrieval can be slow.
Because it causes on upgrade and fresh installation, i first think its a bug. But when 1.16.0 is released, i also got this message. I “solve this” with setting “environment-class-cache-enabled: true” at the puppetserver.conf in /etc/puppetlabs/puppetserver/conf.d
What im wondering is, that on my Foreman 1.14.3 VM’s i never got this warning, even the environment-class-cache-enabled is set to false by default.
So my question is, did i do sth. wrong with the upgrade/fresh installation that i retrieve this warning or is it “work by design” that it causes on higher versions and not at 1.14.x ?
i see the warning (not an error) in the smart proxy log over the foreman interface.
it seems time based
it happens on all versions after 1.14.3 - so 1.15.x and 1.16.0
it happen after a upgrade and a fresh installation of foreman 1.15.x and 1.16.0 over the foreman-installer. I tryed it multiple times in different environments at home and work. I follow the whole installation guide in the foreman documentation.
So what i can say is:
it seems the puppet class cache is always disabled by default at foreman-installer installation. So the warning seems right. Iam wondering why it does not pull the warning at foreman 1.14.3 … whatever… i have upgrade alredy. Seems it must be answered by the dev’s if they want or dont want to enable the puppet class cache by default.
Iam pretty sure now everybody get this warning who do not configure this explicity after a fresh installation via. foreman-installer.
This warning is an attempt to make the system’s administrator aware of a potential slowdown and a way to resolve it.
Smart-proxy’s puppet module was updated to use puppet environment classes api in version 1.15. The a[i call that retrieves classes is much faster with classes cache enabled, which is why the warning has been added (and the reason why it wasn’t there in previous versions).
The solution right now would be to rerun the installer with --puppet-server-environment-class-cache-enabled true but I don’t know the exact impact of that change. It might make sense to enable it by default if that’s safe.
the impact of that change is that the “import from environments” button at “puppet classes” in foreman-ui does not refresh the class cache. So changing, adding or deleting of a puppet class needs a reboot of the master server. Not very smart at all.
Thanks for the answer! That explains a lot.
The Problem is now that the import of new, deleteted or changed classes via. foreman-ui does not work properly when the class cache is enabled, because no changes are recocnized. It seems the import button does not refresh the masters class cache. So you have always to reboot for reload the cache.