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: Sandbox directory has not yet been created #9

Closed
mheap opened this issue Dec 16, 2015 · 8 comments
Closed

Error: Sandbox directory has not yet been created #9

mheap opened this issue Dec 16, 2015 · 8 comments
Labels

Comments

@mheap
Copy link

mheap commented Dec 16, 2015

This only happens on 0.6. Version 0.5 runs quite happily.

>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: Failed to complete #converge action: [Sandbox directory has not yet been created. Please run Kitchen::Provisioner::Nodes#create_sandox before trying to access the path.]
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration

Some debug info:

  • I'm on Arch Linux
  • /opt/chef/bin is the first thing in my $PATH
$ chef --version
Chef Development Kit Version: 0.10.0
chef-client version: 12.5.1
berks version: 4.0.1
kitchen version: 1.4.2

And the output from kitchen diagnose

timestamp: 2015-12-16 17:30:57 UTC
kitchen_version: 1.4.2
plugins:
  driver:
    Docker:
      class: Kitchen::Driver::Docker
      version: 
      api_version: 
  provisioner:
    Nodes:
      class: Kitchen::Provisioner::Nodes
      version: 
      api_version: 
  transport:
    Ssh:
      class: Kitchen::Transport::Ssh
      version: 1.4.2
      api_version: 1
  verifier:
    Busser:
      class: Kitchen::Verifier::Busser
      version: 1.4.2
      api_version: 1
loader:
  process_erb: true
  process_local: true
  process_global: true
  global_config: 
  project_config:
    filename: "/home/michael/development/secretproject/commander/chef/cookbook/.kitchen.yml"
    raw_data:
      driver:
        name: docker
        use_sudo: false
      provisioner:
        name: nodes
        roles_path: test/fixtures/roles
        nodes_path: test/fixtures/nodes
        client_rb:
          audit_mode: ":enabled"
      platforms:
      - name: centos
        driver_config:
          image: secretproject/test-kitchen:6-12.4.1
      suites:
      - name: default
        run_list:
        - recipe[commander::default]
        attributes:
          packaging:
            ds_build_gocd:
              enabled: true
  local_config: 
  combined_config:
    filename: 
    raw_data:
      driver:
        name: docker
        use_sudo: false
      provisioner:
        name: nodes
        roles_path: test/fixtures/roles
        nodes_path: test/fixtures/nodes
        client_rb:
          audit_mode: ":enabled"
      platforms:
      - name: centos
        driver_config:
          image: secretproject/test-kitchen:6-12.4.1
      suites:
      - name: default
        run_list:
        - recipe[commander::default]
        attributes:
          packaging:
            ds_build_gocd:
              enabled: true
instances:
  default-centos:
    platform:
      os_type: unix
      shell_type: bourne
    state_file:
      container_id: bf49a475ed68d37a9e9b648b60bfe63edf3fefe58ac8eb3be131554c9a436b5b
      hostname: localhost
      image_id: 6c1da0217a76
      last_action: create
      port: 32779
      ssh_key: "/home/michael/development/secretproject/commander/chef/cookbook/.kitchen/docker_id_rsa"
    driver:
      binary: docker
      build_context: true
      cap_add: 
      cap_drop: 
      disable_upstart: true
      image: secretproject/test-kitchen:6-12.4.1
      kitchen_root: "/home/michael/development/secretproject/commander/chef/cookbook"
      log_level: :info
      name: docker
      password: kitchen
      platform: centos
      port: 22
      private_key: "/home/michael/development/secretproject/commander/chef/cookbook/.kitchen/docker_id_rsa"
      privileged: false
      public_key: "/home/michael/development/secretproject/commander/chef/cookbook/.kitchen/docker_id_rsa.pub"
      publish_all: false
      remove_images: false
      run_command: "/usr/sbin/sshd -D -o UseDNS=no -o UsePAM=no -o PasswordAuthentication=yes
        -o UsePrivilegeSeparation=no -o PidFile=/tmp/sshd.pid"
      security_opt: 
      socket: unix:///var/run/docker.sock
      sudo: true
      test_base_path: "/home/michael/development/secretproject/commander/chef/cookbook/test/integration"
      tls: false
      tls_cacert: 
      tls_cert: 
      tls_key: 
      tls_verify: false
      use_cache: true
      use_sudo: false
      username: kitchen
      wait_for_sshd: true
    provisioner:
      attributes:
        packaging:
          ds_build_gocd:
            enabled: true
      chef_client_path: "/opt/chef/bin/chef-client"
      chef_metadata_url: 
      chef_omnibus_install_options: 
      chef_omnibus_root: "/opt/chef"
      chef_omnibus_url: https://www.chef.io/chef/install.sh
      chef_zero_host: 
      chef_zero_port: 8889
      client_rb:
        audit_mode: ":enabled"
      clients_path: 
      cookbook_files_glob: README.*,metadata.{json,rb},attributes/**/*,definitions/**/*,files/**/*,libraries/**/*,providers/**/*,recipes/**/*,resources/**/*,templates/**/*
      data_bags_path: 
      data_path: 
      encrypted_data_bag_secret_key_path: 
      environments_path: 
      http_proxy: 
      https_proxy: 
      json_attributes: true
      kitchen_root: "/home/michael/development/secretproject/commander/chef/cookbook"
      log_file: 
      log_level: :info
      name: nodes
      nodes_path: "/home/michael/development/secretproject/commander/chef/cookbook/test/fixtures/nodes"
      require_chef_omnibus: true
      roles_path: "/home/michael/development/secretproject/commander/chef/cookbook/test/fixtures/roles"
      root_path: "/tmp/kitchen"
      ruby_bindir: "/opt/chef/embedded/bin"
      run_list:
      - recipe[commander::default]
      sudo: true
      sudo_command: sudo -E
      test_base_path: "/home/michael/development/secretproject/commander/chef/cookbook/test/integration"
    transport:
      compression: true
      compression_level: 6
      connection_retries: 5
      connection_retry_sleep: 1
      connection_timeout: 15
      keepalive: true
      keepalive_interval: 60
      kitchen_root: "/home/michael/development/secretproject/commander/chef/cookbook"
      log_level: :info
      max_wait_until_ready: 600
      name: ssh
      port: 22
      ssh_key: 
      test_base_path: "/home/michael/development/secretproject/commander/chef/cookbook/test/integration"
      username: root
    verifier:
      busser_bin: "/tmp/verifier/bin/busser"
      http_proxy: 
      https_proxy: 
      kitchen_root: "/home/michael/development/secretproject/commander/chef/cookbook"
      log_level: :info
      name: busser
      root_path: "/tmp/verifier"
      ruby_bindir: "/opt/chef/embedded/bin"
      sudo: true
      sudo_command: sudo -E
      suite_name: default
      test_base_path: "/home/michael/development/secretproject/commander/chef/cookbook/test/integration"
      version: busser
@mwrock
Copy link
Owner

mwrock commented Dec 16, 2015

Thanks for this detailed information. Would you mind running your kitchen test with -l debug and report the stacktrace?

@mheap
Copy link
Author

mheap commented Dec 22, 2015

@mwrock Sorry for the delay on this. I've been using 0.5 without any issues

>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: Failed to complete #converge action: [Sandbox directory has not yet been created. Please run Kitchen::Provisioner::Nodes#create_sandox before trying to access the path.]
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration

D      ------Exception-------
D      Class: Kitchen::ActionFailed
D      Message: Failed to complete #converge action: [Sandbox directory has not yet been created. Please run Kitchen::Provisioner::Nodes#create_sandox before trying to access the path.]
D      ---Nested Exception---
D      Class: Kitchen::ClientError
D      Message: Sandbox directory has not yet been created. Please run Kitchen::Provisioner::Nodes#create_sandox before trying to access the path.
D      ------Backtrace-------
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/provisioner/base.rb:145:in `sandbox_path'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/provisioner/base.rb:154:in `cleanup_sandbox'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/driver/ssh_base.rb:87:in `ensure in converge'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/driver/ssh_base.rb:87:in `converge'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:540:in `legacy_ssh_base_converge'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:364:in `block in converge_action'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:488:in `call'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:488:in `synchronize_or_call'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:453:in `block in action'
D      /opt/chefdk/embedded/lib/ruby/2.1.0/benchmark.rb:279:in `measure'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:452:in `action'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:362:in `converge_action'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:341:in `block in transition_to'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:340:in `each'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:340:in `transition_to'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:160:in `verify'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:189:in `block in test'
D      /opt/chefdk/embedded/lib/ruby/2.1.0/benchmark.rb:279:in `measure'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:185:in `test'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/command.rb:176:in `public_send'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/command.rb:176:in `block (2 levels) in run_action'
D      ----------------------

@mwrock
Copy link
Owner

mwrock commented Dec 24, 2015

Ugh. Looks like this stacktrace is from an error raised in converge's ensure block hiding the real error likely thrown from kitchen-nodes.

I just released 0.6.1 which will not fix your issue but should at least allow the root error to be bubbled up so I can better troubleshoot.

My hunch is that the real error is going to be related somehow to your roles file(s) in test/fixtures/roles since the 0.6.0 change now touches that.

Would you be able to share those files? And/Or converge with 0.6.1 and send me the debug stacktrace if you get a chance?

Thanks!

@mheap
Copy link
Author

mheap commented Dec 25, 2015

Evening!

Sadly I can't share the project, but here's a stack trace from 0.6.1

>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: Failed to complete #converge action: [wrong number of arguments (2 for 3)]
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration

D      ------Exception-------
D      Class: Kitchen::ActionFailed
D      Message: Failed to complete #converge action: [wrong number of arguments (2 for 3)]
D      ---Nested Exception---
D      Class: ArgumentError
D      Message: wrong number of arguments (2 for 3)
D      ------Backtrace-------
D      /home/michael/.chefdk/gem/ruby/2.1.0/gems/kitchen-nodes-0.6.1/lib/kitchen/provisioner/run_list_expansion_from_kitchen.rb:25:in `fetch_role'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/run_list/run_list_expansion.rb:95:in `inflate_role'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/run_list/run_list_expansion.rb:150:in `expand_run_list_items'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/run_list/run_list_expansion.rb:84:in `expand'
D      /home/michael/.chefdk/gem/ruby/2.1.0/gems/kitchen-nodes-0.6.1/lib/kitchen/provisioner/nodes.rb:84:in `recipes'
D      /home/michael/.chefdk/gem/ruby/2.1.0/gems/kitchen-nodes-0.6.1/lib/kitchen/provisioner/nodes.rb:105:in `node_template'
D      /home/michael/.chefdk/gem/ruby/2.1.0/gems/kitchen-nodes-0.6.1/lib/kitchen/provisioner/nodes.rb:41:in `create_node'
D      /home/michael/.chefdk/gem/ruby/2.1.0/gems/kitchen-nodes-0.6.1/lib/kitchen/provisioner/nodes.rb:34:in `create_sandbox'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/driver/ssh_base.rb:72:in `converge'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:540:in `legacy_ssh_base_converge'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:364:in `block in converge_action'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:488:in `call'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:488:in `synchronize_or_call'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:453:in `block in action'
D      /opt/chefdk/embedded/lib/ruby/2.1.0/benchmark.rb:279:in `measure'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:452:in `action'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:362:in `converge_action'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:341:in `block in transition_to'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:340:in `each'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:340:in `transition_to'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:160:in `verify'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:189:in `block in test'
D      /opt/chefdk/embedded/lib/ruby/2.1.0/benchmark.rb:279:in `measure'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:185:in `test'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/command.rb:176:in `public_send'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/command.rb:176:in `block (2 levels) in run_action'
D      ----------------------

@mwrock mwrock closed this as completed in 7c9b313 Dec 26, 2015
@mwrock
Copy link
Owner

mwrock commented Dec 26, 2015

Thanks so much! Should be fixed now.

@mheap
Copy link
Author

mheap commented Dec 27, 2015

It gets past that point, but sadly now we have another error :(

Cleaning up local sandbox in /tmp/default-centos-sandbox-20151227-2262-1e07zdy
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: Failed to complete #converge action: [uninitialized constant Kitchen::Provisioner::Chef::Exceptions]
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration

D      ------Exception-------
D      Class: Kitchen::ActionFailed
D      Message: Failed to complete #converge action: [uninitialized constant Kitchen::Provisioner::Chef::Exceptions]
D      ---Nested Exception---
D      Class: NameError
D      Message: uninitialized constant Kitchen::Provisioner::Chef::Exceptions
D      ------Backtrace-------
D      /home/michael/.chefdk/gem/ruby/2.1.0/gems/kitchen-nodes-0.6.2/lib/kitchen/provisioner/run_list_expansion_from_kitchen.rb:33:in `rescue in fetch_role'
D      /home/michael/.chefdk/gem/ruby/2.1.0/gems/kitchen-nodes-0.6.2/lib/kitchen/provisioner/run_list_expansion_from_kitchen.rb:31:in `fetch_role'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/run_list/run_list_expansion.rb:95:in `inflate_role'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/run_list/run_list_expansion.rb:150:in `expand_run_list_items'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/run_list/run_list_expansion.rb:84:in `expand'
D      /home/michael/.chefdk/gem/ruby/2.1.0/gems/kitchen-nodes-0.6.2/lib/kitchen/provisioner/nodes.rb:84:in `recipes'
D      /home/michael/.chefdk/gem/ruby/2.1.0/gems/kitchen-nodes-0.6.2/lib/kitchen/provisioner/nodes.rb:105:in `node_template'
D      /home/michael/.chefdk/gem/ruby/2.1.0/gems/kitchen-nodes-0.6.2/lib/kitchen/provisioner/nodes.rb:41:in `create_node'
D      /home/michael/.chefdk/gem/ruby/2.1.0/gems/kitchen-nodes-0.6.2/lib/kitchen/provisioner/nodes.rb:34:in `create_sandbox'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/driver/ssh_base.rb:72:in `converge'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:540:in `legacy_ssh_base_converge'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:364:in `block in converge_action'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:488:in `call'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:488:in `synchronize_or_call'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:453:in `block in action'
D      /opt/chefdk/embedded/lib/ruby/2.1.0/benchmark.rb:279:in `measure'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:452:in `action'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:362:in `converge_action'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:341:in `block in transition_to'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:340:in `each'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:340:in `transition_to'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:160:in `verify'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:189:in `block in test'
D      /opt/chefdk/embedded/lib/ruby/2.1.0/benchmark.rb:279:in `measure'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:185:in `test'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/command.rb:176:in `public_send'
D      /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/command.rb:176:in `block (2 levels) in run_action'
D      ----------------------

@mwrock
Copy link
Owner

mwrock commented Dec 27, 2015

ugh. ok this time I did what I should have done before, create a test role for the kitchen tests and was able to reproduce and fix this error.

@mheap
Copy link
Author

mheap commented Dec 28, 2015

I tested 0.6.3 and it's working like a dream.

Thanks for the continued work on kitchen-nodes!

@mwrock mwrock added the bug label Mar 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants