spacepaste

  1.  
  2. I, [2017-03-10T07:57:42.073991 #13903] INFO -- Kitchen: -----> Starting Kitchen (v1.16.0)
  3. I, [2017-03-10T07:57:42.105476 #13903] INFO -- Kitchen: -----> Cleaning up any prior instances of <default-ubuntu-1404>
  4. I, [2017-03-10T07:57:42.105982 #13903] INFO -- Kitchen: -----> Destroying <default-ubuntu-1404>...
  5. I, [2017-03-10T07:57:56.298491 #13903] INFO -- Kitchen: -----> Testing <default-ubuntu-1404>
  6. I, [2017-03-10T07:57:56.298592 #13903] INFO -- Kitchen: -----> Creating <default-ubuntu-1404>...
  7. I, [2017-03-10T07:58:02.490393 #13903] INFO -- Kitchen: -----> Converging <default-ubuntu-1404>...
  8. E, [2017-03-10T07:58:03.647094 #13903] ERROR -- Kitchen: ------Exception-------
  9. E, [2017-03-10T07:58:03.647135 #13903] ERROR -- Kitchen: Class: Kitchen::ActionFailed
  10. E, [2017-03-10T07:58:03.647165 #13903] ERROR -- Kitchen: Message: 1 actions failed.
  11. >>>>>> Converge failed on instance <default-ubuntu-1404>. Please see .kitchen/logs/default-ubuntu-1404.log for more details
  12. E, [2017-03-10T07:58:03.647179 #13903] ERROR -- Kitchen: ----------------------
  13. E, [2017-03-10T07:58:03.647187 #13903] ERROR -- Kitchen: ------Backtrace-------
  14. E, [2017-03-10T07:58:03.647195 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/command.rb:183:in `report_errors'
  15. E, [2017-03-10T07:58:03.647203 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/command.rb:174:in `run_action'
  16. E, [2017-03-10T07:58:03.647211 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/command/test.rb:42:in `block in call'
  17. E, [2017-03-10T07:58:03.647236 #13903] ERROR -- Kitchen: /usr/lib64/ruby/2.3.0/benchmark.rb:293:in `measure'
  18. E, [2017-03-10T07:58:03.647244 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/command/test.rb:38:in `call'
  19. E, [2017-03-10T07:58:03.647252 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/cli.rb:53:in `perform'
  20. E, [2017-03-10T07:58:03.647260 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/cli.rb:234:in `test'
  21. E, [2017-03-10T07:58:03.647268 #13903] ERROR -- Kitchen: /usr/lib64/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
  22. E, [2017-03-10T07:58:03.647310 #13903] ERROR -- Kitchen: /usr/lib64/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
  23. E, [2017-03-10T07:58:03.647336 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/cli.rb:334:in `invoke_task'
  24. E, [2017-03-10T07:58:03.647344 #13903] ERROR -- Kitchen: /usr/lib64/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
  25. E, [2017-03-10T07:58:03.647352 #13903] ERROR -- Kitchen: /usr/lib64/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
  26. E, [2017-03-10T07:58:03.647359 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/bin/kitchen:13:in `block in <top (required)>'
  27. E, [2017-03-10T07:58:03.647367 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/errors.rb:171:in `with_friendly_errors'
  28. E, [2017-03-10T07:58:03.647375 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/bin/kitchen:13:in `<top (required)>'
  29. E, [2017-03-10T07:58:03.647382 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/bin/kitchen:22:in `load'
  30. E, [2017-03-10T07:58:03.647390 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/bin/kitchen:22:in `<main>'
  31. E, [2017-03-10T07:58:03.647397 #13903] ERROR -- Kitchen: ----End Backtrace-----
  32. E, [2017-03-10T07:58:03.647405 #13903] ERROR -- Kitchen: -Composite Exception--
  33. E, [2017-03-10T07:58:03.647412 #13903] ERROR -- Kitchen: Class: Kitchen::InstanceFailure
  34. E, [2017-03-10T07:58:03.647420 #13903] ERROR -- Kitchen: Message: Converge failed on instance <default-ubuntu-1404>. Please see .kitchen/logs/default-ubuntu-1404.log for more details
  35. E, [2017-03-10T07:58:03.647427 #13903] ERROR -- Kitchen: ----------------------
  36. E, [2017-03-10T07:58:03.647439 #13903] ERROR -- Kitchen: ------Backtrace-------
  37. E, [2017-03-10T07:58:03.647448 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/provisioner/base.rb:83:in `rescue in call'
  38. E, [2017-03-10T07:58:03.647455 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/provisioner/base.rb:86:in `call'
  39. E, [2017-03-10T07:58:03.647463 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/instance.rb:384:in `block in converge_action'
  40. E, [2017-03-10T07:58:03.647471 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/instance.rb:527:in `synchronize_or_call'
  41. E, [2017-03-10T07:58:03.647478 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/instance.rb:489:in `block in action'
  42. E, [2017-03-10T07:58:03.647504 #13903] ERROR -- Kitchen: /usr/lib64/ruby/2.3.0/benchmark.rb:293:in `measure'
  43. E, [2017-03-10T07:58:03.647512 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/instance.rb:488:in `action'
  44. E, [2017-03-10T07:58:03.647519 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/instance.rb:380:in `converge_action'
  45. E, [2017-03-10T07:58:03.647528 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/instance.rb:359:in `block in transition_to'
  46. E, [2017-03-10T07:58:03.647536 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/instance.rb:358:in `each'
  47. E, [2017-03-10T07:58:03.647543 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/instance.rb:358:in `transition_to'
  48. E, [2017-03-10T07:58:03.647551 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/instance.rb:157:in `verify'
  49. E, [2017-03-10T07:58:03.647559 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/instance.rb:186:in `block in test'
  50. E, [2017-03-10T07:58:03.647566 #13903] ERROR -- Kitchen: /usr/lib64/ruby/2.3.0/benchmark.rb:293:in `measure'
  51. E, [2017-03-10T07:58:03.647573 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/instance.rb:182:in `test'
  52. E, [2017-03-10T07:58:03.647601 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/command.rb:197:in `public_send'
  53. E, [2017-03-10T07:58:03.647631 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/command.rb:197:in `run_action_in_thread'
  54. E, [2017-03-10T07:58:03.647638 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/command.rb:169:in `block (2 levels) in run_action'
  55. E, [2017-03-10T07:58:03.647647 #13903] ERROR -- Kitchen: ----End Backtrace-----
  56. E, [2017-03-10T07:58:03.647659 #13903] ERROR -- Kitchen: ---Nested Exception---
  57. E, [2017-03-10T07:58:03.647673 #13903] ERROR -- Kitchen: Class: Kitchen::ActionFailed
  58. E, [2017-03-10T07:58:03.647686 #13903] ERROR -- Kitchen: Message: SSH exited (2) for command: [
  59. sh -c '
  60. # Check whether a command exists - returns 0 if it does, 1 if it does not
  61. exists() {
  62. if command -v $1 >/dev/null 2>&1
  63. then
  64. return 0
  65. else
  66. return 1
  67. fi
  68. }
  69. # do_wget URL FILENAME
  70. do_wget() {
  71. echo "trying wget..."
  72. wget -O "$2" "$1" 2>/tmp/stderr
  73. # check for bad return status
  74. test $? -ne 0 && return 1
  75. # check for 404 or empty file
  76. grep "ERROR 404" /tmp/stderr 2>&1 >/dev/null
  77. if test $? -eq 0 || test ! -s "$2"; then
  78. return 1
  79. fi
  80. return 0
  81. }
  82. # do_curl URL FILENAME
  83. do_curl() {
  84. echo "trying curl..."
  85. curl -L "$1" > "$2"
  86. # check for bad return status
  87. [ $? -ne 0 ] && return 1
  88. # check for bad output or empty file
  89. grep "The specified key does not exist." "$2" 2>&1 >/dev/null
  90. if test $? -eq 0 || test ! -s "$2"; then
  91. return 1
  92. fi
  93. return 0
  94. }
  95. # do_fetch URL FILENAME
  96. do_fetch() {
  97. echo "trying fetch..."
  98. fetch -o "$2" "$1" 2>/tmp/stderr
  99. # check for bad return status
  100. test $? -ne 0 && return 1
  101. return 0
  102. }
  103. # do_perl URL FILENAME
  104. do_perl() {
  105. echo "trying perl..."
  106. perl -e "use LWP::Simple; getprint($ARGV[0]);" "$1" > "$2"
  107. # check for bad return status
  108. test $? -ne 0 && return 1
  109. # check for bad output or empty file
  110. # grep "The specified key does not exist." "$2" 2>&1 >/dev/null
  111. # if test $? -eq 0 || test ! -s "$2"; then
  112. # unable_to_retrieve_package
  113. # fi
  114. return 0
  115. }
  116. # do_python URL FILENAME
  117. do_python() {
  118. echo "trying python..."
  119. python -c "import sys,urllib2 ; sys.stdout.write(urllib2.urlopen(sys.argv[1]).read())" "$1" > "$2"
  120. # check for bad return status
  121. test $? -ne 0 && return 1
  122. # check for bad output or empty file
  123. #grep "The specified key does not exist." "$2" 2>&1 >/dev/null
  124. #if test $? -eq 0 || test ! -s "$2"; then
  125. # unable_to_retrieve_package
  126. #fi
  127. return 0
  128. }
  129. # do_download URL FILENAME
  130. do_download() {
  131. PATH=/opt/local/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
  132. export PATH
  133. echo "downloading $1"
  134. echo " to file $2"
  135. # we try all of these until we get success.
  136. # perl, in particular may be present but LWP::Simple may not be installed
  137. if exists wget; then
  138. do_wget $1 $2 && return 0
  139. fi
  140. if exists curl; then
  141. do_curl $1 $2 && return 0
  142. fi
  143. if exists fetch; then
  144. do_fetch $1 $2 && return 0
  145. fi
  146. if exists perl; then
  147. do_perl $1 $2 && return 0
  148. fi
  149. if exists python; then
  150. do_python $1 $2 && return 0
  151. fi
  152. echo ">>>>>> wget, curl, fetch, perl or python not found on this instance."
  153. return 16
  154. }
  155. # what version of salt is installed?
  156. SALT_VERSION=`salt-call --version | cut -d " " -f 2`
  157. set +x
  158. if [ -z "${SALT_VERSION}" -a "bootstrap" = "bootstrap" ]
  159. then
  160. do_download https://bootstrap.saltstack.org /tmp/bootstrap-salt.sh
  161. sudo -E sh /tmp/bootstrap-salt.sh
  162. elif [ -z "${SALT_VERSION}" -a "bootstrap" = "apt" ]
  163. then
  164. if [ ! $(command -v lsb_release &>/dev/null) ]; then
  165. . /etc/lsb-release
  166. else
  167. DISTRIB_CODENAME=$(lsb_release -s -c)
  168. fi
  169. echo "-----> Configuring apt repo for salt latest"
  170. echo "deb https://repo.saltstack.com/apt/ubuntu/16.04/amd64/latest/latest ${DISTRIB_CODENAME} main" | sudo -E tee /etc/apt/sources.list.d/salt-latest.list
  171. do_download https://repo.saltstack.com/apt/ubuntu/16.04/amd64/latest/SALTSTACK-GPG-KEY.pub /tmp/repo.key
  172. sudo -E apt-key add /tmp/repo.key
  173. sudo -E apt-get update
  174. sleep 10
  175. echo "-----> Installing salt-minion (latest)"
  176. sudo -E apt-get install -y python-support
  177. sudo -E apt-get install -y salt-minion salt-common
  178. elif [ -z "${SALT_VERSION}" -a "bootstrap" = "ppa" ]
  179. then
  180. sudo -E apt-add-repository -y ppa:saltstack/salt
  181. sudo -E apt-get update
  182. sudo -E apt-get install -y salt-minion salt-common
  183. fi
  184. # check again, now that an install of some form should have happened
  185. SALT_VERSION=`salt-call --version | cut -d " " -f 2`
  186. if [ -z "${SALT_VERSION}" ]
  187. then
  188. echo "No salt-minion installed, install must have failed!!"
  189. echo "salt_install = bootstrap"
  190. echo "salt_url = https://bootstrap.saltstack.org"
  191. echo "bootstrap_options = "
  192. echo "salt_version = latest"
  193. echo "salt_apt_repo = https://repo.saltstack.com/apt/ubuntu/16.04/amd64/latest"
  194. echo "salt_apt_repo_key = https://repo.saltstack.com/apt/ubuntu/16.04/amd64/latest/SALTSTACK-GPG-KEY.pub"
  195. echo "salt_ppa = ppa:saltstack/salt"
  196. exit 2
  197. elif [ "${SALT_VERSION}" = "latest" -o "latest" = "latest" ]
  198. then
  199. echo "You asked for latest and you have ${SALT_VERSION} installed, sweet!"
  200. elif [ ! -z "${SALT_VERSION}" -a "bootstrap" = "bootstrap" ]
  201. then
  202. echo "You asked for bootstrap install and you have got ${SALT_VERSION}, hope thats ok!"
  203. else
  204. echo "You asked for latest and you have got ${SALT_VERSION} installed, dunno how to fix that, sorry!"
  205. exit 2
  206. fi
  207. '
  208. ]
  209. E, [2017-03-10T07:58:03.647711 #13903] ERROR -- Kitchen: ----------------------
  210. E, [2017-03-10T07:58:03.647726 #13903] ERROR -- Kitchen: ------Backtrace-------
  211. E, [2017-03-10T07:58:03.647739 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/provisioner/base.rb:83:in `rescue in call'
  212. E, [2017-03-10T07:58:03.647755 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/provisioner/base.rb:86:in `call'
  213. E, [2017-03-10T07:58:03.647770 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/instance.rb:384:in `block in converge_action'
  214. E, [2017-03-10T07:58:03.647784 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/instance.rb:527:in `synchronize_or_call'
  215. E, [2017-03-10T07:58:03.647798 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/instance.rb:489:in `block in action'
  216. E, [2017-03-10T07:58:03.647811 #13903] ERROR -- Kitchen: /usr/lib64/ruby/2.3.0/benchmark.rb:293:in `measure'
  217. E, [2017-03-10T07:58:03.647825 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/instance.rb:488:in `action'
  218. E, [2017-03-10T07:58:03.647838 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/instance.rb:380:in `converge_action'
  219. E, [2017-03-10T07:58:03.647852 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/instance.rb:359:in `block in transition_to'
  220. E, [2017-03-10T07:58:03.647867 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/instance.rb:358:in `each'
  221. E, [2017-03-10T07:58:03.647881 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/instance.rb:358:in `transition_to'
  222. E, [2017-03-10T07:58:03.647895 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/instance.rb:157:in `verify'
  223. E, [2017-03-10T07:58:03.647925 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/instance.rb:186:in `block in test'
  224. E, [2017-03-10T07:58:03.647938 #13903] ERROR -- Kitchen: /usr/lib64/ruby/2.3.0/benchmark.rb:293:in `measure'
  225. E, [2017-03-10T07:58:03.647951 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/instance.rb:182:in `test'
  226. E, [2017-03-10T07:58:03.647965 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/command.rb:197:in `public_send'
  227. E, [2017-03-10T07:58:03.647979 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/command.rb:197:in `run_action_in_thread'
  228. E, [2017-03-10T07:58:03.647991 #13903] ERROR -- Kitchen: /home/alem0lars/.gem/ruby/2.3.0/gems/test-kitchen-1.16.0/lib/kitchen/command.rb:169:in `block (2 levels) in run_action'
  229. E, [2017-03-10T07:58:03.648006 #13903] ERROR -- Kitchen: ----End Backtrace-----
  230.