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

Applying cached catalogs should read in deferred functions

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PUP 6.0.0
    • Fix Version/s: PUP 6.0.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Team:
      Froyo
    • Release Notes:
      Not Needed
    • Release Notes Summary:
      Bug in not yet released feature.
    • QA Risk Assessment:
      Needs Assessment

      Description

      When the agent caches a catalog that contains a deferred function, that deferred function is converted into a string to be written to the cache. The agent emits the following text during the caching process:

      Info: Caching catalog for agent.docker
      Warning: Notify[example]['message'] contains an Anonymous Class value. It will be converted to the String 'Deferred({'name' => 'vault_lookup', 'arguments' => ['secret/test']})' (file: /etc/puppetlabs/code/environments/production/manifests/init.pp, line: 4)
      

      The agent then proceeds to apply the catalog and call the functions that have been deferred. However, if it is specified that the agent use the cached catalog, it will not read in those values as a class but as a string, resulting in no function calls during application time.

      Ideally, applying the cached catalog should be identical to the behavior of applying the catalog received from the puppetmaster.

        Attachments

          Activity

            People

            Assignee:
            tony.vu Tony Vu
            Reporter:
            tony.vu Tony Vu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support