puppetlabs / puppetserver

Server automation framework and application
https://tickets.puppetlabs.com/browse/SERVER
Apache License 2.0
292 stars 235 forks source link

(maint) Allow not applying settings catalog on startup #2855

Closed justinstoller closed 3 months ago

justinstoller commented 3 months ago

On initialization of a JRuby instance, Puppet will compile and apply a catalog containing resources for the configured directories specified in the appropriate settings sections. The goal of this is to ensure any directories Puppet requires exist. In practice this should be managed by our packages. Attempting to apply a catalog every time a JRuby instance is unnecessary, slow, and causes race conditions when attempting to instantiate JRuby instances in parallel.

Puppet has a setting "settings_catalog" that controls this behavior. This PR addresses issues that arise when we set "settings_catalog" to false:

  1. In code the process of compiling a settings catalog brings most of Puppet's ruby code into scope. When not compiling a settings catalog we must actually declare our dependencies.
  2. The $yamldir/facts directory is not created by packages despite being used by default.
justinstoller commented 3 months ago

Built a package based on main with this PR in 8.6.1.SNAPSHOT.2024.06.04T0845 and successfully ran the Puppet Server smoke tests and full acceptance (based on Puppet's acceptance tests that contain the server tag).