Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

inspec bug in chefdk 4.4.14 #2243

Open
zmaupin opened this issue Sep 11, 2019 · 10 comments
Open

inspec bug in chefdk 4.4.14 #2243

zmaupin opened this issue Sep 11, 2019 · 10 comments
Labels
Aspect: Integration Works correctly with other projects or systems. Status: Waiting on Contributor A pull request that has unresolved requested actions from the author. Triage: Confirmed Indicates and issue has been confirmed as described. Type: Bug Doesn't work as expected.

Comments

@zmaupin
Copy link

zmaupin commented Sep 11, 2019

Description

Unable to use inspec in chefdk 4.4.14

ChefDK Version

root@5c322673c874:~/馃寠# chef --version
ChefDK version: 4.4.14
Chef Infra Client version: 15.2.20
Chef InSpec version: ERROR
Test Kitchen version: 2.3.1
Foodcritic version: 16.1.1
Cookstyle version: 5.4.13

Platform Version

chefdk docker container:

FROM chef/chefdk:4.4.14
root@5c322673c874:~/馃寠# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.3 LTS"

Replication Case

Startup container.
Run chef --version
Or
Run inspec --version
Or
With inspec verified in kitchen.yml use:
kitchen with almost any command:

Stacktrace

root@5c322673c874:~/馃寠# kitchen verify
-----> Starting Kitchen (v2.3.1)
Traceback (most recent call last):
	41: from /opt/chefdk/bin/kitchen:351:in `<main>'
	40: from /opt/chefdk/bin/kitchen:351:in `load'
	39: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/test-kitchen-2.3.1/bin/kitchen:13:in `<top (required)>'
	38: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/test-kitchen-2.3.1/lib/kitchen/errors.rb:171:in `with_friendly_errors'
	37: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/test-kitchen-2.3.1/bin/kitchen:13:in `block in <top (required)>'
	36: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
	35: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
	34: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
	 ... 29 levels...
	 4: from /opt/chefdk/embedded/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	 3: from /opt/chefdk/embedded/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	 2: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.16.0/lib/inspec/plugin/v2.rb:30:in `<top (required)>'
	 1: from /opt/chefdk/embedded/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/opt/chefdk/embedded/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': stack level too deep (SystemStackError)
root@5c322673c874:~/馃寠# inspec --version
Traceback (most recent call last):
	10: from /opt/chefdk/bin/inspec:351:in `<main>'
	 9: from /opt/chefdk/bin/inspec:351:in `load'
	 8: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/inspec-bin-4.16.0/bin/inspec:10:in `<top (required)>'
	 7: from /opt/chefdk/embedded/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	 6: from /opt/chefdk/embedded/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	 5: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.16.0/lib/inspec/cli.rb:428:in `<top (required)>'
	 4: from /opt/chefdk/embedded/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	 3: from /opt/chefdk/embedded/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	 2: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.16.0/lib/inspec/plugin/v2.rb:30:in `<top (required)>'
	 1: from /opt/chefdk/embedded/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/opt/chefdk/embedded/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': stack level too deep (SystemStackError)

NOTE: CHEFDK BUGS ONLY

This issue tracker is for the code contained within this repo -- chefdk.

@zmaupin zmaupin added the Status: Untriaged An issue that has yet to be triaged. label Sep 11, 2019
@zmaupin
Copy link
Author

zmaupin commented Sep 11, 2019

Not a bug. This was a problem with an invalid name in the directory (the emoji).

@zmaupin zmaupin closed this as completed Sep 11, 2019
@nnappe
Copy link

nnappe commented Oct 2, 2019

@zmaupin I'd open it back. Nevermind the emojis, the problem probably stems from poor UTF-8 character handling and there might be proper use cases for UTF-8 path names. :) Cheers

@zmaupin
Copy link
Author

zmaupin commented Oct 2, 2019

Reopening...
#2243 (comment)

@zmaupin zmaupin reopened this Oct 2, 2019
@tas50
Copy link
Contributor

tas50 commented Oct 3, 2019

@zmaupin are you seeing this with the released version of DK 4.4?

@zmaupin
Copy link
Author

zmaupin commented Oct 4, 2019

Downloaded the latest Ubuntu Bionic release from https://downloads.chef.io/chefdk#ubuntu

root@7eff9d503821:~/馃寠# dpkg -i chefdk_4.4.27-1_amd64.deb
(Reading database ... 54714 files and directories currently installed.)
Preparing to unpack chefdk_4.4.27-1_amd64.deb ...
Unpacking chefdk (4.4.27-1) over (4.3.13-1) ...
chef --version
Setting up chefdk (4.4.27-1) ...
Thank you for installing ChefDK!
You can find some tips on getting started at https://learn.chef.io
root@7eff9d503821:~/馃寠# chef --version
ChefDK version: 4.4.27
Chef Infra Client version: 15.3.14
Chef InSpec version: ERROR
Test Kitchen version: 2.3.3
Foodcritic version: 16.1.1
Cookstyle version: 5.6.2

@tyler-ball tyler-ball added Aspect: Correctness Aspect: Integration Works correctly with other projects or systems. Triage: Confirmed Indicates and issue has been confirmed as described. Type: Bug Doesn't work as expected. and removed Status: Untriaged An issue that has yet to be triaged. labels Oct 7, 2019
@tyler-ball
Copy link
Contributor

This is very interesting that InSpec is the only one having an issue getting its version. Thanks for the report @zmaupin - getting this issue triaged

@zenspider
Copy link

@tyler-ball but are the other values coming in from shelling out, or from using constants already loaded?

@zenspider
Copy link

I do not have a repro on my side. That could be environment (I'm running inspec directly trying from a directory with an emoji name and with a PS1 that includes pwd) or ... I dunno. ruby versions? I highly highly doubt that's an issue.

@tas50
Copy link
Contributor

tas50 commented Oct 16, 2019

@zmaupin Can you try to update to ChefDK 4.5.0 and see if this still happens on that new release? It has an updated InSpec along with a bunch of other updates.

@tyler-ball tyler-ball added the Status: Waiting on Contributor A pull request that has unresolved requested actions from the author. label Oct 21, 2019
@zmaupin
Copy link
Author

zmaupin commented Oct 22, 2019

Same with ChefDK 4.5.0

$ docker run -i -t --workdir /home/馃寠 chef/chefdk /bin/bash
root@9c3026042631:/home/馃寠# chef --version
ChefDK version: 4.5.0
Chef Infra Client version: 15.4.45
Chef InSpec version: ERROR
Test Kitchen version: 2.3.3
Foodcritic version: 16.1.1
Cookstyle version: 5.9.3

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Aspect: Integration Works correctly with other projects or systems. Status: Waiting on Contributor A pull request that has unresolved requested actions from the author. Triage: Confirmed Indicates and issue has been confirmed as described. Type: Bug Doesn't work as expected.
Development

No branches or pull requests

5 participants