Comments (16)
Hi @johnjolet - Can you run test kitchen with --log_level debug
turned on and post the output of your logs? Also, can you run kitchen diagnose
and post your output, too?
from kitchen-docker.
from kitchen-docker.
I get the same error in my Debian/Ubuntu docker-based (Docker in Docker) test kitchen pipelines when upgrading to 2.10.0.
-----> Starting Test Kitchen (v2.5.1)
-----> Creating <default-debian-stretch>...
"docker inspect" requires at least 1 argument.
See 'docker inspect --help'.
Usage: docker inspect [OPTIONS] NAME|ID [NAME|ID...]
Return low-level information on Docker objects
Falling back to 2.9.0 fix the issue.
from kitchen-docker.
Same issue here since 29.03.2020.
/usr/local/bundle/gems/kitchen-docker-2.10.0/lib/kitchen/docker/helpers/container_helper.rb:141:in `rescue in container_ip_address'
/usr/local/bundle/gems/kitchen-docker-2.10.0/lib/kitchen/docker/helpers/container_helper.rb:136:in `container_ip_address'
/usr/local/bundle/gems/kitchen-docker-2.10.0/lib/kitchen/docker/container.rb:45:in `create'
/usr/local/bundle/gems/kitchen-docker-2.10.0/lib/kitchen/docker/container/linux.rb:32:in `create'
/usr/local/bundle/gems/kitchen-docker-2.10.0/lib/kitchen/driver/docker.rb:123:in `create'
/usr/local/bundle/gems/test-kitchen-2.5.2/lib/kitchen/instance.rb:485:in `public_send'
/usr/local/bundle/gems/test-kitchen-2.5.2/lib/kitchen/instance.rb:485:in `block in perform_action'
/usr/local/bundle/gems/test-kitchen-2.5.2/lib/kitchen/instance.rb:552:in `synchronize_or_call'
/usr/local/bundle/gems/test-kitchen-2.5.2/lib/kitchen/instance.rb:514:in `block in action'
/usr/local/bundle/gems/test-kitchen-2.5.2/lib/kitchen/instance.rb:513:in `action'
/usr/local/bundle/gems/test-kitchen-2.5.2/lib/kitchen/instance.rb:485:in `perform_action'
/usr/local/bundle/gems/test-kitchen-2.5.2/lib/kitchen/instance.rb:394:in `create_action'
/usr/local/bundle/gems/test-kitchen-2.5.2/lib/kitchen/instance.rb:382:in `block (2 levels) in transition_to'
/usr/local/bundle/gems/test-kitchen-2.5.2/lib/kitchen/lifecycle_hooks.rb:45:in `run_with_hooks'
/usr/local/bundle/gems/test-kitchen-2.5.2/lib/kitchen/instance.rb:381:in `block in transition_to'
/usr/local/bundle/gems/test-kitchen-2.5.2/lib/kitchen/instance.rb:380:in `each'
/usr/local/bundle/gems/test-kitchen-2.5.2/lib/kitchen/instance.rb:380:in `transition_to'
/usr/local/bundle/gems/test-kitchen-2.5.2/lib/kitchen/instance.rb:162:in `verify'
/usr/local/bundle/gems/test-kitchen-2.5.2/lib/kitchen/instance.rb:191:in `block in test'
/usr/local/bundle/gems/test-kitchen-2.5.2/lib/kitchen/instance.rb:187:in `test'
/builds/puppet-manifests/syseleven-control/Rakefile:149:in `block (3 levels) in <top (required)>'
/builds/puppet-manifests/syseleven-control/Rakefile:139:in `chdir'
/builds/puppet-manifests/syseleven-control/Rakefile:139:in `block (2 levels) in <top (required)>'
/usr/local/bundle/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:30:in `block in <main>'
/usr/local/bin/bundle:22:in `<main>'
Caused by:
Kitchen::ActionFailed: Error getting internal IP of Docker container
/usr/local/bundle/gems/kitchen-docker-2.10.0/lib/kitchen/docker/helpers/container_helper.rb:141:in `rescue in container_ip_address'
/usr/local/bundle/gems/kitchen-docker-2.10.0/lib/kitchen/docker/helpers/container_helper.rb:136:in `container_ip_address'
/usr/local/bundle/gems/kitchen-docker-2.10.0/lib/kitchen/docker/container.rb:45:in `create'
/usr/local/bundle/gems/kitchen-docker-2.10.0/lib/kitchen/docker/container/linux.rb:32:in `create'
/usr/local/bundle/gems/kitchen-docker-2.10.0/lib/kitchen/driver/docker.rb:123:in `create'
/usr/local/bundle/gems/test-kitchen-2.5.2/lib/kitchen/instance.rb:485:in `public_send'
/usr/local/bundle/gems/test-kitchen-2.5.2/lib/kitchen/instance.rb:485:in `block in perform_action'
/usr/local/bundle/gems/test-kitchen-2.5.2/lib/kitchen/instance.rb:552:in `synchronize_or_call'
/usr/local/bundle/gems/test-kitchen-2.5.2/lib/kitchen/instance.rb:514:in `block in action'
/usr/local/bundle/gems/test-kitchen-2.5.2/lib/kitchen/instance.rb:513:in `action'
/usr/local/bundle/gems/test-kitchen-2.5.2/lib/kitchen/instance.rb:485:in `perform_action'
/usr/local/bundle/gems/test-kitchen-2.5.2/lib/kitchen/instance.rb:394:in `create_action'
/usr/local/bundle/gems/test-kitchen-2.5.2/lib/kitchen/instance.rb:382:in `block (2 levels) in transition_to'
/usr/local/bundle/gems/test-kitchen-2.5.2/lib/kitchen/lifecycle_hooks.rb:45:in `run_with_hooks'
/usr/local/bundle/gems/test-kitchen-2.5.2/lib/kitchen/instance.rb:381:in `block in transition_to'
/usr/local/bundle/gems/test-kitchen-2.5.2/lib/kitchen/instance.rb:380:in `each'
/usr/local/bundle/gems/test-kitchen-2.5.2/lib/kitchen/instance.rb:380:in `transition_to'
/usr/local/bundle/gems/test-kitchen-2.5.2/lib/kitchen/instance.rb:162:in `verify'
/usr/local/bundle/gems/test-kitchen-2.5.2/lib/kitchen/instance.rb:191:in `block in test'
/usr/local/bundle/gems/test-kitchen-2.5.2/lib/kitchen/instance.rb:187:in `test'
/builds/puppet-manifests/syseleven-control/Rakefile:149:in `block (3 levels) in <top (required)>'
/builds/puppet-manifests/syseleven-control/Rakefile:139:in `chdir'
/builds/puppet-manifests/syseleven-control/Rakefile:139:in `block (2 levels) in <top (required)>'
/usr/local/bundle/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:30:in `block in <main>'
/usr/local/bin/bundle:22:in `<main>'
Caused by:
Kitchen::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of docker -H unix:///var/run/docker.sock inspect --format '{{ .NetworkSettings.IPAddress }}' ----
STDOUT:
STDERR: "docker inspect" requires at least 1 argument.
See 'docker inspect --help'.
Usage: docker inspect [OPTIONS] NAME|ID [NAME|ID...]
Return low-level information on Docker objects
---- End output of docker -H unix:///var/run/docker.sock inspect --format '{{ .NetworkSettings.IPAddress }}' ----
from kitchen-docker.
@Val @crazymind1337 - Would you be able to provide your kitchen.yml file? I tried running a quick test on a test system and didn't run into this issue for some reason. I want to make sure I can replicate it with your exact config.
from kitchen-docker.
I have removed some internal config which should not be related to the error like provisioner:
driver:
name: docker
use_sudo: false
## this is true when the error appears
use_internal_docker_network: <%= ENV['CI'] ? true : false %>
privileged: true
run_command: '/myinit'
provision_command:
- echo 'APT::Acquire::Retries 5;' > /etc/apt/apt.conf.d/80-acquire-retries
- apt-get update
volume:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
transport:
name: speedy_ssh
verifier:
name: inspec
##
## here we set some internal puppet stuff to prepare the tests
## this should not be important for the error
##
# provisioner:
# <some internal provisioner stuff>
platforms:
- name: ubuntu-14.04
driver_config:
image: <internal images based on ubuntu:14.04>
- name: ubuntu-16.04
driver_config:
image: <internal images based on ubuntu:16.04>
- name: ubuntu-18.04
driver_config:
image: <internal images based on ubuntu:18.04>
- name: ubuntu-20.04
driver_config:
image: <internal images based on ubuntu:20.04>
from kitchen-docker.
@crazymind1337 Thanks -- I was able to reproduce it now. I see the issue is definitely related to the use_internal_docker_network option. The container ID isn't set when it attempts to execute this docker inspect command to retrieve the IP address of the container since it launches the container after this gets executed.
I'm working on a fix now and will provide an update soon.
from kitchen-docker.
@Val @crazymind1337 @johnjolet - I opened PR #369 with a potential fix. Would any of you be able to assist with testing this fix in your environments? So far, It looks like it's working on my test system.
from kitchen-docker.
I can test it.
from kitchen-docker.
I got a new error but it is not related to this Gem. Also updated inspec
and inspec-core
which have been updated June 17, 2020 and those are causing new error. I think this bug is fixed with your PR.
from kitchen-docker.
@crazymind1337 Thanks for testing. Closing issue since the PR with the fix was merged earlier today.
from kitchen-docker.
Can you tell me about a new release containing your PR?
from kitchen-docker.
@crazymind1337 Not quite sure right this moment, but I think we'd release another version relatively soon. There are a few other items I wanted to look into and address before releasing another version of this gem.
from kitchen-docker.
@jeffreycoe if you need a release cut just let me know :)
from kitchen-docker.
@crazymind1337 Not quite sure right this moment, but I think we'd release another version relatively soon. There are a few other items I wanted to look into and address before releasing another version of this gem.
That's okay. I don't want to make stress. Stay cool and healthy! Have a nice weekend!
from kitchen-docker.
@crazymind1337 You too. Thanks!
@xorima I may take you up on that offer when we're ready. Thanks for reaching out 👍
from kitchen-docker.
Related Issues (20)
- Transport does not work in Windows HOT 7
- Gem v2.9.0 doesn't include the docker transport HOT 6
- Unable to fetch packages during kitchen create for ubuntu-14.04 platform HOT 1
- Message: Error getting internal IP of Docker container HOT 4
- Docker images deletions fails when instances share the same image ID
- There does not appear to be a way to clean up volumes created by kitchen-docker HOT 4
- dependency roles in requirements.yml installed successfully, but error role not found when running test playbook. HOT 1
- Create new release of kitchen-docker gem HOT 5
- This seems to be fixed, does it still need to be here?
- Unable to use docker as transport HOT 10
- docker build output no longer matches image_helper regex HOT 1
- Unable to map docker.sock in as volume for docker-in-docker HOT 2
- Cannot use docker transport when using docker tmpfs on /tmp
- Docker build on M1 Mac can fail if the buildkit output includes timings/timestamps HOT 8
- Support for Centosstream and PhotonOS missing from kitchen-docker HOT 1
- SSH failed with Ubuntu 22 and Centos 9 HOT 2
- Amazon 2022 images fail to build due to conflict between curl packages HOT 6
- Waiting for SSH service on localhost:49714, retrying in 3 seconds HOT 1
- Docker build output parsing broken on recent Docker Desktop
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kitchen-docker.