Details
-
New Feature
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
PUP 6.0.0
-
None
-
None
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.