Atalanta / cucumber-chef

Framework for test-driven infrastructure development
http://cucumber-chef.org
Apache License 2.0
265 stars 55 forks source link

SSH Timeout ? #112

Open bigmyx opened 11 years ago

bigmyx commented 11 years ago

I am trying to start the new lab environment. When I run 'cucumber-chef setup' command I got this error:

Provisioning cucumber-chef test lab platform.
Waiting for instance...done.
Waiting for 20 seconds...done.
Waiting for SSHD...done.
Bootstrapping AWS EC2 instance...|/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/ztk-1.0.8/lib/ztk/base.rb:90:in `log_and_raise': Session timed out after 5 seconds! (ZTK::SSHError)
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/ztk-1.0.8/lib/ztk/base.rb:129:in `log_and_raise'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/ztk-1.0.8/lib/ztk/ssh.rb:291:in `rescue in exec'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/ztk-1.0.8/lib/ztk/ssh.rb:221:in `exec'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-2.0.7/lib/cucumber/chef/bootstrap.rb:83:in `run'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-2.0.7/lib/cucumber/chef/provisioner.rb:104:in `block in bootstrap'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-2.0.7/lib/cucumber/chef/utility.rb:109:in `spinner'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-2.0.7/lib/cucumber/chef/provisioner.rb:83:in `bootstrap'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-2.0.7/lib/cucumber/chef/provisioner.rb:56:in `build'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-2.0.7/bin/cucumber-chef:149:in `setup'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-2.0.7/bin/cucumber-chef:462:in `'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/bin/cucumber-chef:19:in `load'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/bin/cucumber-chef:19:in `
' from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/bin/ruby_noexec_wrapper:14:in `eval' from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/bin/ruby_noexec_wrapper:14:in `
'

Here is the logfile:

013-04-04|12:29:17.918665|18379| INFO|                       mic-mac:cucumber-chef:66:load_config|================================================================================
2013-04-04|12:29:17.918905|18379| INFO|                       mic-mac:cucumber-chef:67:load_config|cucumber-chef v2.0.7
2013-04-04|12:29:17.924237|18379| INFO|                       mic-mac:cucumber-chef:68:load_config|UNAME: Darwin mic-mac.local 12.3.0 Darwin Kernel Version 12.3.0: Sun Jan  6 22:37:10 PST 2013; root:xnu-2050.22.13~1/RELEASE_X86_64 x86_64
2013-04-04|12:29:17.924358|18379| INFO|                       mic-mac:cucumber-chef:69:load_config|Ruby Version: 1.9.3
2013-04-04|12:29:17.924465|18379| INFO|                       mic-mac:cucumber-chef:70:load_config|Ruby Patch Level: 194
2013-04-04|12:29:17.924551|18379| INFO|                       mic-mac:cucumber-chef:71:load_config|Ruby Platform: x86_64-darwin11.4.0
2013-04-04|12:29:17.924630|18379| INFO|                       mic-mac:cucumber-chef:72:load_config|Ruby Engine: ruby
2013-04-04|12:29:17.924709|18379| INFO|                       mic-mac:cucumber-chef:73:load_config|================================================================================
2013-04-04|12:29:17.927516|18379| INFO|                                  mic-mac:config.rb:54:load|Attempting to load cucumber-chef configuration from '/Users/mic/.cucumber-chef/config.rb'.
2013-04-04|12:29:19.712791|18379| INFO|                                  mic-mac:config.rb:57:load|Successfully loaded cucumber-chef configuration from '/Users/mic/.cucumber-chef/config.rb'.
2013-04-04|12:30:20.046152|18379| INFO|                                    mic-mac:ssh.rb:213:exec|exec("sudo bash -c '\nCUCUMBER_CHEF_BOOTSTRAP_DONE=\"/.cucumber-chef-bootstrap-finished\"\n[ -f ${CUCUMBER_CHEF_BOOTSTRAP_DONE} ] && echo \"Already bootstrapped!\" && exit\n\nexport DEBIAN_FRONTEND=noninteractive\n\nsed -i \"s/127.0.0.1 localhost/127.0.0.1 cucumber-chef.test-lab cucumber-chef localhost/\" /etc/hosts\necho \"cucumber-chef.test-lab\" | tee /etc/hostname\nhostname cucumber-chef.test-lab\n\necho \"deb http://apt.opscode.com/ `lsb_release -cs`-0.10 main\" | tee /etc/apt/sources.list.d/opscode.list\nmkdir -p /etc/apt/trusted.gpg.d\ngpg --fetch-key http://apt.opscode.com/packages@opscode.com.gpg.key\ngpg --export packages@opscode.com | tee /etc/apt/trusted.gpg.d/opscode-keyring.gpg > /dev/null\napt-get -q -y --force-yes update\napt-get -q -y --force-yes -o Dpkg::Options::=\"--force-confnew\" install opscode-keyring\napt-get -q -y --force-yes update\nchown -R ${SUDO_USER}:${SUDO_USER} ${HOME}/.gnupg\napt-get -q -y upgrade\n\ncat < ${KNIFE_CONFIG_EXP_FILE}\n#!/usr/bin/expect -f\nset timeout 10\nspawn knife configure -i\nexpect \"Overwrite ${HOME}/.chef/knife.rb\" { send \"Y\\n\" }\nexpect \"Where should I put the config file?\" { send \"\\n\" }\nexpect \"Please enter the chef server URL\" { send \"\\n\" }\nexpect \"Please enter a clientname for the new client\" { send \"${SUDO_USER}\\n\" }\nexpect \"Please enter the existing admin clientname\" { send \"\\n\" }\nexpect \"Please enter the location of the existing admin client\" { send \"${HOME}/.chef/webui.pem\\n\" }\nexpect \"Please enter the validation clientname\" { send \"\\n\" }\nexpect \"Please enter the location of the validation key\" { send \"${HOME}/.chef/validation.pem\\n\" }\nexpect \"Please enter the path to a chef repository\" { send \"${HOME}/chef_repo\\n\" }\ninteract\nEOF\nchmod +x ${KNIFE_CONFIG_EXP_FILE}\n${KNIFE_CONFIG_EXP_FILE}\n\nknife client create mic -d -a -f ${HOME}/.chef/mic.pem\n\nchown -R ${SUDO_USER}:${SUDO_USER} ${HOME}\n\nnc -w 1 127.0.0.1 4040\nif [ $? -ne 0 ]; then\n  /etc/init.d/chef-server-webui stop && sleep 3\n  /usr/sbin/chef-server-webui -e production &\n  while true; do\n    nc -w 1 127.0.0.1 4040\n    if [ $? -eq 0 ]; then\n      break\n    fi\n    sleep 1\n  done\n  kill `jobs -p` && sleep 3\n  /etc/init.d/chef-server-webui start && sleep 3\nfi\n\nif [ ! -f /etc/chef/client.pem ]; then\n  /etc/init.d/chef-client restart\n  echo -n \"Waiting on client.pem to appear...\"\n  i=\"0\"\n  until [ -f /etc/chef/client.pem ]; do\n    i=$[$i+1]\n    sleep 1\n    echo -n \".\"\n    if [ $i -gt 60 ]; then\n      echo -n \"restart-chef-client\"\n      /etc/init.d/chef-client restart\n      i=\"0\"\n    fi\n  done\n  echo \"done.\"\nfi\n\ncat < /etc/chef/first-boot.json\n{\"run_list\":\"role[test_lab]\",\"cucumber_chef\":{\"version\":\"2.0.7\",\"prerelease\":false}}\nEOF\n\ntouch ${CUCUMBER_CHEF_BOOTSTRAP_DONE}\n'")
========[ COMMAND ]========[ ubuntu@54.247.146.66 ]========[ COMMAND ]========
sudo bash -c '
CUCUMBER_CHEF_BOOTSTRAP_DONE="/.cucumber-chef-bootstrap-finished"
[ -f ${CUCUMBER_CHEF_BOOTSTRAP_DONE} ] && echo "Already bootstrapped!" && exit

export DEBIAN_FRONTEND=noninteractive

sed -i "s/127.0.0.1 localhost/127.0.0.1 cucumber-chef.test-lab cucumber-chef localhost/" /etc/hosts
echo "cucumber-chef.test-lab" | tee /etc/hostname
hostname cucumber-chef.test-lab

echo "deb http://apt.opscode.com/ `lsb_release -cs`-0.10 main" | tee /etc/apt/sources.list.d/opscode.list
mkdir -p /etc/apt/trusted.gpg.d
gpg --fetch-key http://apt.opscode.com/packages@opscode.com.gpg.key
gpg --export packages@opscode.com | tee /etc/apt/trusted.gpg.d/opscode-keyring.gpg > /dev/null
apt-get -q -y --force-yes update
apt-get -q -y --force-yes -o Dpkg::Options::="--force-confnew" install opscode-keyring
apt-get -q -y --force-yes update
chown -R ${SUDO_USER}:${SUDO_USER} ${HOME}/.gnupg
apt-get -q -y upgrade

cat < ${KNIFE_CONFIG_EXP_FILE}
#!/usr/bin/expect -f
set timeout 10
spawn knife configure -i
expect "Overwrite ${HOME}/.chef/knife.rb" { send "Y\n" }
expect "Where should I put the config file?" { send "\n" }
expect "Please enter the chef server URL" { send "\n" }
expect "Please enter a clientname for the new client" { send "${SUDO_USER}\n" }
expect "Please enter the existing admin clientname" { send "\n" }
expect "Please enter the location of the existing admin client" { send "${HOME}/.chef/webui.pem\n" }
expect "Please enter the validation clientname" { send "\n" }
expect "Please enter the location of the validation key" { send "${HOME}/.chef/validation.pem\n" }
expect "Please enter the path to a chef repository" { send "${HOME}/chef_repo\n" }
interact
EOF
chmod +x ${KNIFE_CONFIG_EXP_FILE}
${KNIFE_CONFIG_EXP_FILE}

knife client create mic -d -a -f ${HOME}/.chef/mic.pem

chown -R ${SUDO_USER}:${SUDO_USER} ${HOME}

nc -w 1 127.0.0.1 4040
if [ $? -ne 0 ]; then
  /etc/init.d/chef-server-webui stop && sleep 3
  /usr/sbin/chef-server-webui -e production &
  while true; do
    nc -w 1 127.0.0.1 4040
    if [ $? -eq 0 ]; then
      break
    fi
    sleep 1
  done
  kill `jobs -p` && sleep 3
  /etc/init.d/chef-server-webui start && sleep 3
fi

if [ ! -f /etc/chef/client.pem ]; then
  /etc/init.d/chef-client restart
  echo -n "Waiting on client.pem to appear..."
  i="0"
  until [ -f /etc/chef/client.pem ]; do
    i=$[$i+1]
    sleep 1
    echo -n "."
    if [ $i -gt 60 ]; then
      echo -n "restart-chef-client"
      /etc/init.d/chef-client restart
      i="0"
    fi
  done
  echo "done."
fi

cat < /etc/chef/first-boot.json
{"run_list":"role[test_lab]","cucumber_chef":{"version":"2.0.7","prerelease":false}}
EOF

touch ${CUCUMBER_CHEF_BOOTSTRAP_DONE}
'
========[ OPENED ]========[ ubuntu@54.247.146.66 ]========[ OPENED ]========
========[ STDOUT ]========[ ubuntu@54.247.146.66 ]========[ STDOUT ]========
cucumber-chef.test-lab
deb http://apt.opscode.com/ precise-0.10 main
gpg: directory `/home/ubuntu/.gnupg' created
gpg: new configuration file `/home/ubuntu/.gnupg/gpg.conf' created
gpg: WARNING: options in `/home/ubuntu/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/home/ubuntu/.gnupg/secring.gpg' created
gpg: keyring `/home/ubuntu/.gnupg/pubring.gpg' created
gpg: /home/ubuntu/.gnupg/trustdb.gpg: trustdb created
gpg: key 83EF826A: public key "Opscode Packages " imported
gpg: Total number processed: 1
gpg:               imported: 1
Hit http://archive.ubuntu.com precise Release.gpg
Get:1 http://archive.ubuntu.com precise-updates Release.gpg [198 B]
Hit http://archive.ubuntu.com precise Release
Get:2 http://archive.ubuntu.com precise-updates Release [49.6 kB]
Get:3 http://apt.opscode.com precise-0.10 Release.gpg [198 B]
Get:4 http://security.ubuntu.com precise-security Release.gpg [198 B]
Hit http://archive.ubuntu.com precise/main i386 Packages
Hit http://archive.ubuntu.com precise/restricted i386 Packages
Get:5 http://apt.opscode.com precise-0.10 Release [4488 B]
Hit http://archive.ubuntu.com precise/universe i386 Packages
Hit http://archive.ubuntu.com precise/multiverse i386 Packages
Get:6 http://security.ubuntu.com precise-security Release [49.6 kB]
Hit http://archive.ubuntu.com precise/main TranslationIndex
Hit http://archive.ubuntu.com precise/multiverse TranslationIndex
========[ TIMEOUT ]========[ ubuntu@54.247.146.66 ]========[ TIMEOUT ]========
2013-04-04|12:30:25.050872|18379|FATAL|                          mic-mac:ssh.rb:291:rescue in exec|EXCEPTION: ZTK::SSHError - "Session timed out after 5 seconds!"
2013-04-04|12:32:14.372487|18734| INFO|                       mic-mac:cucumber-chef:66:load_config|================================================================================
2013-04-04|12:32:14.372692|18734| INFO|                       mic-mac:cucumber-chef:67:load_config|cucumber-chef v2.0.7
2013-04-04|12:32:14.377947|18734| INFO|                       mic-mac:cucumber-chef:68:load_config|UNAME: Darwin mic-mac.local 12.3.0 Darwin Kernel Version 12.3.0: Sun Jan  6 22:37:10 PST 2013; root:xnu-2050.22.13~1/RELEASE_X86_64 x86_64
2013-04-04|12:32:14.378117|18734| INFO|                       mic-mac:cucumber-chef:69:load_config|Ruby Version: 1.9.3
2013-04-04|12:32:14.378250|18734| INFO|                       mic-mac:cucumber-chef:70:load_config|Ruby Patch Level: 194
2013-04-04|12:32:14.378387|18734| INFO|                       mic-mac:cucumber-chef:71:load_config|Ruby Platform: x86_64-darwin11.4.0
2013-04-04|12:32:14.378503|18734| INFO|                       mic-mac:cucumber-chef:72:load_config|Ruby Engine: ruby
2013-04-04|12:32:14.378626|18734| INFO|                       mic-mac:cucumber-chef:73:load_config|================================================================================
2013-04-04|12:32:14.382086|18734| INFO|                                  mic-mac:config.rb:54:load|Attempting to load cucumber-chef configuration from '/Users/mic/.cucumber-chef/config.rb'.
2013-04-04|12:32:16.082583|18734| INFO|                                  mic-mac:config.rb:57:load|Successfully loaded cucumber-chef configuration from '/Users/mic/.cucumber-chef/config.rb'.
2013-04-04|12:32:20.029108|18734|FATAL|                               mic-mac:utility.rb:83:locate|Could not locate file '.cucumber-chef/id_rsa-ubuntu'.
2013-04-04|12:32:20.029362|18734|FATAL|                    mic-mac:cucumber-chef:329:rescue in ssh|/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-2.0.7/lib/cucumber/chef/utility.rb:84:in `locate'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-2.0.7/bin/cucumber-chef:304:in `ssh'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-2.0.7/bin/cucumber-chef:462:in `'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/bin/cucumber-chef:19:in `load'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/bin/cucumber-chef:19:in `
' /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/bin/ruby_noexec_wrapper:14:in `eval' /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/bin/ruby_noexec_wrapper:14:in `
'

When I try to ssh the lab like this :

ssh ubuntu@54.247.146.66

I have no problem But, 'cucumber-chef ssh' command fails :

cucumber-chef ssh
cucumber-chef v2.0.7

Could not locate file '.cucumber-chef/id_rsa-ubuntu'.

Please advise. Thanks !

zpatten commented 11 years ago

I'll look into this today and let you know what I find. Ty for the log output as well! On Apr 4, 2013 5:48 AM, "Michael" notifications@github.com wrote:

I am trying to start the new lab environment. When I run 'cucumber-chef setup' command I got this error:

Provisioning cucumber-chef test lab platform. Waiting for instance...done. Waiting for 20 seconds...done. Waiting for SSHD...done. Bootstrapping AWS EC2 instance...|/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/ztk-1.0.8/lib/ztk/base.rb:90:in log_and_raise': Session timed out after 5 seconds! (ZTK::SSHError) from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/ztk-1.0.8/lib/ztk/base.rb:129:inlog_and_raise' from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/ztk-1.0.8/lib/ztk/ssh.rb:291:in rescue in exec' from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/ztk-1.0.8/lib/ztk/ssh.rb:221:inexec' from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-2.0.7/lib/cucumber/chef/bootstrap.rb:83:in run' from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-2.0.7/lib/cucumber/chef/provisioner.rb:104:inblock in bootstrap' from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-2.0.7/lib/cucumber/chef/utility.rb:109:in spinner' from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-2.0.7/lib/cucumber/chef/provisioner.rb:83:inbootstrap' from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-2.0.7/lib/cucumber/chef/provisioner.rb:56:in build' from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-2.0.7/bin/cucumber-chef:149:insetup' from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/thor-0.18.1/lib/thor/command.rb:27:in run' from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/thor-0.18.1/lib/thor/invocation.rb:120:ininvoke_command' from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/thor-0.18.1/lib/thor.rb:363:in dispatch' from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/thor-0.18.1/lib/thor/base.rb:439:instart' from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-2.0.7/bin/cucumber-chef:462:in ' from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/bin/cucumber-chef:19:inload' from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/bin/cucumber-chef:19:in ' from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/bin/ruby_noexec_wrapper:14:ineval' from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/bin/ruby_noexec_wrapper:14:in `'

Here is the logfile:

013-04-04|12:29:17.918665|18379| INFO| mic-mac:cucumber-chef:66:load_config|================================================================================ 2013-04-04|12:29:17.918905|18379| INFO| mic-mac:cucumber-chef:67:load_config|cucumber-chef v2.0.7 2013-04-04|12:29:17.924237|18379| INFO| mic-mac:cucumber-chef:68:load_config|UNAME: Darwin mic-mac.local 12.3.0 Darwin Kernel Version 12.3.0: Sun Jan 6 22:37:10 PST 2013; root:xnu-2050.22.13~1/RELEASE_X86_64 x86_64 2013-04-04|12:29:17.924358|18379| INFO| mic-mac:cucumber-chef:69:load_config|Ruby Version: 1.9.3 2013-04-04|12:29:17.924465|18379| INFO| mic-mac:cucumber-chef:70:load_config|Ruby Patch Level: 194 2013-04-04|12:29:17.924551|18379| INFO| mic-mac:cucumber-chef:71:load_config|Ruby Platform: x86_64-darwin11.4.0 2013-04-04|12:29:17.924630|18379| INFO| mic-mac:cucumber-chef:72:load_config|Ruby Engine: ruby 2013-04-04|12:29:17.924709|18379| INFO| mic-mac:cucumber-chef:73:load_config|================================================================================ 2013-04-04|12:29:17.927516|18379| INFO| mic-mac:config.rb:54:load|Attempting to load cucumber-chef configuration from '/Users/mic/.cucumber-chef/config.rb'. 2013-04-04|12:29:19.712791|18379| INFO| mic-mac:config.rb:57:load|Successfully loaded cucumber-chef configuration from '/Users/mic/.cucumber-chef/config.rb'. 2013-04-04|12:30:20.046152|18379| INFO| mic-mac:ssh.rb:213:exec|exec("sudo bash -c '\nCUCUMBER_CHEF_BOOTSTRAP_DONE=\"/.cucumber-chef-bootstrap-finished\"\n[ -f ${CUCUMBER_CHEF_BOOTSTRAP_DONE} ] && echo \"Already bootstrapped!\" && exit\n\nexport DEBIAN_FRONTEND=noninteractive\n\nsed -i \"s/127.0.0.1 localhost/127.0.0.1 cucumber-chef.test-lab cucumber-chef localhost/\" /etc/hosts\necho \"cucumber-chef.test-lab\" | tee /etc/hostname\nhostname cucumber-chef.test-lab\n\necho \"deb http://apt.opscode.com/ lsb_release -cs-0.10 main\" | tee /etc/apt/sources.list.d/opscode.list\nmkdir -p /etc/apt/trusted.gpg.d\ngpg --fetch-key http://apt.opscode.com/packages@opscode.com.gpg.key\ngpg --export packages@opscode.com | tee /etc/apt/trusted.gpg.d/opscode-keyring.gpg > /dev/null\napt-get -q -y --force-yes update\napt-get -q -y --force-yes -o Dpkg::Options::=\"--force-confnew\" install opscode-keyring\napt-get -q -y --force-yes update\n chown -R ${SUDO_USER}:${SUDO_USER} ${HOME}/.gnupg\napt-get -q -y upgrade\n\ncat ${KNIFE_CONFIG_EXP_FILE}\n#!/usr/bin/expect -f\nset timeout 10\nspawn knife configure -i\nexpect \"Overwrite ${HOME}/.chef/knife.rb\" { send \"Y\n\" }\nexpect \"Where should I put the config file?\" { send \"\n\" }\nexpect \"Please enter the chef server URL\" { send \"\n\" }\nexpect \"Please enter a clientname for the new client\" { send \"${SUDO_USER}\n\" }\nexpect \"Please enter the existing admin clientname\" { send \"\n\" }\nexpect \"Please enter the location of the existing admin client\" { send \"${HOME}/.chef/webui.pem\n\" }\nexpect \"Please enter the validation clientname\" { send \"\n\" }\nexpect \"Please enter the location of the validation key\" { send \"${HOME}/.chef/validation.pem\n\" }\nexpect \"Please enter the path to a chef repository\" { send \"${HOME}/chef_repo\n\" }\ninteract\nEOF\nchmod +x ${KNIFE_CONFIG_EXP_FILE}\n${KNIFE_CONFIG_EXP_FILE}\n\nknife client create mic -d -a -f ${HOME}/.chef/mic.pem\n\nchown -R ${SUDO_USER}:${SUDO_USER} ${HOME}\n\nnc -w 1 127.0.0.1 4040\nif [ $? -ne 0 ]; then\n /etc/init.d/chef-server-webui stop && sleep 3\n /usr/sbin/chef-server-webui -e production &\n while true; do\n nc -w 1 127.0.0.1 4040\n if [ $? -eq 0 ]; then\n break\n fi\n sleep 1\n done\n kill jobs -p && sleep 3\n /etc/init.d/chef-server-webui start && sleep 3\nfi\n\nif [ ! -f /etc/chef/client.pem ]; then\n /etc/init.d/chef-client restart\n echo -n \"Waiting on client.pem to appear...\"\n i=\"0\"\n until [ -f /etc/chef/client.pem ]; do\n i=$[$i+1]\n sleep 1\n echo -n \".\"\n if [ $i -gt 60 ]; then\n echo -n \"restart-chef-client\"\n /etc/init.d/chef-client restart\n i=\"0\"\n fi\n done\n echo \"done.\"\nfi\n\ncat /etc/chef/first-boot.json\n{\"run_list\":\"role[test_lab]\",\"cucumber_chef\":{\"version\":\"2.0.7\",\"prerelease\":false}}\nEOF\n\ntouch ${CUCUMBE R_CHEF_BOOTSTRAP_DONE}\n'") ========[ COMMAND ]========[ ubuntu@54.247.146.66 ]========[ COMMAND ]======== sudo bash -c ' CUCUMBER_CHEF_BOOTSTRAP_DONE="/.cucumber-chef-bootstrap-finished" [ -f ${CUCUMBER_CHEF_BOOTSTRAP_DONE} ] && echo "Already bootstrapped!" && exit

export DEBIAN_FRONTEND=noninteractive

sed -i "s/127.0.0.1 localhost/127.0.0.1 cucumber-chef.test-lab cucumber-chef localhost/" /etc/hosts echo "cucumber-chef.test-lab" | tee /etc/hostname hostname cucumber-chef.test-lab

echo "deb http://apt.opscode.com/ lsb_release -cs-0.10 main" | tee /etc/apt/sources.list.d/opscode.list mkdir -p /etc/apt/trusted.gpg.d gpg --fetch-key http://apt.opscode.com/packages@opscode.com.gpg.key gpg --export packages@opscode.com | tee /etc/apt/trusted.gpg.d/opscode-keyring.gpg > /dev/null apt-get -q -y --force-yes update apt-get -q -y --force-yes -o Dpkg::Options::="--force-confnew" install opscode-keyring apt-get -q -y --force-yes update chown -R ${SUDO_USER}:${SUDO_USER} ${HOME}/.gnupg apt-get -q -y upgrade

cat ${KNIFE_CONFIG_EXP_FILE}

!/usr/bin/expect -f

set timeout 10 spawn knife configure -i expect "Overwrite ${HOME}/.chef/knife.rb" { send "Y\n" } expect "Where should I put the config file?" { send "\n" } expect "Please enter the chef server URL" { send "\n" } expect "Please enter a clientname for the new client" { send "${SUDO_USER}\n" } expect "Please enter the existing admin clientname" { send "\n" } expect "Please enter the location of the existing admin client" { send "${HOME}/.chef/webui.pem\n" } expect "Please enter the validation clientname" { send "\n" } expect "Please enter the location of the validation key" { send "${HOME}/.chef/validation.pem\n" } expect "Please enter the path to a chef repository" { send "${HOME}/chef_repo\n" } interact EOF chmod +x ${KNIFE_CONFIG_EXP_FILE} ${KNIFE_CONFIG_EXP_FILE}

knife client create mic -d -a -f ${HOME}/.chef/mic.pem

chown -R ${SUDO_USER}:${SUDO_USER} ${HOME}

nc -w 1 127.0.0.1 4040 if [ $? -ne 0 ]; then /etc/init.d/chef-server-webui stop && sleep 3 /usr/sbin/chef-server-webui -e production & while true; do nc -w 1 127.0.0.1 4040 if [ $? -eq 0 ]; then break fi sleep 1 done kill jobs -p && sleep 3 /etc/init.d/chef-server-webui start && sleep 3 fi

if [ ! -f /etc/chef/client.pem ]; then /etc/init.d/chef-client restart echo -n "Waiting on client.pem to appear..." i="0" until [ -f /etc/chef/client.pem ]; do i=$[$i+1] sleep 1 echo -n "." if [ $i -gt 60 ]; then echo -n "restart-chef-client" /etc/init.d/chef-client restart i="0" fi done echo "done." fi

cat /etc/chef/first-boot.json {"run_list":"role[test_lab]","cucumber_chef":{"version":"2.0.7","prerelease":false}} EOF

touch ${CUCUMBER_CHEF_BOOTSTRAP_DONE} ' ========[ OPENED ]========[ ubuntu@54.247.146.66 ]========[ OPENED ]======== ========[ STDOUT ]========[ ubuntu@54.247.146.66 ]========[ STDOUT ]======== cucumber-chef.test-lab deb http://apt.opscode.com/ precise-0.10 main gpg: directory /home/ubuntu/.gnupg' created gpg: new configuration file/home/ubuntu/.gnupg/gpg.conf' created gpg: WARNING: options in /home/ubuntu/.gnupg/gpg.conf' are not yet active during this run gpg: keyring/home/ubuntu/.gnupg/secring.gpg' created gpg: keyring /home/ubuntu/.gnupg/pubring.gpg' created gpg: /home/ubuntu/.gnupg/trustdb.gpg: trustdb created gpg: key 83EF826A: public key "Opscode Packages " imported gpg: Total number processed: 1 gpg: imported: 1 Hit http://archive.ubuntu.com precise Release.gpg Get:1 http://archive.ubuntu.com precise-updates Release.gpg [198 B] Hit http://archive.ubuntu.com precise Release Get:2 http://archive.ubuntu.com precise-updates Release [49.6 kB] Get:3 http://apt.opscode.com precise-0.10 Release.gpg [198 B] Get:4 http://security.ubuntu.com precise-security Release.gpg [198 B] Hit http://archive.ubuntu.com precise/main i386 Packages Hit http://archive.ubuntu.com precise/restricted i386 Packages Get:5 http://apt.opscode.com precise-0.10 Release [4488 B] Hit http://archive.ubuntu.com precise/universe i386 Packages Hit http://archive.ubuntu.com precise/multiverse i386 Packages Get:6 http://security.ubuntu.com precise-security Release [49.6 kB] Hit http://archive.ubuntu.com precise/main TranslationIndex Hit http://archive.ubuntu.com precise/multiverse TranslationIndex ========[ TIMEOUT ]========[ ubuntu@54.247.146.66 ]========[ TIMEOUT ]======== 2013-04-04|12:30:25.050872|18379|FATAL| mic-mac:ssh.rb:291:rescue in exec|EXCEPTION: ZTK::SSHError - "Session timed out after 5 seconds!" 2013-04-04|12:32:14.372487|18734| INFO| mic-mac:cucumber-chef:66:load_config|================================================================================ 2013-04-04|12:32:14.372692|18734| INFO| mic-mac:cucumber-chef:67:load_config|cucumber-chef v2.0.7 2013-04-04|12:32:14.377947|18734| INFO| mic-mac:cucumber-chef:68:load_config|UNAME: Darwin mic-mac.local 12.3.0 Darwin Kernel Version 12.3.0: Sun Jan 6 22:37:10 PST 2013; root:xnu-2050.22.13~1/RELEASE_X86_64 x86_64 2013-04-04|12:32:14.378117|18734| INFO| mic-mac:cucumber-chef:69:load_config|Ruby Version: 1.9.3 2013-04-04|12:32:14.378250|18734| INFO| mic-mac:cucumber-chef:70:load_config|Ruby Patch Level: 194 2013-04-04|12:32:14.378387|18734| INFO| mic-mac:cucumber-chef:71:load_config|Ruby Platform: x86_64-darwin11.4.0 2013-04-04|12:32:14.378503|18734| INFO| mic-mac:cucumber-chef:72:load_config|Ruby Engine: ruby 2013-04-04|12:32:14.378626|18734| INFO| mic-mac:cucumber-chef:73:load_config|================================================================================ 2013-04-04|12:32:14.382086|18734| INFO| mic-mac:config.rb:54:load|Attempting to load cucumber-chef configuration from '/Users/mic/.cucumber-chef/config.rb'. 2013-04-04|12:32:16.082583|18734| INFO| mic-mac:config.rb:57:load|Successfully loaded cucumber-chef configuration from '/Users/mic/.cucumber-chef/config.rb'. 2013-04-04|12:32:20.029108|18734|FATAL| mic-mac:utility.rb:83:locate|Could not locate file '.cucumber-chef/id_rsa-ubuntu'. 2013-04-04|12:32:20.029362|18734|FATAL| mic-mac:cucumber-chef:329:rescue in ssh|/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-2.0.7/lib/cucumber/chef/utility.rb:84:inlocate' /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-2.0.7/bin/cucumber-chef:304:in ssh' /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/thor-0.18.1/lib/thor/command.rb:27:inrun' /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/thor-0.18.1/lib/thor/invocation.rb:120:in invoke_command' /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/thor-0.18.1/lib/thor.rb:363:indispatch' /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/thor-0.18.1/lib/thor/base.rb:439:in start' /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-2.0.7/bin/cucumber-chef:462:in' /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/bin/cucumber-chef:19:in load' /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/bin/cucumber-chef:19:in' /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/bin/ruby_noexec_wrapper:14:in eval' /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/bin/ruby_noexec_wrapper:14:in'

When I try to ssh the lab like this :

ssh ubuntu@54.247.146.66

I have no problem But, 'cucumber-chef ssh' command fails :

cucumber-chef ssh cucumber-chef v2.0.7

Could not locate file '.cucumber-chef/id_rsa-ubuntu'.

Please advise. Thanks !

— Reply to this email directly or view it on GitHubhttps://github.com/Atalanta/cucumber-chef/issues/112 .

zpatten commented 11 years ago

So this appears to be failing because it the apt update after installing the opscode GPG key stalled. The cucumber-chef ssh command therefore fails because the bootstrapping never completed and thus the cucumber-chef credentials where never created.

This appears similar to another issue reported a few weeks back; thou I never got any logs from them to confirm it. Is this behavior consistent for you; as in if you ran a command such as echo "yes" | bin/cucumber-chef destroy ; bin/cucumber-chef setup a few times does the setup stall at the same point every time for you?

bigmyx commented 11 years ago
echo "yes" | cucumber-chef destroy
Could not find command "destroy".
cucumber-chef 
Commands:
  cucumber-chef create       # Create a project template for testing an infrastructure.
  cucumber-chef diagnose   # Provide diagnostics from the chef-client on the specified container.
  cucumber-chef displayconfig         # Display the current cucumber-chef config.
  cucumber-chef down                  # Shutdown the cucumber-chef test lab
  cucumber-chef help [COMMAND]        # Describe available commands or one specific command
  cucumber-chef info                  # Display information about the current test lab.
  cucumber-chef init                  # Initalize cucumber-chef configuration
  cucumber-chef ps [ps-options]       # Snapshot of the current cucumber-chef test lab container processes.
  cucumber-chef setup                 # Setup cucumber-chef test lab in Amazon EC2
  cucumber-chef ssh [container]       # SSH to cucumber-chef test lab or [container] if specified.
  cucumber-chef teardown [container]  # Teardown the cucumber-chef test lab in Amazon EC2 or a test lab [container] if specified.
  cucumber-chef up                    # Startup the cucumber-chef test lab

If I run

cucumber-chef setup
again it fails in the same place:

cucumber-chef setup
cucumber-chef v2.0.7
A test lab already exists using the AWS credentials you have supplied; attempting to reprovision it.
Waiting for SSHD...done.
Bootstrapping AWS EC2 instance...|/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/ztk-1.0.8/lib/ztk/base.rb:90:in `log_and_raise': Session timed out after 5 seconds! (ZTK::SSHError)
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/ztk-1.0.8/lib/ztk/base.rb:129:in `log_and_raise'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/ztk-1.0.8/lib/ztk/ssh.rb:291:in `rescue in exec'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/ztk-1.0.8/lib/ztk/ssh.rb:221:in `exec'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-2.0.7/lib/cucumber/chef/bootstrap.rb:83:in `run'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-2.0.7/lib/cucumber/chef/provisioner.rb:104:in `block in bootstrap'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-2.0.7/lib/cucumber/chef/utility.rb:109:in `spinner'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-2.0.7/lib/cucumber/chef/provisioner.rb:83:in `bootstrap'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-2.0.7/lib/cucumber/chef/provisioner.rb:56:in `build'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-2.0.7/bin/cucumber-chef:149:in `setup'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-2.0.7/bin/cucumber-chef:462:in `'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/bin/cucumber-chef:19:in `load'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/bin/cucumber-chef:19:in `
' from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/bin/ruby_noexec_wrapper:14:in `eval' from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/bin/ruby_noexec_wrapper:14:in `
'

If I run the apt-get update on the EC2 host - it works just fine.

Thanks !

anujbiyani commented 11 years ago

Ah you're using v2.0.7. Normally you'd be right to use the latest release on Rubygems, but in this case I think you're better off using the latest RC, v3.0.0.rc5.

I ran into a number of random issues with v2.0.7 and switched to v2.1.0.rc.15 which has been great, but I've played around with v3.0.0.rc5 and it works well too. May as well use the latest and greatest!

bigmyx commented 11 years ago

Thanks ! It worked ! I can continue my tests now :)

On Apr 5, 2013, at 8:34 AM, Anuj Biyani notifications@github.com wrote:

Ah you're using v2.0.7. Normally you'd be right to use the latest release on Rubygems, but in this case I think you're better off using the latest RC, v3.0.0.rc5.

I ran into a number of random issues with v2.0.7 and switched to v2.1.0.rc.15 which has been great, but I've played around with v3.0.0.rc5 and it works well too. May as well use the latest and greatest!

— Reply to this email directly or view it on GitHub.

bigmyx commented 11 years ago

Although the setup of the lab was completed w/o error, I cannot see any containers running (I see them all stopped via 'cucumber-chef status --containers' command ) when I ssh into the lab, I see no containers at all (using 'lxc-list' command) any idea ?

On Apr 5, 2013, at 8:34 AM, Anuj Biyani notifications@github.com wrote:

Ah you're using v2.0.7. Normally you'd be right to use the latest release on Rubygems, but in this case I think you're better off using the latest RC, v3.0.0.rc5.

I ran into a number of random issues with v2.0.7 and switched to v2.1.0.rc.15 which has been great, but I've played around with v3.0.0.rc5 and it works well too. May as well use the latest and greatest!

— Reply to this email directly or view it on GitHub.

anujbiyani commented 11 years ago

Hmmm. Have you run a test yet? I could be wrong (haven't dug into this part of the code yet), but I believe containers aren't created until a test is run.

zpatten commented 11 years ago

@anujbiyani is correct; you have to define the containers via the Labfile and then at the very least run cucumber to trigger creation of the containers.

You can use/reference the development/test chef-repo I built here: https://github.com/zpatten/cc-chef-repo

bigmyx commented 11 years ago

Thanks guys, Not sure what I miss here, but when I run

cucumber
I get this error:

uninitialized constant MiniTest::Chef (NameError)
/Users/mic/dev/chef/cookbooks/chef-client/files/default/tests/minitest/support/helpers.rb:19:in `'
/Users/mic/dev/chef/cookbooks/chef-client/files/default/tests/minitest/support/helpers.rb:18:in `'
/Users/mic/dev/chef/cookbooks/chef-client/files/default/tests/minitest/support/helpers.rb:17:in `'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-1.2.3/lib/cucumber/rb_support/rb_language.rb:137:in `load'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-1.2.3/lib/cucumber/rb_support/rb_language.rb:137:in `load_code_file'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-1.2.3/lib/cucumber/runtime/support_code.rb:180:in `load_file'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-1.2.3/lib/cucumber/runtime/support_code.rb:83:in `block in load_files!'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-1.2.3/lib/cucumber/runtime/support_code.rb:82:in `each'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-1.2.3/lib/cucumber/runtime/support_code.rb:82:in `load_files!'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-1.2.3/lib/cucumber/runtime.rb:182:in `load_step_definitions'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-1.2.3/lib/cucumber/runtime.rb:41:in `run!'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-1.2.3/lib/cucumber/cli/main.rb:43:in `execute!'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-1.2.3/lib/cucumber/cli/main.rb:20:in `execute'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-1.2.3/bin/cucumber:14:in `'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/bin/cucumber:19:in `load'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/bin/cucumber:19:in `
' /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/bin/ruby_noexec_wrapper:14:in `eval' /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/bin/ruby_noexec_wrapper:14:in `
'

Thanks again !

zpatten commented 11 years ago

That looks like cucumber is picking up the mini-test bits and exploding on them. I'm thinking you need to setup a cucumber.yml in your chef-repo to have cucumber ignore them, something like this: https://github.com/zpatten/cc-chef-repo/blob/master/cucumber.yml

bigmyx commented 11 years ago

Yes, this is worked and I got a step forward :) I have the cucmber.yml file where I excluded all the interfering directories. Now I create the example tests by running

cucumber-chef create chef_test
Right after I run cucumber and cross my fingers, than it fails with:

cucumber                     
Using the default profile...
Code:
  * features/support/env.rb
  * features/support/cc-hooks.rb
>>> cucumber-chef v3.0.0.rc.5
>>> Creating container 'base-server-test' exit_code=1 (ZTK::SSHError)
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/ztk-1.0.8/lib/ztk/base.rb:90:in `log_and_raise'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/ztk-1.0.8/lib/ztk/base.rb:129:in `log_and_raise'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/ztk-1.0.8/lib/ztk/ssh.rb:302:in `exec'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-3.0.0.rc.5/lib/cucumber/chef/containers.rb:68:in `block (2 levels) in create'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/ztk-1.0.8/lib/ztk/rescue_retry.rb:132:in `call'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/ztk-1.0.8/lib/ztk/rescue_retry.rb:132:in `try'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-3.0.0.rc.5/lib/cucumber/chef/containers.rb:67:in `block in create'
/Users/mic/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-3.0.0.rc.5/lib/cucumber/chef/containers.rb:66:in `create'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-3.0.0.rc.5/lib/cucumber/chef/client.rb:98:in `block (2 levels) in up'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/ztk-1.0.8/lib/ztk/benchmark.rb:107:in `block (2 levels) in bench'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/ztk-1.0.8/lib/ztk/spinner.rb:76:in `spin'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/ztk-1.0.8/lib/ztk/benchmark.rb:106:in `block in bench'
/Users/mic/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/ztk-1.0.8/lib/ztk/benchmark.rb:103:in `bench'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-3.0.0.rc.5/lib/cucumber/chef/client.rb:97:in `block in up'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-3.0.0.rc.5/lib/cucumber/chef/client.rb:96:in `each'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-3.0.0.rc.5/lib/cucumber/chef/client.rb:96:in `up'
/Users/mic/dev/chef/features/support/cc-hooks.rb:22:in `'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-1.2.3/lib/cucumber/rb_support/rb_language.rb:137:in `load'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-1.2.3/lib/cucumber/rb_support/rb_language.rb:137:in `load_code_file'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-1.2.3/lib/cucumber/runtime/support_code.rb:180:in `load_file'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-1.2.3/lib/cucumber/runtime/support_code.rb:83:in `block in load_files!'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-1.2.3/lib/cucumber/runtime/support_code.rb:82:in `each'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-1.2.3/lib/cucumber/runtime/support_code.rb:82:in `load_files!'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-1.2.3/lib/cucumber/runtime.rb:182:in `load_step_definitions'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-1.2.3/lib/cucumber/runtime.rb:41:in `run!'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-1.2.3/lib/cucumber/cli/main.rb:43:in `execute!'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-1.2.3/lib/cucumber/cli/main.rb:20:in `execute'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-1.2.3/bin/cucumber:14:in `'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/bin/cucumber:19:in `load'
/Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/bin/cucumber:19:in `
' /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/bin/ruby_noexec_wrapper:14:in `eval' /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/bin/ruby_noexec_wrapper:14:in `
'

And here is the log file snippet:

========[ CLOSED ]========[ ubuntu@54.228.162.182:22 ]========[ CLOSED ]========
2013-04-07|11:53:21.706728|07919|DEBUG|                mic-mac:ssh.rb:285:block (2 levels) in exec|Channel closed.
2013-04-07|11:53:21.707062|07919|DEBUG|                                    mic-mac:ssh.rb:299:exec|exit_code=1
2013-04-07|11:53:21.707287|07919|FATAL|                                    mic-mac:ssh.rb:302:exec|EXCEPTION: ZTK::SSHError - "exit_code=1"
2013-04-07|11:53:21.707555|07919| WARN|                  mic-mac:rescue_retry.rb:135:rescue in try|Caught #, we will give it 1 more try.
2013-04-07|11:53:22.708641|07919|DEBUG|                                    mic-mac:ssh.rb:211:exec|config={:exit_code=>0, :silence=>true, :ui=>#>, @stderr=#>, @stdin=#>, @logger=#>, :forward_agent=>true, :compression=>false, :user_known_hosts_file=>"/dev/null", :timeout=>1800, :ignore_exit_status=>false, :request_pty=>true, :host_name=>"54.228.162.182", :port=>22, :user=>"ubuntu", :keys=>"/Users/mic/.cucumber-chef/aws/id_rsa-ubuntu"}
2013-04-07|11:53:22.708875|07919|DEBUG|                                    mic-mac:ssh.rb:212:exec|options={:exit_code=>0, :silence=>true, :ui=>#>, @stderr=#>, @stdin=#>, @logger=#>, :forward_agent=>true, :compression=>false, :user_known_hosts_file=>"/dev/null", :timeout=>1800, :ignore_exit_status=>false, :request_pty=>true, :host_name=>"54.228.162.182", :port=>22, :user=>"ubuntu", :keys=>"/Users/mic/.cucumber-chef/aws/id_rsa-ubuntu"}
2013-04-07|11:53:22.709011|07919| INFO|                                    mic-mac:ssh.rb:213:exec|exec("host base-server-test")
2013-04-07|11:53:22.709494|07919|DEBUG|                            mic-mac:rescue_retry.rb:127:try|options={:ui=>#>, @stderr=#>, @stdin=#>, @logger=#>, :tries=>3, :on=>EOFError, :delay=>1}
2013-04-07|11:53:22.709747|07919|DEBUG|                             mic-mac:ssh.rb:456:ssh_options|ssh_options({:timeout=>1800, :forward_agent=>true, :host_name=>"54.228.162.182", :keys=>"/Users/mic/.cucumber-chef/aws/id_rsa-ubuntu", :port=>22, :user=>"ubuntu", :user_known_hosts_file=>"/dev/null"})
2013-04-07|11:53:24.119955|07919|DEBUG|                mic-mac:ssh.rb:227:block (3 levels) in exec|Channel opened.
========[ COMMAND ]========[ ubuntu@54.228.162.182:22 ]========[ COMMAND ]========
host base-server-test
========[ OPENED ]========[ ubuntu@54.228.162.182:22 ]========[ OPENED ]========
2013-04-07|11:53:24.214189|07919|DEBUG|                mic-mac:ssh.rb:231:block (4 levels) in exec|PTY obtained.
========[ STDOUT ]========[ ubuntu@54.228.162.182:22 ]========[ STDOUT ]========
Host base-server-test not found: 3(NXDOMAIN)
========[ CLOSED ]========[ ubuntu@54.228.162.182:22 ]========[ CLOSED ]========
2013-04-07|11:53:24.226911|07919|DEBUG|                mic-mac:ssh.rb:285:block (2 levels) in exec|Channel closed.
2013-04-07|11:53:24.227042|07919|DEBUG|                                    mic-mac:ssh.rb:299:exec|exit_code=1
2013-04-07|11:53:24.227164|07919|FATAL|                                    mic-mac:ssh.rb:302:exec|EXCEPTION: ZTK::SSHError - "exit_code=1"
2013-04-07|11:53:24.227325|07919|FATAL|                  mic-mac:rescue_retry.rb:139:rescue in try|Caught # and we have no more tries left, sorry, we have to give up now.

I have tried to destroy and create the containers, but it gave the same result. Thanks again !

zpatten commented 11 years ago

I've release 3.x now; recreate your test lab with that and let me know if you hit any issues

bigmyx commented 11 years ago

I have installed the 3.0.3 release. Now whenever I invoke the command I get "wrong number of arguments (1 for 0)"

$ cucumber-chef setup        
cucumber-chef v3.0.3
Creating AWS instance completed in 33.4339 seconds.
Uploading embedded chef-repo /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-3.0.3/lib/cucumber/chef/providers/aws.rb:191:in `ip': wrong number of arguments (1 for 0) (ArgumentError)
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-3.0.3/lib/cucumber/chef/provider.rb:86:in `method_missing'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-3.0.3/lib/cucumber/chef/provider.rb:75:in `ip'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-3.0.3/lib/cucumber/chef/test_lab.rb:108:in `method_missing'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-3.0.3/lib/cucumber/chef/test_lab.rb:45:in `bootstrap_ssh'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-3.0.3/lib/cucumber/chef/provisioner.rb:74:in `block in upload_chef_repo'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/ztk-1.0.9/lib/ztk/benchmark.rb:107:in `block (2 levels) in bench'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/ztk-1.0.9/lib/ztk/spinner.rb:76:in `spin'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/ztk-1.0.9/lib/ztk/benchmark.rb:106:in `block in bench'
    from /Users/mic/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/ztk-1.0.9/lib/ztk/benchmark.rb:103:in `bench'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-3.0.3/lib/cucumber/chef/provisioner.rb:61:in `upload_chef_repo'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-3.0.3/lib/cucumber/chef/provisioner.rb:45:in `build'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-3.0.3/bin/cucumber-chef:94:in `setup'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/gems/cucumber-chef-3.0.3/bin/cucumber-chef:545:in `'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/bin/cucumber-chef:19:in `load'
    from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/bin/cucumber-chef:19:in `
' from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/bin/ruby_noexec_wrapper:14:in `eval' from /Users/mic/.rvm/gems/ruby-1.9.3-p194@cucumber-chef/bin/ruby_noexec_wrapper:14:in `
'
$ cucumber-chef destroy
cucumber-chef v3.0.3
wrong number of arguments (1 for 0)
zpatten commented 11 years ago

This looks like you do not have a Labfile.

zpatten commented 11 years ago

If you do have a Labfile can you show me the contents please?

It should be similar to: https://github.com/zpatten/cc-chef-repo/blob/master/Labfile

zpatten commented 11 years ago

Also; v3.0.4 has been released now.

bigmyx commented 11 years ago

Have updated to 3.0.5, moved the Labfile to the current chef directory, still same ... Should I update any other gems beside cucumber-chef gem ?

On Apr 9, 2013, at 1:39 AM, Zachary Patten notifications@github.com wrote:

Also; v3.0.4 has been released now.

— Reply to this email directly or view it on GitHub.

bigmyx commented 11 years ago

I have Labfile in my home dir and it looks like this :

https://gist.github.com/bigmyx/5343906

On Apr 9, 2013, at 12:13 AM, Zachary Patten notifications@github.com wrote:

If you do have a Labfile can you show me the contents please?

It should be similar to: https://github.com/zpatten/cc-chef-repo/blob/master/Labfile

— Reply to this email directly or view it on GitHub.

zpatten commented 11 years ago

You have a container that is being assigned an IP address that is both internet routable (which is a no-no) and not in the test lab network (192.168/16).

https://gist.github.com/bigmyx/5343906#file-gistfile1-rb-L10

bigmyx commented 11 years ago

hmmm.. not sure it's related.

I have now the whole new setup with ruby gemset + chef-repo from scratch. I re-created the Labfile from the gist you sent me earlier.

Still it fails with the argument error for 'ip' :

Uploading embedded chef-repo /Users/mic/.rvm/gems/ruby-1.9.3-p194@chef-trials/gems/cucumber-chef-3.0.5/lib/cucumber/chef/providers/aws.rb:191:in `ip': wrong number of arguments (1 for 0) (ArgumentError) ..

Full exception here: https://gist.github.com/bigmyx/5361744 Log file here : https://gist.github.com/bigmyx/5361753 Labfile here : https://gist.github.com/bigmyx/5361757 Config.rb here : https://gist.github.com/bigmyx/5361778

Let me know if you need more details.

Thanks !

On Apr 10, 2013, at 8:15 PM, Zachary Patten notifications@github.com wrote:

You have a container that is being assigned an IP address that is both internet routable (which is a no-no) and not in the test lab network (192.168/16).

https://gist.github.com/bigmyx/5343906#file-gistfile1-rb-L10

— Reply to this email directly or view it on GitHub.

zpatten commented 11 years ago

@bigmyx Awesome, thanks for the additional info; I'll dive into this over the weekend and see what I can find.

zpatten commented 11 years ago

Looks like this was a screw up on my part; for some reason I was using super in the provider proxy class for the ip and port methods, when they should of been proxing to the @provider instance variable. I'll commit the fix shortly and have a new release of the gem up right after.

zpatten commented 11 years ago

OK I've released v3.0.6 of the gem; this issue should now be resolved; please let me know.

zpatten commented 11 years ago

This appears be resolved in the latest gem release (as verified in the above linked issue); please feel free to reopen this if you are still encountering this issue.

bigmyx commented 11 years ago

Thank's a lot!

The argument's problem solved indeed. Now it stacks on the bootstrap stage. This is /var/log/chef/chef-solo.log from the EC2 lab instance:

2013-04-14T10:51:04+00:00] DEBUG: Re-raising exception: RuntimeError - Could not locate chef-server package matching version 'latest' for node.
/tmp/chef-solo/cookbooks/chef-server/recipes/default.rb:29:in `from_file'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/mixin/from_file.rb:30:in `instance_eval'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/mixin/from_file.rb:30:in `from_file'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/cookbook_version.rb:346:in `load_recipe'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/run_context.rb:151:in `load_recipe'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/run_context/cookbook_compiler.rb:139:in `block in compile_recipes'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/run_context/cookbook_compiler.rb:137:in `each'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/run_context/cookbook_compiler.rb:137:in `compile_recipes'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/run_context/cookbook_compiler.rb:74:in `compile'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/run_context.rb:86:in `load'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/client.rb:224:in `setup_run_context'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/client.rb:467:in `do_run'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/client.rb:200:in `run'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/application.rb:190:in `run_chef_client'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/application/solo.rb:239:in `block in run_application'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/application/solo.rb:231:in `loop'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/application/solo.rb:231:in `run_application'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/application.rb:73:in `run'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/bin/chef-solo:25:in `'
  /usr/bin/chef-solo:23:in `load'
  /usr/bin/chef-solo:23:in `
'

On Apr 14, 2013, at 12:53 AM, Zachary Patten notifications@github.com wrote:

This appears be resolved in the latest gem release (as verified in the above linked issue); please feel free to reopen this if you are still encountering this issue.

— Reply to this email directly or view it on GitHub.

zpatten commented 11 years ago

See Also: https://github.com/Atalanta/cucumber-chef/issues/119#issuecomment-16327576

This is prolly because Opscode's web server aborted during the deb download (this seems to happen once in a blue moon for me, if I'm right as to the casue then you would be the 3nd person, including me, to have encountered this issue);

Unfortunately without being able to see your full log output I can't say for sure.

Try re-running the setup task; if that fails in the same spot; destroy then setup again. If you still have failure at that point please gist me the entire log.

bigmyx commented 11 years ago

tried several times. here is the relevant log snippet : https://gist.github.com/bigmyx/5387851

thanks !

On Apr 14, 2013, at 9:49 PM, Zachary Patten notifications@github.com wrote:

119

This is prolly because Opscode's web server aborted during the deb download (this seems to happen once in a blue moon for me, if I'm right as to the casue then you would be the 3nd person, including me, to have encountered this issue);

Unfortunately without being able to see your full log output I can't say for sure.

Try re-running the setup task; if that fails in the same spot; destroy then setup again. If you still have failure at that point please gist me the entire log.

— Reply to this email directly or view it on GitHub.

zpatten commented 11 years ago

Gist me the entire log please; generally the relevant section is a few pages above the actual error.

bigmyx commented 11 years ago

https://gist.github.com/bigmyx/5391738

zpatten commented 11 years ago

That's very odd; try setting to a specific chef-server version in the cucumber-chef <chef-repo>/.cucumber-chef/config.rb like:

chef.merge!(:version => "11.0.6")

I just tested on the vagrant provider and no issue with it using the latest setting. This could be some AWS-specific issue possibly.

+ bash install.sh -v latest
Downloading Chef latest for ubuntu...
Installing Chef latest
Selecting previously unselected package chef.
(Reading database ... 52493 files and directories currently installed.)
Unpacking chef (from .../chef_latest_amd64.deb) ...
Setting up chef (11.4.0-1.ubuntu.11.04) ...
Thank you for installing Chef!
+ mkdir -pv /var/chef/cache /tmp/chef-solo/cookbooks/chef-server
mkdir: created directory `/var/chef'
mkdir: created directory `/var/chef/cache'
mkdir: created directory `/tmp/chef-solo/cookbooks/chef-server'
+ tar xvzC /tmp/chef-solo/cookbooks/chef-server --strip-components=1
+ wget -qO- https://github.com/opscode-cookbooks/chef-server/archive/master.tar.gz
chef-server-master/.gitignore
chef-server-master/Berksfile
chef-server-master/CHANGELOG.md
chef-server-master/CONTRIBUTING.md
chef-server-master/Gemfile
chef-server-master/LICENSE
chef-server-master/README.md
chef-server-master/Thorfile
chef-server-master/Vagrantfile
chef-server-master/attributes/
chef-server-master/attributes/default.rb
chef-server-master/chefignore
chef-server-master/libraries/
chef-server-master/libraries/dev_helper.rb
chef-server-master/libraries/omnitruck_client.rb
chef-server-master/metadata.rb
chef-server-master/recipes/
chef-server-master/recipes/default.rb
chef-server-master/recipes/dev.rb
chef-server-master/templates/
chef-server-master/templates/default/
chef-server-master/templates/default/chef-server.rb.erb
+ chef-solo --config /etc/chef/solo.rb --json-attributes /tmp/chef-solo/attributes.json --logfile /var/log/chef/chef-solo.log --log_level debug
Starting Chef Client, version 11.4.0
Compiling Cookbooks...
Converging 61 resources
Recipe: chef-server::default
  * remote_file[/tmp/chef-solo//chef-server_11.0.6-1.ubuntu.12.04_amd64.deb] action create
    - copy file downloaded from [] into /tmp/chef-solo//chef-server_11.0.6-1.ubuntu.12.04_amd64.deb
        (file sizes exceed 10000000 bytes, diff output suppressed)

  * package[chef-server_11.0.6-1.ubuntu.12.04_amd64.deb] action install
    - install version 11.0.6-1.ubuntu.12.04 of package chef-server_11.0.6-1.ubuntu.12.04_amd64.deb
zpatten commented 11 years ago

I should note all providers use the exact same bootstrap script.

bigmyx commented 11 years ago

Ok, I am trying to kickoff the Vagrant test env. and I get the error from a Vagrant cucumber-chef is trying to invoke this command:

vagrant up test-lab-mic
And the error is:

The machine with the name 'test-lab-mic' was not found configured for
this Vagrant environment.

I am not sure where I have put this name... The

vagrant up
alone works file. This is my Vagrant file:

Vagrant::Config.run do |config|
  # Precise 32-bit
  # config.vm.box = "precise32"
  # config.vm.box_url = "http://files.vagrantup.om/precise32.box"

  # Precise 64-bit
  config.vm.box = "precise64"
  config.vm.box_url = "http://files.vagrantup.com/precise64.box"

  config.vm.forward_port 4000, 4000
  config.vm.forward_port 4040, 4040
  config.vm.forward_port 8787, 8787

end

And this is my .cucumber-chef/config.rb:

provider        :vagrant
vagrant.merge!( :identity_file => "#{ENV['HOME']}/.vagrant.d/insecure_private_key",
                 :ssh => {
                     :lab_ip => "192.168.0.100",
                     :lab_port => 22,
                     :lxc_port => 22
                 },
                 :cpus => 4,
                 :memory => 2048 )
zpatten commented 11 years ago

Sorry the Vagrantfile was changed slightly. If you delete your Vagrantfile and run the setup task it will auto-generate you a new one; or you can just modify your current one to look like:

# -*- mode: ruby -*-
# vi: set ft=ruby :
#
# Auto-generated by cucumber-chef v#{Cucumber::Chef::VERSION} on #{Time.now.utc} -- DO NOT EDIT!

# Vagrant v1 Configuration
###########################
Vagrant::Config.run do |config|
  config.vm.define "test-lab-#{ENV['USER']}".downcase do |test_lab|
    test_lab.vm.box = "precise64"
    test_lab.vm.box_url = "http://files.vagrantup.com/precise64.box"
    test_lab.vm.network :hostonly, "192.168.33.10"

    test_lab.vm.customize ["modifyvm", :id, "--cpus", 4]
    test_lab.vm.customize ["modifyvm", :id, "--memory", 4096]
  end
end

# Vagrant v2 Configuration
###########################
Vagrant.configure("2") do |config|
  config.vm.define "test-lab-#{ENV['USER']}".downcase do |test_lab|
    test_lab.vm.box = "precise64"
    test_lab.vm.box_url = "http://files.vagrantup.com/precise64.box"
    test_lab.vm.network :private_network, :ip => "192.168.33.10"

    test_lab.vm.provider :virtualbox do |vb|
      vb.customize ["modifyvm", :id, "--cpus", 4]
      vb.customize ["modifyvm", :id, "--memory", 4096]
    end
  end
end
zpatten commented 11 years ago

Be sure to adjust the cpu count and memory settings!

bigmyx commented 11 years ago

The setup task is no working fine ! Will continue from here ...

On Apr 17, 2013, at 8:40 PM, Zachary Patten notifications@github.com wrote:

Be sure to adjust the cpu count and memory settings!

— Reply to this email directly or view it on GitHub.

bigmyx commented 11 years ago

just a quick question : do you know why its asking the password upon the container start ?

>>> cucumber-chef v3.0.8
>>> Pushing chef-repo environments to the test lab completed in 1.5189 seconds.
>>> Pushing chef-repo cookbooks to the test lab completed in 2.8272 seconds.
>>> Pushing chef-repo roles to the test lab completed in 1.1113 seconds.
>>> Creating container 'test1-app-1' Password: 
Password: -
Password: -

Log:

| INFO|                                    mic-mac:ssh.rb:214:exec|exec("uptime")
| WARN|                  mic-mac:rescue_retry.rb:135:rescue in try|Caught #, we will give it 31 more tries.
| INFO|                                    mic-mac:ssh.rb:214:exec|exec("uptime")
| WARN|                  mic-mac:rescue_retry.rb:135:rescue in try|Caught #, we will give it 30 more tries.
| INFO|                                    mic-mac:ssh.rb:214:exec|exec("uptime")
zpatten commented 11 years ago

Looks like the container did not get created properly. The real error is likely further back in your logs. Please gist me the full log from a failed run, as in:

cd <chef-repo>
truncate --size=0 .cucumber-chef/cucumber-chef.log
bin/cucumber

Gist me the entire log; it should only contain the latest run at this point.

bigmyx commented 11 years ago

Here: https://gist.github.com/bigmyx/5418216

On Apr 19, 2013, at 2:41 AM, Zachary Patten notifications@github.com wrote:

Looks like the container did not get created properly. The real error is likely further back in your logs. Please gist me the full log from a failed run, as in:

cd truncate --size=0 .cucumber-chef/cucumber-chef.log bin/cucumber Gist me the entire log; it should only container the latest run at this point.

— Reply to this email directly or view it on GitHub.

zpatten commented 11 years ago

That is not the entire log.

bigmyx commented 11 years ago

Sorry, if so .. I have created it again : https://gist.github.com/bigmyx/5418216

I have run the cucumber command w/o re-creating the lab.

On Apr 19, 2013, at 11:45 PM, Zachary Patten notifications@github.com wrote:

That is not the entire log.

— Reply to this email directly or view it on GitHub.

zpatten commented 11 years ago

TY; at first glance looks like everything is OK; let me do some more direct comparison with a local run and I'll let you know what I find.