Vagrant + Chef 盒子投掷 "uninitialized constant Opscode::Mysql"
Vagrant + Chef box throwing "uninitialized constant Opscode::Mysql"
这是有问题的框的 vagrant up
(在 vagrant destroy
之后)的输出(vagrant provision
导致相同的错误):
==> mongos-zend: ================================================================================
==> mongos-zend: Recipe Compile Error in /var/chef/cache/cookbooks/mysql/libraries/provider_mysql_service_debian.rb
==> mongos-zend: ================================================================================
==> mongos-zend:
==> mongos-zend:
==> mongos-zend: NameError
==> mongos-zend: ---------
==> mongos-zend: uninitialized constant Opscode::Mysql
==> mongos-zend:
==> mongos-zend:
==> mongos-zend: Cookbook Trace:
==> mongos-zend: ---------------
==> mongos-zend: /var/chef/cache/cookbooks/mysql/libraries/provider_mysql_service_debian.rb:17:in `<class:Debian>'
==> mongos-zend: /var/chef/cache/cookbooks/mysql/libraries/provider_mysql_service_debian.rb:9:in `<class:MysqlService>'
==> mongos-zend: /var/chef/cache/cookbooks/mysql/libraries/provider_mysql_service_debian.rb:8:in `<class:Provider>'
==> mongos-zend: /var/chef/cache/cookbooks/mysql/libraries/provider_mysql_service_debian.rb:7:in `<class:Chef>'
==> mongos-zend: /var/chef/cache/cookbooks/mysql/libraries/provider_mysql_service_debian.rb:6:in `<top (required)>'
==> mongos-zend:
==> mongos-zend:
==> mongos-zend: Relevant File Content:
==> mongos-zend: ----------------------
==> mongos-zend: /var/chef/cache/cookbooks/mysql/libraries/provider_mysql_service_debian.rb:
==> mongos-zend:
==> mongos-zend: 10: use_inline_resources if defined?(use_inline_resources)
==> mongos-zend: 11:
==> mongos-zend: 12: def whyrun_supported?
==> mongos-zend: 13: true
==> mongos-zend: 14: end
==> mongos-zend: 15:
==> mongos-zend: 16: include MysqlCookbook::Helpers::Debian
==> mongos-zend: 17>> include Opscode::Mysql::Helpers
==> mongos-zend: 18:
==> mongos-zend: 19: action :create do
==> mongos-zend: 20:
==> mongos-zend: 21: unless sensitive_supported?
==> mongos-zend: 22: Chef::Log.debug("Sensitive attribute disabled, chef-client version #{Chef::VERSION} is lower than 11.14.0")
==> mongos-zend: 23: end
==> mongos-zend: 24:
==> mongos-zend: 25: package 'debconf-utils' do
==> mongos-zend: 26: action :install
==> mongos-zend:
==> mongos-zend:
==> mongos-zend:
==> mongos-zend: [2015-01-12T10:50:04-06:00] ERROR: Running exception handlers
==> mongos-zend: [2015-01-12T10:50:04-06:00] ERROR: Exception handlers complete
==> mongos-zend: [2015-01-12T10:50:04-06:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> mongos-zend: [2015-01-12T10:50:04-06:00] ERROR: uninitialized constant Opscode::Mysql
==> mongos-zend: [2015-01-12T10:50:04-06:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.
$ 主厨客户端-v
厨师:11.18.0.rc.1
$ 流浪汉 -v
流浪者 1.6.5
这本食谱是通过 berks 超市送来的,这让我 - https://github.com/chef-cookbooks/mysql。
如果有人对添加的内容有建议,我可以提供更多信息。我希望有人看到并认识到这个问题,并且知道要寻找什么。
Shyamalan 式的扭曲:我的同事正在使用与我相同的 Vagrant/Chef 存储库,并且可以 运行 vagrant up
没有任何问题。我们有相同版本的 Vagrant 和 Chef,其他所有内容都应通过 Berksfile/Vagrantfile(位于存储库中)进行管理。
刚刚查看了我们的内容——我们引用了所有的食谱名称。我将从那里开始。
另一件事可能是区分大小写 -- 取决于可以发挥作用的主机文件系统。
您的代码依赖于版本 < 6.0
中的 mysql cookbook。
查看 helper library in v5.6.1, where it resides in the Opscode::Mysql::Helpers
namespace, versus helper library in v6.0.0 在 MysqlCookbook::Helpers
中的位置。
我不确定,如果您有自己的顶级食谱,您的 运行 列表是什么,但您可以在 metadata.rb
的 depends
部分定义版本限制(参见 docs)。
这是有问题的框的 vagrant up
(在 vagrant destroy
之后)的输出(vagrant provision
导致相同的错误):
==> mongos-zend: ================================================================================
==> mongos-zend: Recipe Compile Error in /var/chef/cache/cookbooks/mysql/libraries/provider_mysql_service_debian.rb
==> mongos-zend: ================================================================================
==> mongos-zend:
==> mongos-zend:
==> mongos-zend: NameError
==> mongos-zend: ---------
==> mongos-zend: uninitialized constant Opscode::Mysql
==> mongos-zend:
==> mongos-zend:
==> mongos-zend: Cookbook Trace:
==> mongos-zend: ---------------
==> mongos-zend: /var/chef/cache/cookbooks/mysql/libraries/provider_mysql_service_debian.rb:17:in `<class:Debian>'
==> mongos-zend: /var/chef/cache/cookbooks/mysql/libraries/provider_mysql_service_debian.rb:9:in `<class:MysqlService>'
==> mongos-zend: /var/chef/cache/cookbooks/mysql/libraries/provider_mysql_service_debian.rb:8:in `<class:Provider>'
==> mongos-zend: /var/chef/cache/cookbooks/mysql/libraries/provider_mysql_service_debian.rb:7:in `<class:Chef>'
==> mongos-zend: /var/chef/cache/cookbooks/mysql/libraries/provider_mysql_service_debian.rb:6:in `<top (required)>'
==> mongos-zend:
==> mongos-zend:
==> mongos-zend: Relevant File Content:
==> mongos-zend: ----------------------
==> mongos-zend: /var/chef/cache/cookbooks/mysql/libraries/provider_mysql_service_debian.rb:
==> mongos-zend:
==> mongos-zend: 10: use_inline_resources if defined?(use_inline_resources)
==> mongos-zend: 11:
==> mongos-zend: 12: def whyrun_supported?
==> mongos-zend: 13: true
==> mongos-zend: 14: end
==> mongos-zend: 15:
==> mongos-zend: 16: include MysqlCookbook::Helpers::Debian
==> mongos-zend: 17>> include Opscode::Mysql::Helpers
==> mongos-zend: 18:
==> mongos-zend: 19: action :create do
==> mongos-zend: 20:
==> mongos-zend: 21: unless sensitive_supported?
==> mongos-zend: 22: Chef::Log.debug("Sensitive attribute disabled, chef-client version #{Chef::VERSION} is lower than 11.14.0")
==> mongos-zend: 23: end
==> mongos-zend: 24:
==> mongos-zend: 25: package 'debconf-utils' do
==> mongos-zend: 26: action :install
==> mongos-zend:
==> mongos-zend:
==> mongos-zend:
==> mongos-zend: [2015-01-12T10:50:04-06:00] ERROR: Running exception handlers
==> mongos-zend: [2015-01-12T10:50:04-06:00] ERROR: Exception handlers complete
==> mongos-zend: [2015-01-12T10:50:04-06:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> mongos-zend: [2015-01-12T10:50:04-06:00] ERROR: uninitialized constant Opscode::Mysql
==> mongos-zend: [2015-01-12T10:50:04-06:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.
$ 主厨客户端-v 厨师:11.18.0.rc.1
$ 流浪汉 -v 流浪者 1.6.5
这本食谱是通过 berks 超市送来的,这让我 - https://github.com/chef-cookbooks/mysql。
如果有人对添加的内容有建议,我可以提供更多信息。我希望有人看到并认识到这个问题,并且知道要寻找什么。
Shyamalan 式的扭曲:我的同事正在使用与我相同的 Vagrant/Chef 存储库,并且可以 运行 vagrant up
没有任何问题。我们有相同版本的 Vagrant 和 Chef,其他所有内容都应通过 Berksfile/Vagrantfile(位于存储库中)进行管理。
刚刚查看了我们的内容——我们引用了所有的食谱名称。我将从那里开始。
另一件事可能是区分大小写 -- 取决于可以发挥作用的主机文件系统。
您的代码依赖于版本 < 6.0
中的 mysql cookbook。
查看 helper library in v5.6.1, where it resides in the Opscode::Mysql::Helpers
namespace, versus helper library in v6.0.0 在 MysqlCookbook::Helpers
中的位置。
我不确定,如果您有自己的顶级食谱,您的 运行 列表是什么,但您可以在 metadata.rb
的 depends
部分定义版本限制(参见 docs)。