Skip to content

Plugin breaks inspec check #6

@thheinen

Description

@thheinen

When running the inspec check command on a profile which uses inputs from this plugin, the following error appears:

Traceback (most recent call last):
        28: from /usr/bin/inspec:361:in `<main>'
        27: from /usr/bin/inspec:361:in `load'
        26: from /opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/inspec-bin-4.18.51/bin/inspec:11:in `<top (required)>'
        25: from /opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/inspec/base_cli.rb:35:in `start'
        24: from /opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
        23: from /opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
        22: from /opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
        21: from /opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
        20: from /opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/inspec/cli.rb:118:in `check'
        19: from /opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/inspec/profile.rb:422:in `check'
        18: from /opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/inspec/profile.rb:452:in `controls_count'
        17: from /opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/inspec/profile.rb:195:in `params'
        16: from /opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/inspec/profile.rb:598:in `load_params'
        15: from /opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/inspec/profile.rb:605:in `load_checks_params'
        14: from /opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/inspec/profile.rb:204:in `collect_tests'
        13: from /opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/inspec/profile.rb:204:in `each'
        12: from /opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/inspec/profile.rb:208:in `block in collect_tests'
        11: from /opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/inspec/profile_context.rb:145:in `load_control_file'
        10: from /opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/inspec/profile_context.rb:161:in `load_with_context'
         9: from /opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/inspec/profile_context.rb:161:in `instance_eval'
         8: from ./controls/control-01.rb:6:in `load_with_context'
         7: from /opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/inspec/control_eval_context.rb:191:in `block (2 levels) in create'
         6: from /opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/inspec/input_registry.rb:311:in `block (2 levels) in <class:InputRegistry>'
         5: from /opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/inspec/input_registry.rb:91:in `find_or_register_input'
         4: from /opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/inspec/input_registry.rb:98:in `poll_plugins_for_update'
         3: from /opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/inspec/input_registry.rb:98:in `each'
         2: from /opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/inspec/input_registry.rb:99:in `block in poll_plugins_for_update'
         1: from /home/user/.inspec/gems/2.6.0/gems/inspec-chef-0.3.4/lib/inspec-chef/input.rb:40:in `fetch'
/home/user/.inspec/gems/2.6.0/gems/inspec-chef-0.3.4/lib/inspec-chef/input.rb:169:in `connect_to_chef_server': ERROR: Plugin inspec-chef needs configuration of chef endpoint, client name and api key. (RuntimeError)

chef-inspec 0.3.4
inspec 4.18.51
chef workstation 0.15.18

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions