Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-10952

Changing a Puppet setting in a catalog invalidates the env cache in multithreaded mode

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 7.6.0
    • Component/s: None
    • Labels:
    • Template:
    • Team:
      Froyo
    • Story Points:
      2
    • Sprint:
      Froyo - 03/10/2021, Froyo - 03/24/2021, Froyo - 04/7/2021
    • Method Found:
      Manual Test
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Changing the value of Puppet's `rich_data` setting at runtime will no longer invalidate the environment cache.
    • QA Risk Assessment:
      Needs Assessment

      Description

      While doing research on new loader architectures for SERVER-2860, I discovered the following:

      In multithreaded mode in Puppetserver, we create a new settings object whenever a Puppet setting changes while a JRuby request is being processed. One example is if a Puppet function in a module calls Puppet[]=. In the process of initializing the new settings object with overrides (for thread safety), we resolve all settings. The rich_data setting clears out the environment cache when resolved.

      This means if you are changing any Puppet settings in your catalog, in multithreaded mode environment caching is effectively disabled, because the cache will be invalidated on every compile of the offending environment.

      We should find out why the hook is being called in the first place when initializing the threadlocal settings object (we're not altering that setting, and the default hook mode is "on_write_only"), and see if we can avoid it.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              maggie Maggie Dreyer
              Reporter:
              maggie Maggie Dreyer
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support