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

Set max_nesting to prevent "Nesting Level Too Deep" errors in catalog

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Accepted
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: PUP 4.7.0
    • Fix Version/s: None
    • Component/s: None
    • Template:
    • Team:
      Froyo

      Description

      When using code with 20+ levels of nested data, puppet runs fail with error "Error: Could not retrieve catalog from remote server: Could not intern from text/pson: nesting of 20 is too deep"

      From agent debug trace:

      ...
      Debug: Facter: resolving Xen facts.
      Debug: Failed to load library 'msgpack' for feature 'msgpack'
      Debug: Puppet::Network::Format[msgpack]: feature msgpack is missing
      Debug: catalog supports formats: pson yaml dot binary
      Debug: Using cached connection for https://ip-10-253-17-187:8140
      Debug: Caching connection for https://ip-10-253-17-187:8140
      Error: Could not retrieve catalog from remote server: Could not intern from text/pson: nesting of 20 is too deep
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:270:in `parse_object'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:225:in `parse_value'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:246:in `parse_array'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:220:in `parse_value'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:280:in `parse_object'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:225:in `parse_value'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:246:in `parse_array'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:220:in `parse_value'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:280:in `parse_object'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:225:in `parse_value'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:246:in `parse_array'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:220:in `parse_value'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:280:in `parse_object'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:225:in `parse_value'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:246:in `parse_array'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:220:in `parse_value'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:280:in `parse_object'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:225:in `parse_value'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:246:in `parse_array'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:220:in `parse_value'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:280:in `parse_object'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:225:in `parse_value'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:246:in `parse_array'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:220:in `parse_value'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:280:in `parse_object'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:225:in `parse_value'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:246:in `parse_array'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:220:in `parse_value'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:280:in `parse_object'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:225:in `parse_value'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:280:in `parse_object'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:225:in `parse_value'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:280:in `parse_object'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:225:in `parse_value'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:280:in `parse_object'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:225:in `parse_value'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:246:in `parse_array'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:220:in `parse_value'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:280:in `parse_object'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/pure/parser.rb:92:in `parse'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/external/pson/common.rb:121:in `parse'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/formats.rb:89:in `intern'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/format_support.rb:12:in `convert_from'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/rest.rb:233:in `deserialize_find'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/rest.rb:107:in `find'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:194:in `find'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:299:in `block in retrieve_new_catalog'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:292:in `block in thinmark'
      /opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:291:in `thinmark'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:298:in `retrieve_new_catalog'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:59:in `retrieve_catalog'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:104:in `prepare_and_retrieve_catalog'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:206:in `run_internal'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:134:in `block in run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:240:in `override'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:133:in `run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:45:in `block (4 levels) in run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent/locker.rb:21:in `lock'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:45:in `block (3 levels) in run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:98:in `with_client'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:42:in `block (2 levels) in run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:65:in `run_in_fork'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:41:in `block in run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:179:in `call'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:179:in `controlled_run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:39:in `run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/agent.rb:353:in `onetime'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/agent.rb:331:in `run_command'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:344:in `block in run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:446:in `exit_on_fail'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:344:in `run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:128:in `run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:72:in `execute'
      /opt/puppetlabs/puppet/bin/puppet:5:in `<main>'
      Warning: Not using cache on failed catalog
      Error: Could not retrieve catalog; skipping run
      

      Specifically in the line "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/formats.rb:89:in `intern'" it calls PSON.parse without specifying the nesting depth. Ideally, it should use :max_nesting => false

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            nathanael Nathanael Cole
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Zendesk Support