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

Duplication errors on Puppet Class "settings".

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 4.10.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Team:
      Puppet Developer Experience
    • Story Points:
      1
    • Sprint:
      PDE 2017-03-22, PDE 2017-04-05
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      If environment_timeout was set to a value other than 0, there would be an warning logged that "Puppet Class 'settings' is already defined" for all subsequent compilations in that environment. The settings class is now only created once for the lifetime of an environment.
      Show
      If environment_timeout was set to a value other than 0, there would be an warning logged that "Puppet Class 'settings' is already defined" for all subsequent compilations in that environment. The settings class is now only created once for the lifetime of an environment.
    • QA Risk Assessment:
      No Action

      Description

      A user reports strange duplication errors for the "settings" class in PUP-6339. An investigation reveals that the errors stem from when the compiler initializes its scope. The fact that the actual scope is created from scratch during this initialization, combined with that several conflicts occur within milliseconds, seems to suggest that several threads are executing in in the same ruby runtime.

      The conflicts go away if environment_timeout is set to 0.

      From the log:

      2017-03-09 13:29:39,720 ERROR [qtp182348184-67 - /puppet/v3/catalog/lxserv940.smhi.se?environment=production] [puppetserver] Puppet Class 'settings' is already defined; cannot redefine on node lxserv940.smhi.se
      2017-03-09 13:29:39,733 ERROR [qtp182348184-67 - /puppet/v3/catalog/lxserv940.smhi.se?environment=production] [puppetserver] Puppet Class 'settings' is already defined; cannot redefine on node lxserv940.smhi.se
      2017-03-09 13:29:39,734 ERROR [qtp182348184-67 - /puppet/v3/catalog/lxserv940.smhi.se?environment=production] [puppetserver] Puppet Server Error: Class 'settings' is already defined; cannot redefine on node lxserv940.smhi.se
      

      Here is a stack backgrace (generated with strict=error).

      2017-03-09 13:29:39,720 ERROR [qtp182348184-67 - /puppet/v3/catalog/lxserv940.smhi.se?environment=production] [puppetserver] Puppet Class 'settings' is already defined; cannot redefine on node lxserv940.smhi.se
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/errors.rb:106:in `fail'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/type_collection.rb:248:in `dupe_check'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/type_collection.rb:68:in `add_hostclass'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/type_collection.rb:60:in `add'
      org/jruby/RubyKernel.java:1242:in `catch'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/type_collection.rb:59:in `add'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:857:in `create_settings_scope'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:168:in `compile'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb:58:in `profile'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler.rb:51:in `profile'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:168:in `compile'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:293:in `override'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:162:in `compile'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:33:in `compile'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:266:in `compile'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb:58:in `profile'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler.rb:51:in `profile'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:264:in `compile'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:223:in `benchmark'
      /opt/puppetlabs/server/apps/puppetserver/puppet-server-release.jar!/META-INF/jruby.home/lib/ruby/1.9/benchmark.rb:295:in `realtime'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:222:in `benchmark'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:262:in `compile'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:53:in `find'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:194:in `find'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/api/indirected_routes.rb:121:in `do_find'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/api/indirected_routes.rb:48:in `call'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:293:in `override'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/api/indirected_routes.rb:47:in `call'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/route.rb:82:in `process'
      org/jruby/RubyArray.java:1613:in `each'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/route.rb:81:in `process'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/route.rb:87:in `process'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/route.rb:87:in `process'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/handler.rb:60:in `process'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb:58:in `profile'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler.rb:51:in `profile'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/handler.rb:58:in `process'
      file:/opt/puppetlabs/server/apps/puppetserver/puppet-server-release.jar!/puppetserver-lib/puppet/server/master.rb:42:in `handleRequest'
      Puppet$$Server$$Master_2107036556.gen:13:in `handleRequest'
      request_handler_core.clj:273:in `invoke'
      jruby_request.clj:46:in `invoke'
      jruby_request.clj:31:in `invoke'
      request_handler_service.clj:34:in `handle_request'
      request_handler.clj:3:in `invoke'
      request_handler.clj:3:in `invoke'
      core.clj:2515:in `invoke'
      ring_middleware.clj:284:in `invoke'
      core.clj:168:in `invoke'
      core.clj:211:in `invoke'
      core.clj:45:in `invoke'
      core.clj:343:in `invoke'
      core.clj:51:in `invoke'
      ringutils.clj:83:in `invoke'
      master_core.clj:428:in `invoke'
      ring.clj:21:in `invoke'
      ring.clj:12:in `invoke'
      comidi.clj:249:in `invoke'
      jetty9_core.clj:424:in `invoke'
      normalized_uri_helpers.clj:80:in `invoke'
      

        Attachments

          Activity

            People

            Assignee:
            qa qa
            Reporter:
            thomas.hallgren Thomas Hallgren
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support