在我的一个厨师食谱中,我正在尝试升级 nss 包,就像这样。
include_recipe 'yum'
package 'nss' do
action :upgrade
end
include_recipe 'yum-epel'
我注意到 chef-client 未能与以下错误收敛。
ERROR: package[nss] (123AB_cookbook::default line 12) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of /usr/bin/python /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/provider/package/yum-dump.py --options --installed-provides ----
STDOUT: [option installonlypkgs] kernel kernel-bigmem installonlypkg(kernel-module) installonlypkg(vm) kernel-enterprise kernel-smp kernel-debug kernel-unsupported kernel-source kernel-devel kernel-PAE kernel-PAE-debug
STDERR: yum-dump Repository Error: Cannot retrieve repository metadata (repomd.xml) for repository: epel. Please verify its path and try again
---- End output of /usr/bin/python /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/provider/package/yum-dump.py --options --installed-provides ----
Ran /usr/bin/python /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/provider/package/yum-dump.py --options --installed-provides returned 1
[2015-03-09T18:28:38+00:00] ERROR: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
[2015-03-09T18:28:38+00:00] ERROR: Sleeping for 1800 seconds before trying again
但是,如果我 ssh 到服务器并执行手动操作chef-client
,则聚合成功完成。
什么可能导致此问题?
节点上的 yum repolist 显示间歇性不可用。下面是控制台输出(我已经删除了它在下面列表中返回的其他 repo 数据)
[root@c933445 test]# yum repolist
Loaded plugins: product-id, security, subscription-manager
epel/metalink | 13 kB 00:00
epel | 4.4 kB 00:00
http://mirror.sfo12.us.leaseweb.net/epel/6/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml does not match metalink for epel
Trying other mirror.
epel | 4.4 kB 00:00
http://mirror.pnl.gov/epel/6/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml does not match metalink for epel
Trying other mirror.
epel | 4.4 kB 00:00
epel/primary_db | 6.4 MB 00:00
repo id repo name status
epel Extra Packages for Enterprise Linux 6 - x86_64 11,287
repolist: 41,472