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

Behavior of undef in relationships has changed in master since 4.4.x

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • None
    • PUP 4.5.0
    • None
    • None
    • Hide

      That the following example does not cause an error:

      puppet apply -e 'notify {example: message => yay, notify => undef}'
      

      Show
      That the following example does not cause an error: puppet apply -e 'notify {example: message => yay, notify => undef}'
    • 1
    • Language 2016-04-20
    • Not Needed
    • Regression in not yet released code.

    Description

      Before (in puppet 4.4.1 and earlier), something like

      puppet apply -e "user {'matthaus': ensure => present, notify => undef}"

      Would work, but now it causes a compile error:

      puppet apply -e "user {'matthaus': ensure => present, notify => undef}"
      Error: No title provided and "" is not a valid resource reference on node wyclef-2.local

      Here is an example of this pattern in the apt module: https://github.com/puppetlabs/puppetlabs-apt/blob/master/manifests/setting.pp#L49-L53.

      We're seeing test failures in a notify resource that is set to undef, but I presume this would apply to any resource relationship.

      Oh, and here's a stacktrace from the master log if that's helpful:

      2016-04-14 09:46:46,667 ERROR [qtp1832930698-137] [puppet-server] Puppet No title provided and "" is not a valid resource reference on node bigea6oflt8yfr6.delivery.puppetlabs.net
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource.rb:544:in `extract_type_and_title'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource.rb:529:in `type_and_title'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:353:in `resource'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/compiler/catalog_validator/relationship_validator.rb:33:in `validate_relationship'
      org/jruby/RubyArray.java:1613:in `each'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/compiler/catalog_validator/relationship_validator.rb:32:in `validate_relationship'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/compiler/catalog_validator/relationship_validator.rb:10:in `validate'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/resource.rb:52:in `eachparam'
      org/jruby/RubyHash.java:1341:in `each'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/resource.rb:50:in `eachparam'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/compiler/catalog_validator/relationship_validator.rb:8:in `validate'
      org/jruby/RubyArray.java:1613:in `each'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/compiler/catalog_validator/relationship_validator.rb:6:in `validate'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:217:in `validate_catalog'
      org/jruby/RubyArray.java:1613:in `each'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:217:in `validate_catalog'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:205: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:204:in `compile'
      /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/parser/compiler.rb:167:in `compile'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:35:in `compile'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:265: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:263: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:261: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:134: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:240: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!/puppet-server-lib/puppet/server/master.rb:42:in `handleRequest'

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              matthaus Past Haus
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support