Giter VIP home page Giter VIP logo

Comments (16)

jeffreycoe avatar jeffreycoe commented on September 27, 2024

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.

johnjolet avatar johnjolet commented on September 27, 2024

from kitchen-docker.

Val avatar Val commented on September 27, 2024

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.

crazymind1337 avatar crazymind1337 commented on September 27, 2024

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.

jeffreycoe avatar jeffreycoe commented on September 27, 2024

@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.

crazymind1337 avatar crazymind1337 commented on September 27, 2024

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.

jeffreycoe avatar jeffreycoe commented on September 27, 2024

@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.

jeffreycoe avatar jeffreycoe commented on September 27, 2024

@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.

crazymind1337 avatar crazymind1337 commented on September 27, 2024

I can test it.

from kitchen-docker.

crazymind1337 avatar crazymind1337 commented on September 27, 2024

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.

jeffreycoe avatar jeffreycoe commented on September 27, 2024

@crazymind1337 Thanks for testing. Closing issue since the PR with the fix was merged earlier today.

from kitchen-docker.

crazymind1337 avatar crazymind1337 commented on September 27, 2024

Can you tell me about a new release containing your PR?

from kitchen-docker.

jeffreycoe avatar jeffreycoe commented on September 27, 2024

@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.

xorima avatar xorima commented on September 27, 2024

@jeffreycoe if you need a release cut just let me know :)

from kitchen-docker.

crazymind1337 avatar crazymind1337 commented on September 27, 2024

@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.

jeffreycoe avatar jeffreycoe commented on September 27, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.