-
Notifications
You must be signed in to change notification settings - Fork 232
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
Unable to use docker as transport #377
Comments
+1 Also tried rolling back kitchen and kitchen-docker from every version to v1 release and same error. Also input the env_variables at driver and transport layer for logger and same error running docker 19.03.13-ce on arch |
I encountered this issue on test-kitchen 2.5.4 (I need the old version for Chef 12 / Ruby 2.3.6 compatibility) and kitchen-docker 2.10.0, but was able to fix it by backing down to kitchen-docker 2.8.0. |
It doesn't seem to work either:
|
This seems to fail around the |
@jbussdieker-quiknode Odd... I would have to run this scenario through the debugger (and I will if I ever tackle this issue) but the file you pointed to wraps the require into a Thanks for the lead though. I was unable to reproduce this when I looked at it several months back. |
Oddly enough that line wasn't specifically what caused the error. I was adding instrumentation to the code and would get output from |
I'm guessing the I tested the theory and it worked: diff --git a/kitchen-docker-2.12.0/lib/docker/version.rb b/kitchen-docker-2.12.0/lib/docker/version.rb
index 70fd25e..ed32290 100644
--- a/kitchen-docker-2.12.0/lib/docker/version.rb
+++ b/kitchen-docker-2.12.0/lib/docker/version.rb
@@ -21,5 +21,5 @@ begin
API_VERSION = '1.24'
end
rescue LoadError => e
- logger.debug("[Docker] docker-api gem not found for InSpec verifier. #{e}")
+ puts("[Docker] docker-api gem not found for InSpec verifier. #{e}")
end
diff --git a/kitchen-docker-2.12.0/lib/kitchen/docker/helpers/inspec_helper.rb b/kitchen-docker-2.12.0/lib/kitchen/docker/helpers/inspec_helper.rb
index 5f0d325..f662543 100644
--- a/kitchen-docker-2.12.0/lib/kitchen/docker/helpers/inspec_helper.rb
+++ b/kitchen-docker-2.12.0/lib/kitchen/docker/helpers/inspec_helper.rb
@@ -36,5 +36,5 @@ begin
end
end
rescue LoadError => e
- logger.debug("[Docker] kitchen-inspec gem not found for InSpec verifier. #{e}")
+ puts("[Docker] kitchen-inspec gem not found for InSpec verifier. #{e}")^M
end
diff --git a/kitchen-docker-2.12.0/lib/kitchen/transport/docker.rb b/kitchen-docker-2.12.0/lib/kitchen/transport/docker.rb
index de31807..e262814 100644
--- a/kitchen-docker-2.12.0/lib/kitchen/transport/docker.rb
+++ b/kitchen-docker-2.12.0/lib/kitchen/transport/docker.rb
@@ -80,7 +80,11 @@ module Kitchen
class Connection < Kitchen::Transport::Docker::Connection
# Include the InSpec patches to be able to execute tests on Windows containers
- include Kitchen::Docker::Helpers::InspecHelper
+ begin
+ include Kitchen::Docker::Helpers::InspecHelper
+ rescue Exception => e
+ puts("Error")
+ end
def execute(command)
return if command.nil?
diff --git a/kitchen-docker-2.12.0/lib/train/docker.rb b/kitchen-docker-2.12.0/lib/train/docker.rb
index 024caae..1fb80b9 100644
--- a/kitchen-docker-2.12.0/lib/train/docker.rb
+++ b/kitchen-docker-2.12.0/lib/train/docker.rb
@@ -121,5 +121,5 @@ begin
end
end
rescue LoadError => e
- logger.debug("[Docker] train gem not found for InSpec verifier. #{e}")
+ puts("[Docker] train gem not found for InSpec verifier. #{e}")
end |
So is the workaround still to add the |
@olhado I would suggest trying that, yes |
That seemed to work! |
👻 Brief Description
Inability of using
docker
astransport
.Version
kitchen-docker
: 2.10.0test-kitchen
: 2.8.0Environment
The text was updated successfully, but these errors were encountered: