我刚从Chef 11升级到最新的12.x.除了必须在配置文件中删除ref to redis之外,安装和升级都很顺利。但是:
chef-server-ctrl user-create
...有这个错误的barfs:
/opt/opscode/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:128:in `require': cannot load such file -- chef/knife/ec_base (LoadError)
from /opt/opscode/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
from /opt/opscode/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:39:in `require'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/knife-ec-backup-2.0.6/lib/chef/knife/ec_backup.rb:2:in `<top (required)>'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.12.19/lib/chef/knife/core/subcommand_loader.rb:100:in `load'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.12.19/lib/chef/knife/core/subcommand_loader.rb:100:in `block in load_commands'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.12.19/lib/chef/knife/core/subcommand_loader.rb:100:in `each'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.12.19/lib/chef/knife/core/subcommand_loader.rb:100:in `load_commands'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.12.19/lib/chef/knife/core/subcommand_loader.rb:110:in `load_command'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.12.19/lib/chef/knife/core/subcommand_loader.rb:124:in `command_class_from'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.12.19/lib/chef/knife.rb:153:in `subcommand_class_from'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.12.19/lib/chef/knife.rb:214:in `run'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.12.19/lib/chef/application/knife.rb:148:in `run'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.12.19/bin/knife:25:in `<top (required)>'
from /opt/opscode/embedded/bin/knife:23:in `load'
from /opt/opscode/embedded/bin/knife:23:in `<main>'
似乎一个文件被软管,不知何故。 ???我找不到一种方法来验证升级期间安装的所有依赖项,或者仅执行依赖项重新安装。可能导致这种情况的原因是什么?
答案 0 :(得分:0)
事实证明,当你不知道在安装中有多少旧版本的Chef重叠时试图调试这个问题是一个无用的练习。 Chef中的任何内容都不会尝试解决依赖关系,升级的安装总是假设您要保留所有旧的,过时的东西。解决方案是进行完整备份,然后删除与Chef相关的任何内容的每个跟踪,然后再次安装所有组件并按照说明恢复备份。