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

"Error: Could not find class" in concurrent catalog compilations

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Cannot Reproduce
    • Affects Version/s: PUP 3.5.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Linux, Ubuntu 12.04, puppet package:
      Package: puppet
      Version: 3.5.0-1puppetlabs1
      Architecture: all
      Maintainer: Puppet Labs <info@puppetlabs.com>

      Puppet master is the same version as the puppet package.

    • Template:

      Description

      I can reproduce a sporadic failure in the catalog compilation with the following manifest and test. Manifest:

      class test::foo {
        file { '/tmp/foo':
          ensure => present,
        }
      }
       
      class test {
        class { 'test::foo': }
       
        file { '/tmp/outer':
          ensure => present,
        }
       
        class test::internal {
          file { '/tmp/test':
            ensure => present,
          }
        }
      }
      

      The test: setup a puppet master and three agents. Trigger catalog compilation for each agent at the same time (I did this with a puppet kick for each agent).

      IMPORTANT: Puppet master must be restarted after each run, as otherwise the cache is setup correctly and all subsequent runs will succeed.

      I believe the issue is in the caching layer for the resources. I have the following DEBUG level output:

      443 Debug: Did not match path ("/production/catalog/timur-test-0.maginatics.com")
      444 Debug: Evaluating match for Route /.*/
      445 Debug: Routes Registered:
      446 Debug: Route /^\/v2\.0/
      447 Debug: Route /.*/
      448 Debug: Evaluating match for Route /^\/v2\.0/
      449 Debug: Did not match path ("/production/catalog/timur-test-1.maginatics.com")Debug: Executing '/opt/maginatics/active/mgt_console/reso                         urces/puppet/node_classifier.rb timur-test-0.maginatics.com'
      450 
      451 Debug: Evaluating match for Route /.*/
      452 Debug: Executing '/opt/maginatics/active/mgt_console/resources/puppet/node_classifier.rb timur-test-1.maginatics.com'
      453 Debug: Routes Registered:
      454 Debug: Route /^\/v2\.0/
      455 Debug: Route /.*/
      456 Debug: Evaluating match for Route /^\/v2\.0/
      457 Debug: Did not match path ("/production/catalog/timur-test-2.maginatics.com")
      458 Debug: Evaluating match for Route /.*/
      459 Debug: Executing '/opt/maginatics/active/mgt_console/resources/puppet/node_classifier.rb timur-test-2.maginatics.com'
      460 Info: Caching node for timur-test-1.maginatics.com
      461 Info: Caching node for timur-test-0.maginatics.com
      462 Debug: importing '/opt/maginatics/active/mgt_console/resources/puppet/modules/test/manifests/init.pp' in environment production
      463 Debug: importing '/opt/maginatics/active/mgt_console/resources/puppet/modules/test/manifests/init.pp' in environment production
      464 Debug: Automatically imported test from test into productionInfo: Caching node for timur-test-2.maginatics.com
      465 Notice: Compiled catalog for timur-test-0.maginatics.com in environment production in 0.10 seconds
      466 Debug: Failed to load library 'msgpack' for feature 'msgpack'
      467 Debug: Puppet::Network::Format[msgpack]: feature msgpack is missing
      468 Debug: catalog supports formats: pson b64_zlib_yaml yaml dot raw/usr/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:181:in `evaluate_classes'                  Debug: File[/tmp/foo]: Adding default for backup
      469 Debug: File[/tmp/outer]: Adding default for backup
      470 Notice: Compiled catalog for timur-test-2.maginatics.com in environment production in 0.02 seconds
      471 
      472 Debug: Failed to load library 'msgpack' for feature 'msgpack'
      473 Debug: Puppet::Network::Format[msgpack]: feature msgpack is missing
      474 Debug: catalog supports formats: pson b64_zlib_yaml yaml dot raw
      475 Error: Could not find class test for timur-test-1.maginatics.com on node timur-test-1.maginatics.com
      476 Error: Could not find class test for timur-test-1.maginatics.com on node timur-test-1.maginatics.com
      477 Error: Could not find class test for timur-test-1.maginatics.com on node timur-test-1.maginatics.com
      

      Is this a known issue? I have not attempted to reproduce it with newer versions of puppet, but will try to do that tomorrow.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              timuralp Timur Alperovich
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support