Migration from Puppet 2.6.7 to 3.0.0 issues

325 views
Skip to first unread message

David Campos

unread,
Oct 8, 2012, 11:08:33 AM10/8/12
to puppet...@googlegroups.com
Hi all, 

I'm trying to migrate our configuration from puppet 2.6.7 to 3.0.0 but I am having a strange issue whilst applying the catalog.

Error: Could not retrieve catalog from remote server: Could not intern from yaml: allocator undefined for Proc
/usr/lib/ruby/1.8/yaml.rb:133:in `transfer'
/usr/lib/ruby/1.8/yaml.rb:133:in `node_import'
/usr/lib/ruby/1.8/yaml.rb:133:in `load'
/usr/lib/ruby/1.8/yaml.rb:133:in `load'
/usr/lib/ruby/site_ruby/1.8/puppet/network/formats.rb:7:in `intern'
/usr/lib/ruby/site_ruby/1.8/puppet/network/format_handler.rb:12:in `send'
/usr/lib/ruby/site_ruby/1.8/puppet/network/format_handler.rb:12:in `protect'
/usr/lib/ruby/site_ruby/1.8/puppet/network/format_handler.rb:26:in `intern'
/usr/lib/ruby/site_ruby/1.8/puppet/network/format_handler.rb:108:in `convert_from'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/rest.rb:61:in `deserialize'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/rest.rb:121:in `find'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:193:in `find'
/usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:244:in `retrieve_new_catalog'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:348:in `thinmark'
/usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:347:in `thinmark'
/usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:243:in `retrieve_new_catalog'
/usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:67:in `retrieve_catalog'
/usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:107:in `prepare_and_retrieve_catalog'
/usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:159:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:45:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/agent/locker.rb:20:in `lock'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:45:in `run'
/usr/lib/ruby/1.8/sync.rb:230:in `synchronize'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:45:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:119:in `with_client'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:42:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:84:in `run_in_fork'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:41:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:175:in `call'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:175:in `controlled_run'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:39:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:338:in `onetime'
/usr/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:311:in `run_command'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:346:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:438:in `plugin_hook'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:346:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:500:in `exit_on_fail'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:346:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:76:in `execute'
/usr/bin/puppet:10
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
Debug: report supports formats: b64_zlib_yaml raw yaml; using yaml

I only find references to an old 2010 bug but nothing helps me to solve this an apply the catalog. The catalog works on 2.x nodes by the way.

Puppet master: 3.0.0

Puppet agent: either 2.6.7 or 3.0.0 

David Campos

unread,
Oct 10, 2012, 8:25:06 AM10/10/12
to puppet...@googlegroups.com
Nobody has found this issue?

Jeff McCune

unread,
Oct 10, 2012, 12:42:49 PM10/10/12
to puppet...@googlegroups.com
I haven't seen this specific issue yet.

How did you upgrade from 2.6 to 3.0.0? A common problem when
upgrading from source or with rubygems is having multiple copies of
puppet installed. This can cause issues loading code from both
versions of Puppet into the same process.

-Jeff
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/puppet-users/-/JFVXsYEsx1EJ.
>
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.

Thomas Bendler

unread,
Oct 10, 2012, 1:42:33 PM10/10/12
to puppet...@googlegroups.com
2012/10/10 Jeff McCune <je...@puppetlabs.com>
I haven't seen this specific issue yet.
[...]

I saw this issue after an upgrade to 3.0.0 when I used manifests with a package/service definition inside. Unfortunately I didn't had the time to investigate this issue, so no solution from my side ... currently. But maybe some logic around these types has changed.

Regards, Thomas
--
Linux ... enjoy the ride!


Josh Cooper

unread,
Oct 10, 2012, 2:54:49 PM10/10/12
to puppet...@googlegroups.com
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.

Can add the following to lib/puppet/indirector/rest.rb:61

Puppet.debug(content_type)
Puppet.debug(body.inspect)

Then run puppet agent --test --debug, and you should see output like:

Debug: text/pson
Debug: "{\"data\":{\"classes\":[\"settings\"],\"environment\":\"production\",\"name\":\"sirrus.puppetlabs.lan\",\"edges\":[{\"target\":\"Class[Settings]\",\"source\":\"Stage[main]\"},{\"target\":\"Class[main]\",\"source\":\"Stage[main]\"}],\"tags\":[\"settings\"],\"version\":1349894170,\"resources\":[{\"exported\":false,\"title\":\"Settings\",\"tags\":[\"class\",\"settings\"],\"type\":\"Class\"},{\"exported\":false,\"title\":\"main\",\"parameters\":{\"name\":\"main\"},\"tags\":[\"class\"],\"type\":\"Class\"},{\"exported\":false,\"title\":\"main\",\"parameters\":{\"name\":\"main\"},\"tags\":[\"stage\"],\"type\":\"Stage\"}]},\"metadata\":{\"api_version\":1},\"document_type\":\"Catalog\"}"

I think puppet agent is expecting yaml, and is either receiving json
or otherwise can't parse the yaml it's receiving. We made performance
improvements in Puppet 3 relating to yaml parsing, so perhaps that is
the issue.

Can you post your output and puppet.conf as gists?

Josh

--
Josh Cooper
Developer, Puppet Labs

Thomas Bendler

unread,
Oct 10, 2012, 4:13:04 PM10/10/12
to puppet...@googlegroups.com
Hi Josh,

2012/10/10 Josh Cooper <jo...@puppetlabs.com>
[...]
I think puppet agent is expecting yaml, and is either receiving json
or otherwise can't parse the yaml it's receiving. We made performance
improvements in Puppet 3 relating to yaml parsing, so perhaps that is
the issue.

you are the man! I had several performance and other tweaks in my standard puppet.conf. One of them was preferred_serialization_format = b64_zlib_yaml or preferred_serialization_format = yaml which seem to cause the error. I've removed most of the tweaks and started with a more standard like puppet.conf and which seem to work as expected. Now I can focus on bugfix all the remaining issues occuring within the upgrade. Thanks a lot!

Regards, Thomas
-- 

Josh Cooper

unread,
Oct 10, 2012, 5:49:23 PM10/10/12
to puppet...@googlegroups.com
Hi Thomas,
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.

See also http://projects.puppetlabs.com/issues/16922

David Campos

unread,
Oct 15, 2012, 7:23:55 AM10/15/12
to puppet...@googlegroups.com
I have also set preferred_serialization_format = yaml but I did need it in order to be able to use puppet at windows machines (they did not accept PSON due an OutOfMemory exception.

I'll try without that setting.
Reply all
Reply to author
Forward
0 new messages