Hello,

When using puppet 7 (via the Debian package provided by puppetlabs) on a 
client, at the end of the agent call, I get an error while sending the 
report:

```
Notice: Applied catalog in 9.54 seconds
Error: Could not send report: undefined method `split' for :file:Symbol
```

After plenty digging, it seems that the error occurs in Psych 2.7.0, more 
specifically in the accept function defined in psych/visitors/yaml_tree.rb 
. When calling `send(@dispatch_cache[target.class], target)`, the 
dispatch_cache hash executes this snippet of code :

```
method = "visit_#{(klass.name || '').split('::').join('_')}"
```

The thing is, sometimes, klass is a Puppet type, eg "Puppet::Type::File". 
In that case, klass.name is a Symbol ("file") and not a String. Therefore 
"split" isn't defined and the code crashes.

Looking at the code in recent puppet releases I can't find significant 
changes.

My question is therefore, is it normal that send_report sends elements that 
provide "Puppet::Type" classes to outside modules? If not, why is it 
happening?

Happy to provide more intel and debug.

Cheers!

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/7a1bbe3f-ab0a-47b0-a949-d81ad31b37a6n%40googlegroups.com.

Reply via email to