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

Applying cached catalogs should read in deferred functions

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • PUP 6.0.0
    • PUP 6.0.0
    • None
    • None
    • Not Needed
    • Bug in not yet released feature.
    • 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

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

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support