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

puppet lookup cli, using --facts and --node simultaneously breaks

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Cannot Reproduce
    • PUP 5.3.5, PUP 5.4.0
    • None
    • Hiera & Lookup
    • None
    • Needs Assessment

    Description

      Puppet Version: 5.4.0
      Puppet Server Version: n/a
      OS Name/Version: Ubuntu 16.04

      When running "puppet lookup" with both the "–node" and "–facts" arguments, it exits with an error:

      Error: Could not run: undefined method `add_extra_values' for nil:NilClass

      Desired Behavior:

      It should return the correct value from hiera data, or at least not error even if no value is returned.

      Actual Behavior:

       

       

      /opt/puppetlabs/bin/puppet lookup site_domain --environment boo --facts test_facts.yaml --node myhost.r00.zone1.foo.bar.com --node_terminus=plain --external_nodes=none --trace
      Error: Could not run: undefined method `add_extra_values' for nil:NilClass
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/node.rb:167:in `add_extra_facts'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/lookup.rb:367:in `generate_scope'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/lookup.rb:327:in `main'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:383:in `run_command'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:375:in `block in run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:665:in `exit_on_fail'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:375:in `run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:137:in `run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:73:in `execute'
      /opt/puppetlabs/puppet/bin/puppet:5:in `<main>'
      

       

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jcat Just
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support