Chef infra Mac 10.7.2上Chef、Vagrant的资源调配失败

Chef infra Mac 10.7.2上Chef、Vagrant的资源调配失败,chef-infra,vagrant,Chef Infra,Vagrant,我刚刚开始使用“流浪者”和“厨师”,但我发现了一些我认为很奇怪的错误 有了一个简单的虚拟机,没有厨师,一切都很好,但当我在其中加入一些往复式时,一切都失败了 这是我当前的default.rb,用于从Vagrant文件调用的主配方。主要是因为这个 php apache2和mysql配方直接来自opscode社区站点 如果我只是把其中的一个食谱放进去,那么它就装得很好。 有时两个是好的,但是如果我把三个都放进去,那么最后一个似乎会导致错误。我改变了顺序,总是最后一个导致错误的。以下是错误-每次都是相

我刚刚开始使用“流浪者”和“厨师”,但我发现了一些我认为很奇怪的错误

有了一个简单的虚拟机,没有厨师,一切都很好,但当我在其中加入一些往复式时,一切都失败了

这是我当前的default.rb,用于从Vagrant文件调用的主配方。主要是因为这个

php apache2和mysql配方直接来自opscode社区站点

如果我只是把其中的一个食谱放进去,那么它就装得很好。 有时两个是好的,但是如果我把三个都放进去,那么最后一个似乎会导致错误。我改变了顺序,总是最后一个导致错误的。以下是错误-每次都是相同的,但在本例中,php是三个错误中的最后一个,您可以看到它无法安装:

[default] [Fri, 06 Jan 2012 10:01:33 -0800] INFO: Processing package[php5] action install (php::package line 32)
: stdout
[default] [Fri, 06 Jan 2012 10:04:52 -0800] ERROR: package[php5] (php::package line 32) has had an error
: stdout
[default] [Fri, 06 Jan 2012 10:04:52 -0800] ERROR: Running exception handlers
: stdout
[default] [Fri, 06 Jan 2012 10:04:52 -0800] ERROR: Exception handlers complete
: stdout
[default] /opt/ruby/lib/ruby/gems/1.8/gems/chef-0.10.2/bin/../lib/chef/file_cache.rb:54:in `initialize': stderr
[default] : : stderr
[default] Read-only file system - /tmp/vagrant-chef-1/chef-stacktrace.out: stderr
[default]  (: stderr
[default] Errno::EROFS: stderr
[default] )
: stderr
[default]   from /opt/ruby/lib/ruby/gems/1.8/gems/chef-0.10.2/bin/../lib/chef/file_cache.rb:54:in `open'
: stderr
[default]   from /opt/ruby/lib/ruby/gems/1.8/gems/chef-0.10.2/bin/../lib/chef/file_cache.rb:54:in `store'
: stderr
[default]   from /opt/ruby/lib/ruby/gems/1.8/gems/chef-0.10.2/bin/../lib/chef/application.rb:133:in `debug_stacktrace'
: stderr
[default]   from /opt/ruby/lib/ruby/gems/1.8/gems/chef-0.10.2/bin/../lib/chef/application/solo.rb:210:in `run_application'
: stderr
[default]   from /opt/ruby/lib/ruby/gems/1.8/gems/chef-0.10.2/bin/../lib/chef/application/solo.rb:183:in `loop'
: stderr
[default]   from /opt/ruby/lib/ruby/gems/1.8/gems/chef-0.10.2/bin/../lib/chef/application/solo.rb:183:in `run_application'
: stderr
[default]   from /opt/ruby/lib/ruby/gems/1.8/gems/chef-0.10.2/bin/../lib/chef/application.rb:66:in `run'
: stderr
[default]   from /opt/ruby/lib/ruby/gems/1.8/gems/chef-0.10.2/bin/chef-solo:25
    from /opt/ruby/bin/chef-solo:19:in `load'
    from /opt/ruby/bin/chef-solo:19
: stderr
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

chef-solo -c /tmp/vagrant-chef-1/solo.rb -j /tmp/vagrant-chef-1/dna.json

The output of the command prior to failing is outputted below:

[no output]
通常情况下,我会销毁虚拟机,并为每次新尝试执行“漫游”操作,但有几次我尝试了“漫游”重新加载和“漫游”供应,结果都是一样的


此外,我不知道这是否正常,但我的Mac在进行资源调配时几乎完全锁定。我通常可以同时运行2个或3个vmware虚拟机,而不会感觉到它在苦苦挣扎,因此让它完全锁定是。。。。奇怪

我有一个非常类似的错误,但似乎找到了解决方法

在尝试了很多东西(不同的基本盒、不同的VirtualBox版本、一次又一次的尝试)之后,我终于通过构建自己的Vagrant基本盒取得了进展。我按照Vagrant()和Chef()网站上的说明进行操作。虽然这需要一段时间,而且很棘手,但我现在对基本状态有了更好的信心,我也更开心了

我仍然不知道是什么导致了我们的问题。可能是VirtualBox guest additions版本不匹配,或者是lucid32或lucid64基本框中的损坏/不兼容


作为参考,我安装了Ubuntu服务器11.10,并从软件包中安装了Chef。如果有需求,我很乐意将我的(700mb)oneiric64基本图像上传到某个地方。

为响应干杯


原来我有一些依附宝石的旧版本。一旦我完成了gem更新,问题就消失了。

嗯,我也得到了这个。我已经升级了Chef gems(几个月前),但除了警告“此VM上的来宾添加与VirtualBox的安装版本不匹配!”之外,我还收到了这个错误。我确认了这个警告,对我也有效-我得到了
只读文件系统-/var/Chef/cache/Chef-stacktrace.out(Errno::EROFS)
错误,而
sudo gem update
让它们消失了。谢谢
[default] [Fri, 06 Jan 2012 10:01:33 -0800] INFO: Processing package[php5] action install (php::package line 32)
: stdout
[default] [Fri, 06 Jan 2012 10:04:52 -0800] ERROR: package[php5] (php::package line 32) has had an error
: stdout
[default] [Fri, 06 Jan 2012 10:04:52 -0800] ERROR: Running exception handlers
: stdout
[default] [Fri, 06 Jan 2012 10:04:52 -0800] ERROR: Exception handlers complete
: stdout
[default] /opt/ruby/lib/ruby/gems/1.8/gems/chef-0.10.2/bin/../lib/chef/file_cache.rb:54:in `initialize': stderr
[default] : : stderr
[default] Read-only file system - /tmp/vagrant-chef-1/chef-stacktrace.out: stderr
[default]  (: stderr
[default] Errno::EROFS: stderr
[default] )
: stderr
[default]   from /opt/ruby/lib/ruby/gems/1.8/gems/chef-0.10.2/bin/../lib/chef/file_cache.rb:54:in `open'
: stderr
[default]   from /opt/ruby/lib/ruby/gems/1.8/gems/chef-0.10.2/bin/../lib/chef/file_cache.rb:54:in `store'
: stderr
[default]   from /opt/ruby/lib/ruby/gems/1.8/gems/chef-0.10.2/bin/../lib/chef/application.rb:133:in `debug_stacktrace'
: stderr
[default]   from /opt/ruby/lib/ruby/gems/1.8/gems/chef-0.10.2/bin/../lib/chef/application/solo.rb:210:in `run_application'
: stderr
[default]   from /opt/ruby/lib/ruby/gems/1.8/gems/chef-0.10.2/bin/../lib/chef/application/solo.rb:183:in `loop'
: stderr
[default]   from /opt/ruby/lib/ruby/gems/1.8/gems/chef-0.10.2/bin/../lib/chef/application/solo.rb:183:in `run_application'
: stderr
[default]   from /opt/ruby/lib/ruby/gems/1.8/gems/chef-0.10.2/bin/../lib/chef/application.rb:66:in `run'
: stderr
[default]   from /opt/ruby/lib/ruby/gems/1.8/gems/chef-0.10.2/bin/chef-solo:25
    from /opt/ruby/bin/chef-solo:19:in `load'
    from /opt/ruby/bin/chef-solo:19
: stderr
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

chef-solo -c /tmp/vagrant-chef-1/solo.rb -j /tmp/vagrant-chef-1/dna.json

The output of the command prior to failing is outputted below:

[no output]