Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: uninitialized constant Inspec::Error during Kitchen Test #2643

Open
djessich opened this issue Mar 9, 2022 · 2 comments
Open

Error: uninitialized constant Inspec::Error during Kitchen Test #2643

djessich opened this issue Mar 9, 2022 · 2 comments
Labels
Status: Untriaged An issue that has yet to be triaged.

Comments

@djessich
Copy link

djessich commented Mar 9, 2022

Description

I installed Chef Workstation on my Ubuntu 20.04 recently using office DEB package and tried to execute Kitchen, resulting in the following error:

$ kitchen verify default-rockylinux-8 -D
-----> Starting Test Kitchen (v3.2.2)
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ClientError
>>>>>> Message: Could not load the 'inspec' verifier. Error: uninitialized constant Inspec::Error
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration

D      ------Exception-------
D      Class: Kitchen::ClientError
D      Message: Could not load the 'inspec' verifier. Error: uninitialized constant Inspec::Error
D      ----------------------
D      ------Backtrace-------
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/plugin.rb:45:in `rescue in load'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/plugin.rb:33:in `load'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/verifier.rb:36:in `for_plugin'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/config.rb:341:in `new_verifier'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/config.rb:257:in `new_instance'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/config.rb:143:in `block in build_instances'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/config.rb:142:in `map'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/config.rb:142:in `with_index'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/config.rb:142:in `build_instances'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/config.rb:116:in `instances'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/command.rb:109:in `filtered_instances'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/command.rb:139:in `parse_subcommand'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/command/action.rb:34:in `block in call'
D      /opt/cinc-workstation/embedded/lib/ruby/3.0.0/benchmark.rb:293:in `measure'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/command/action.rb:33:in `call'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/cli.rb:52:in `perform'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/cli.rb:198:in `block (2 levels) in <class:CLI>'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/base.rb:485:in `start'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/bin/kitchen:11:in `block in <top (required)>'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/errors.rb:183:in `with_friendly_errors'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/bin/kitchen:11:in `<top (required)>'
D      /opt/cinc-workstation/bin/kitchen:383:in `load'
D      /opt/cinc-workstation/bin/kitchen:383:in `<main>'
D      ----End Backtrace-----
D      ---Nested Exception---
D      Class: NameError
D      Message: uninitialized constant Inspec::Error
D      ----------------------
D      ------Backtrace-------
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/plugin.rb:45:in `rescue in load'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/plugin.rb:33:in `load'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/verifier.rb:36:in `for_plugin'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/config.rb:341:in `new_verifier'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/config.rb:257:in `new_instance'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/config.rb:143:in `block in build_instances'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/config.rb:142:in `map'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/config.rb:142:in `with_index'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/config.rb:142:in `build_instances'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/config.rb:116:in `instances'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/command.rb:109:in `filtered_instances'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/command.rb:139:in `parse_subcommand'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/command/action.rb:34:in `block in call'
D      /opt/cinc-workstation/embedded/lib/ruby/3.0.0/benchmark.rb:293:in `measure'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/command/action.rb:33:in `call'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/cli.rb:52:in `perform'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/cli.rb:198:in `block (2 levels) in <class:CLI>'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/base.rb:485:in `start'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/bin/kitchen:11:in `block in <top (required)>'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/errors.rb:183:in `with_friendly_errors'
D      /opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/bin/kitchen:11:in `<top (required)>'
D      /opt/cinc-workstation/bin/kitchen:383:in `load'
D      /opt/cinc-workstation/bin/kitchen:383:in `<main>'
D      ----End Backtrace-----

Kitchen Diagnose

The output of Kitchen diagnose:

$ kitchen diagnose --all
---
timestamp: 2022-03-09 17:58:35 UTC
kitchen_version: 3.2.2
plugins:
  error:
    exception: "#<Kitchen::ClientError: Could not load the 'inspec' verifier. Error:
      uninitialized constant Inspec::Error>"
    message: 'Could not load the ''inspec'' verifier. Error: uninitialized constant
      Inspec::Error'
    backtrace:
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/plugin.rb:45:in
      `rescue in load'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/plugin.rb:33:in
      `load'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/verifier.rb:36:in
      `for_plugin'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/config.rb:341:in
      `new_verifier'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/config.rb:257:in
      `new_instance'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/config.rb:143:in
      `block in build_instances'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/config.rb:142:in
      `map'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/config.rb:142:in
      `with_index'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/config.rb:142:in
      `build_instances'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/config.rb:116:in
      `instances'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/command.rb:109:in
      `filtered_instances'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/command.rb:139:in
      `parse_subcommand'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/command/diagnose.rb:52:in
      `load_instances'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/command/diagnose.rb:31:in
      `block in call'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/command/diagnose.rb:72:in
      `record_failure'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/command/diagnose.rb:31:in
      `call'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/cli.rb:52:in
      `perform'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/cli.rb:142:in
      `diagnose'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/command.rb:27:in
      `run'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in
      `invoke_command'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor.rb:392:in
      `dispatch'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/base.rb:485:in
      `start'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/bin/kitchen:11:in
      `block in <top (required)>'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/errors.rb:183:in
      `with_friendly_errors'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/bin/kitchen:11:in
      `<top (required)>'"
    - "/opt/cinc-workstation/bin/kitchen:383:in `load'"
    - "/opt/cinc-workstation/bin/kitchen:383:in `<main>'"
loader:
  process_erb: true
  process_local: true
  process_global: true
  global_config: 
  project_config:
    filename: "/home/djessich/Projects/Chef/chef-repo/cookbooks/server-infrastructure-nas/kitchen.yml"
    raw_data:
      driver:
        name: vagrant
      provisioner:
        name: chef_zero
        product_name: cinc
        product_version: 16
        deprecations_as_errors: true
      verifier:
        name: inspec
      platforms:
      - name: almalinux-8
        run_list:
        - recipe[server-infrastructure-yum]
      - name: centos-7
        run_list:
        - recipe[server-infrastructure-yum]
      - name: debian-9
        run_list:
        - recipe[server-infrastructure-apt]
      - name: debian-10
        run_list:
        - recipe[server-infrastructure-apt]
      - name: rockylinux-8
        run_list:
        - recipe[server-infrastructure-yum]
      suites:
      - name: default
        run_list:
        - recipe[server-infrastructure-nas::default]
        attributes: 
  local_config:
    filename: "/home/djessich/Projects/Chef/chef-repo/cookbooks/server-infrastructure-nas/kitchen.dokken.yml"
    raw_data:
      driver:
        name: dokken
        privileged: true
        chef_version: 16
        chef_image: cincproject/cinc
      transport:
        name: dokken
      provisioner:
        name: dokken
        chef_binary: "/opt/cinc/bin/cinc-client"
        deprecations_as_errors: true
      verifier:
        name: inspec
      platforms:
      - name: almalinux-8
        driver:
          image: dokken/almalinux-8
          pid_one_command: "/usr/lib/systemd/systemd"
        run_list:
        - recipe[server-infrastructure-yum]
      - name: centos-7
        driver:
          image: dokken/centos-7
          pid_one_command: "/usr/lib/systemd/systemd"
        run_list:
        - recipe[server-infrastructure-yum]
      - name: debian-9
        driver:
          image: dokken/debian-9
          pid_one_command: "/bin/systemd"
          intermediate_instructions:
          - RUN /usr/bin/apt-get update
        run_list:
        - recipe[server-infrastructure-apt]
      - name: debian-10
        driver:
          image: dokken/debian-10
          pid_one_command: "/bin/systemd"
          intermediate_instructions:
          - RUN /usr/bin/apt-get update
        run_list:
        - recipe[server-infrastructure-apt]
      - name: rockylinux-8
        driver:
          image: dokken/rockylinux-8
          pid_one_command: "/usr/lib/systemd/systemd"
        run_list:
        - recipe[server-infrastructure-yum]
      suites:
      - name: default
        run_list:
        - recipe[server-infrastructure-nas::default]
        attributes: 
  combined_config:
    filename: 
    raw_data:
      driver:
        name: dokken
        privileged: true
        chef_version: 16
        chef_image: cincproject/cinc
      provisioner:
        name: dokken
        product_name: cinc
        product_version: 16
        deprecations_as_errors: true
        chef_binary: "/opt/cinc/bin/cinc-client"
      verifier:
        name: inspec
      platforms:
      - name: almalinux-8
        driver:
          image: dokken/almalinux-8
          pid_one_command: "/usr/lib/systemd/systemd"
        run_list:
        - recipe[server-infrastructure-yum]
      - name: centos-7
        driver:
          image: dokken/centos-7
          pid_one_command: "/usr/lib/systemd/systemd"
        run_list:
        - recipe[server-infrastructure-yum]
      - name: debian-9
        driver:
          image: dokken/debian-9
          pid_one_command: "/bin/systemd"
          intermediate_instructions:
          - RUN /usr/bin/apt-get update
        run_list:
        - recipe[server-infrastructure-apt]
      - name: debian-10
        driver:
          image: dokken/debian-10
          pid_one_command: "/bin/systemd"
          intermediate_instructions:
          - RUN /usr/bin/apt-get update
        run_list:
        - recipe[server-infrastructure-apt]
      - name: rockylinux-8
        driver:
          image: dokken/rockylinux-8
          pid_one_command: "/usr/lib/systemd/systemd"
        run_list:
        - recipe[server-infrastructure-yum]
      suites:
      - name: default
        run_list:
        - recipe[server-infrastructure-nas::default]
        attributes: 
      transport:
        name: dokken
instances:
  error:
    exception: "#<Kitchen::ClientError: Could not load the 'inspec' verifier. Error:
      uninitialized constant Inspec::Error>"
    message: 'Could not load the ''inspec'' verifier. Error: uninitialized constant
      Inspec::Error'
    backtrace:
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/plugin.rb:45:in
      `rescue in load'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/plugin.rb:33:in
      `load'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/verifier.rb:36:in
      `for_plugin'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/config.rb:341:in
      `new_verifier'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/config.rb:257:in
      `new_instance'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/config.rb:143:in
      `block in build_instances'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/config.rb:142:in
      `map'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/config.rb:142:in
      `with_index'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/config.rb:142:in
      `build_instances'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/config.rb:116:in
      `instances'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/command.rb:109:in
      `filtered_instances'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/command.rb:139:in
      `parse_subcommand'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/command/diagnose.rb:52:in
      `load_instances'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/command/diagnose.rb:31:in
      `block in call'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/command/diagnose.rb:72:in
      `record_failure'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/command/diagnose.rb:31:in
      `call'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/cli.rb:52:in
      `perform'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/cli.rb:142:in
      `diagnose'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/command.rb:27:in
      `run'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in
      `invoke_command'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor.rb:392:in
      `dispatch'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/base.rb:485:in
      `start'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/bin/kitchen:11:in
      `block in <top (required)>'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/lib/kitchen/errors.rb:183:in
      `with_friendly_errors'"
    - "/opt/cinc-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.2.2/bin/kitchen:11:in
      `<top (required)>'"
    - "/opt/cinc-workstation/bin/kitchen:383:in `load'"
    - "/opt/cinc-workstation/bin/kitchen:383:in `<main>'"

Chef Workstation Version

Chef Workstation version: 22.2.807
Chef Infra Client version: 17.9.52
Chef InSpec version: 4.52.9
Chef CLI version: 5.6.1
Chef Habitat version: 1.6.420
Test Kitchen version: 3.2.2
Cookstyle version: 7.32.0

On Bash instance chef shell-init bash was executed. Chef shell-init returns the following:

export PATH="/opt/chef-workstation/bin:/home/djessich/.chefdk/gem/ruby/3.0.0/bin:/opt/chef-workstation/embedded/bin:/home/djessich/.krew/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/chef-workstation/gitbin"
export GEM_ROOT="/opt/chef-workstation/embedded/lib/ruby/gems/3.0.0"
export GEM_HOME="/home/djessich/.chefdk/gem/ruby/3.0.0"
export GEM_PATH="/home/djessich/.chefdk/gem/ruby/3.0.0:/opt/chef-workstation/embedded/lib/ruby/gems/3.0.0"
_chef_comp() {
    local COMMANDS="exec env gem generate shell-init install update push push-archive show-policy diff export clean-policy-revisions clean-policy-cookbooks delete-policy-group delete-policy undelete describe-cookbook"
    COMPREPLY=($(compgen -W "$COMMANDS" -- ${COMP_WORDS[COMP_CWORD]} ))
}
complete -F _chef_comp chef

Platform Version

Ubuntu 20.04

@djessich djessich added the Status: Untriaged An issue that has yet to be triaged. label Mar 9, 2022
@djessich
Copy link
Author

djessich commented Mar 9, 2022

I tested with the following versions of Chef Workstation:

  • Not working: 22.1.745-1, 21.1.222-1, 20.12.205-1
  • Working: 20.12.187-1, 20.11.180-1, 20.10.168-1, 20.9.158-1, 20.8.125-1

So everything until 20.12.187-1 is working, higher versions do not work anymore.

@kasif-adnan
Copy link
Contributor

kasif-adnan commented Mar 24, 2022

@djessich , in the above logs the gem path points to /cinc-workstation/....
That might be something to check.

Also, this has happened in past because of gem conflicts if not using chef-workstation ruby. ref: test-kitchen/test-kitchen#1090

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Untriaged An issue that has yet to be triaged.
Projects
None yet
Development

No branches or pull requests

2 participants