我想用test-kitchen用java和hadoop cookbook部署ubuntu。我在测试厨房安装了1套房。
我在厨房配置文件中放入另一个套件,现在厨房坏了。
我把更改解压缩到我的厨房配置文件,但厨房仍然坏了。
我做的时候
kitchen list
我收到以下错误
/home/anupam/.rvm/gems/ruby-2.0.0-p451@chef/gems/test-kitchen-1.2.1/lib/kitchen/instance.rb:209:in `last_action': undefined method `[]' for false:FalseClass (NoMethodError)
from /home/anupam/.rvm/gems/ruby-2.0.0-p451@chef/gems/test-kitchen-1.2.1/lib/kitchen/command/list.rb:53:in `display_instance'
from /home/anupam/.rvm/gems/ruby-2.0.0-p451@chef/gems/test-kitchen-1.2.1/lib/kitchen/command/list.rb:73:in `block in list_table'
from /home/anupam/.rvm/gems/ruby-2.0.0-p451@chef/gems/test-kitchen-1.2.1/lib/kitchen/command/list.rb:73:in `map'
from /home/anupam/.rvm/gems/ruby-2.0.0-p451@chef/gems/test-kitchen-1.2.1/lib/kitchen/command/list.rb:73:in `list_table'
from /home/anupam/.rvm/gems/ruby-2.0.0-p451@chef/gems/test-kitchen-1.2.1/lib/kitchen/command/list.rb:38:in `call'
from /home/anupam/.rvm/gems/ruby-2.0.0-p451@chef/gems/test-kitchen-1.2.1/lib/kitchen/cli.rb:47:in `perform'
from /home/anupam/.rvm/gems/ruby-2.0.0-p451@chef/gems/test-kitchen-1.2.1/lib/kitchen/cli.rb:81:in `list'
from /home/anupam/.rvm/gems/ruby-2.0.0-p451@chef/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
from /home/anupam/.rvm/gems/ruby-2.0.0-p451@chef/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
from /home/anupam/.rvm/gems/ruby-2.0.0-p451@chef/gems/test-kitchen-1.2.1/lib/kitchen/cli.rb:233:in `invoke_task'
from /home/anupam/.rvm/gems/ruby-2.0.0-p451@chef/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
from /home/anupam/.rvm/gems/ruby-2.0.0-p451@chef/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
from /home/anupam/.rvm/gems/ruby-2.0.0-p451@chef/gems/test-kitchen-1.2.1/bin/kitchen:13:in `block in <top (required)>'
from /home/anupam/.rvm/gems/ruby-2.0.0-p451@chef/gems/test-kitchen-1.2.1/lib/kitchen/errors.rb:81:in `with_friendly_errors'
from /home/anupam/.rvm/gems/ruby-2.0.0-p451@chef/gems/test-kitchen-1.2.1/bin/kitchen:13:in `<top (required)>'
from /home/anupam/.rvm/gems/ruby-2.0.0-p451@chef/bin/kitchen:23:in `load'
from /home/anupam/.rvm/gems/ruby-2.0.0-p451@chef/bin/kitchen:23:in `<main>'
from /home/anupam/.rvm/gems/ruby-2.0.0-p451@chef/bin/ruby_executable_hooks:15:in `eval'
from /home/anupam/.rvm/gems/ruby-2.0.0-p451@chef/bin/ruby_executable_hooks:15:in `<main>'
而且我不知道错误信息是什么。
当我尝试创建/ destroy / converge / login时,我得到类似的错误消息。
driver:
name: vagrant
provisioner:
name: chef_solo
platforms:
- name: ubuntu-12.04
driver_config:
network:
- ["private_network", {ip: "192.168.56.103"}]
customize:
memory: 512
# - name: centos-6.4
# - name: centos-6.4-i386
# # driver_config:
# # network:
# # - ["private_network", {ip: "192.168.56.103"}]
# # customize:
# # memory: 512
# - name: fedora-20-i386
suites:
- name: default
run_list:
- recipe[odin-solr::default]
attributes:
# - name: default-2
# run_list:
# - recipe[odin-solr::default]
# attributes:
答案 0 :(得分:4)
您的评论中有一个未完成的YAML键:
# <snip>
suites:
- name: default
run_list:
- recipe[odin-solr::default]
attributes: # <== here
# - name: default-2
# run_list:
# - recipe[odin-solr::default]
# attributes:
答案 1 :(得分:2)
此错误源于错误YAML上的kitchen list
窒息。它可能发生在.kitchen.yml
或.kitchen/*.yml
文件中(用于存储.kitchen文件中VM的状态)。可能的修复:
确保您没有任何悬挂式哈希键,例如以下任何一个位置
run_list:
- recipe[thing::default]
attributes:
# having no keys here is invalid.
删除.kitchen/*.yml
个文件。再次运行kitchen list
将重建它们(无需重新配置计算机)