On Mon, Feb 11, 2019 at 7:33 AM Andreas Zuber <[email protected]> wrote:
> Hello > > We are in progress of moving from Puppet 4 to 5/6 and we currently have > a lab installation of both versions to toy around with. > > Our agents are still on version 4 and for them everything works as > expected without any issues no matter if they connect to the version 4, > 5 or 6 puppetserver. > > However if we use a version 5 or 6 agent to connect to those version 5 > or 6 servers we get a really strange error: > > Error: /File[/opt/puppetlabs/puppet/cache/lib]: Failed to generate > additional resources using 'eval_generate': Could not intern_multiple > from application/json: Invalid parameter ftype to object class > Puppet::FileServing::Metadata > > We found out that if we force the client to use PSON with > "--preferred_serialization_format pson" the problem goes away. This is > also why the problem only occurs on agents > 5 as they are now using > json as default. > > This also only affects the plugin endpoints where it syncs facts.d, lib > and locals at the very start of the run. The catalog itself can be > retrieved without issue with json. > > So I tried to track this down a bit further. The issue seems to > originate from a part of code where Puppet tries to add values from a > received json hash to an object: > > > https://github.com/puppetlabs/puppet/blob/41760e1646ffd91942ebc2290b5108ce31fe529d/lib/puppet/util/methodhelper.rb#L16 > > The data I get with PSON here is: > > [{ > "path":"/etc/puppetlabs/code/environments/test/modules", > "relative_path":".", > "links":"follow", > "owner":0, > "group":10080, > "mode":1517, > "checksum":{ > "type":"ctime", > "value":"{ctime}2019-02-11 11:02:06 +0100" > }, > "type":"directory", > "destination":null > }] > > With JSON the Puppetserver returns: > > [{ > "checksum_type":"ctime", > "links":"follow", > "destination":null, > "source":null, > "group":10080, > "ftype":"directory", > "relative_path":".", > "expiration":"2019-02-11T14:39:20.972+01:00", > "checksum":"{ctime}2019-02-11 11:02:06 +0100", > "stat_method":"stat", > "owner":0, > "mode":1517, > "content_uri":null, > "source_permissions":"use", > "path":"/etc/puppetlabs/code/environments/test/modules" > }] > > It then tries to call ftype=(value) on an object of > Puppet::FileServing::Metadata (as the error message says) but that > attribute only has an attribute reader: > > > https://github.com/puppetlabs/puppet/blob/41760e1646ffd91942ebc2290b5108ce31fe529d/lib/puppet/file_serving/metadata.rb#L16 > > > Clearly something very strange is going on here. This can't be the real > issue as it obviously works for other people. Maybe someone on this list > has any idea how to track this down further or has encountered a similar > issue. > How are you forcing "ctime" to be used for pluginsync? Normally it's "md5". Are you overridding "supported_checksum_types" on either the server or agent? Probably best to see the complete `puppet.conf` for server and agent when the error occurs. What puppet-agent and puppetserver versions do you have installed? Are static catalogs enabled either globally (puppet config get static_catalogs --section master|agent) on either the server or agent, or per-environment in "$codedir/environments/test/environment.conf" ? Did you happen to install the JrJackson gem on the server? Josh -- Josh Cooper | Software Engineer [email protected] | @coopjn -- 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/CA%2Bu97um6ek3FoEyOZwLhe1nQeHO4admP2d5yJquN9Gf8N3eVHQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
