gpt4 book ai didi

linux - Knife 工问题

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:19:46 25 4
gpt4 key购买 nike

我正在尝试在 Chef 中运行推送作业,但出现以下错误。尝试安装所需的 gem,但错误仍然相同。

[root@chefserver chef-repo]# knife node status
devapp1 available
[root@chefserver chef-repo]# knife job start uptime devapp1
/opt/chefdk/embedded/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- chef/rest (LoadError)
from /opt/chefdk/embedded/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/knife-push-1.0.2/lib/chef/knife/job_start.rb:27:in `block in <class:JobStart>'
from /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.2.20/lib/chef/knife.rb:232:in `block in load_deps'
from /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.2.20/lib/chef/knife.rb:231:in `each'
from /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.2.20/lib/chef/knife.rb:231:in `load_deps'
from /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.2.20/lib/chef/knife.rb:216:in `run'
from /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.2.20/lib/chef/application/knife.rb:156:in `run'
from /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.2.20/bin/knife:25:in `<top (required)>'
from /bin/knife:263:in `load'
from /bin/knife:263:in `<main>'
[root@chefserver chef-repo]# chef gem list |grep rest
rest (3.0.8)
stuartpreston-azure-sdk-for-ruby (0.7.2)
[root@chefserver chef-repo]#

最佳答案

在其他服务器上成功测试推送作业几天后,我自己遇到了这个错误。这似乎是 chef-client 13.x 上引入的错误。但是,我没有在他们的跟踪器上发现任何错误报告。

我使用的是 chef-13.0.118-1 并降级为 chef-12.20.3-1)并且它立即运行:

$ knife job start teste nodetest --capture
Started. Job ID: fa5f210d826e112b335abce48b1a27b7
.Complete.
capture_output: true
command: teste
created_at: Mon, 31 Jul 2017 20:45:15 GMT
env:
id: fa5f210d826e112b335abce48b1a27b7
nodes:
failed: nodetest
run_timeout: 3600
status: complete
updated_at: Mon, 31 Jul 2017 20:45:15 GMT

关于linux - Knife 工问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45179197/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com