我很难安装以本地下载的rpm文件形式提供的软件包--就在Oracle Linux (OEL)上。有窃听器吗?有人注意到了吗?这将是一个巨大的错误,所以我有点惊讶。
厨师的食谱很简单:
pkg_src_location = 'https://s3.amazonaws.com/solution-automation-folder/qualys'
pkg = 'qualys-cloud-agent.x86_64.rpm'
local_image = "#{Chef::Config['file_cache_path']}/#{pkg}"
remote_file 'qualys-cloud-agent-image' do
path local_image
source "#{pkg_src_location}/#{pkg}"
end
package 'qualys-cloud-agent' do
source local_image
end它可以从test.git获得。
我注意到,在Oracle Linux (OEL)上,触发了以下python脚本:
/usr/bin/python /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/provider/package/yum/yum-dump.py --options --installed-provides --yum-lock-timeout 30它运行了很长一段时间(下载几百兆字节的数据--据我所见--据我所见-- yum元数据)并最终失败(调试模式下的厨房将所有这些转储到stdout.)。总之,结果是:
* yum_package[qualys-cloud-agent] action install[2016-12-01T12:35:32+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/provider/package/yum/yum-dump.py exceeded timeout 900
================================================================================
Error executing action `install` on resource 'yum_package[qualys-cloud-agent]'
================================================================================
Mixlib::ShellOut::CommandTimeout
--------------------------------
Command timed out after 900s:
Command exceeded allowed execution time, process terminated
---- Begin output of /usr/bin/python /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/provider/package/yum/yum-dump.py --options --installed-provides --yum-lock-timeout 30 ----
STDOUT:
STDERR:
---- End output of /usr/bin/python /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/provider/package/yum/yum-dump.py --options --installed-provides --yum-lock-timeout 30 ----
Ran /usr/bin/python /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/provider/package/yum/yum-dump.py --options --installed-provides --yum-lock-timeout 30 returned
Resource Declaration:
---------------------
# In /tmp/kitchen/cache/cookbooks/oel_pkg_test/recipes/default.rb
16: package 'qualys-cloud-agent' do
17: source local_image
18: end
Compiled Resource:
------------------
# Declared in /tmp/kitchen/cache/cookbooks/oel_pkg_test/recipes/default.rb:16:in `from_file'
yum_package("qualys-cloud-agent") do
package_name "qualys-cloud-agent"
action [:install]
retries 0
retry_delay 2
default_guard_interpreter :default
declared_type :package
cookbook_name "oel_pkg_test"
recipe_name "default"
source "/tmp/kitchen/cache/qualys-cloud-agent.x86_64.rpm"
flush_cache {:before=>false, :after=>false}
end你有没有注意到百胜( yum flush_cache )不应该发生,但它仍然发生?这很令人沮丧。在我的本地厨房(带迷途人/虚拟盒),甚至在AWS云厨房里,这总是失败的.真实的例子有时失败有时汇合..。但这是个彩票。无论如何,为什么这个缓存更新会发生在单个本地rpm映像上!?
我确实尝试过使用rpm_package,但这会导致在其他菜谱中使用yum_package存在的问题.
有什么想法吗?
发布于 2016-12-01 15:25:41
在本例中,您可能确实希望使用rpm_package,但是关于为什么缓存要重新加载,这可能只是第一次被击中,因此必须进行初始重新加载,或者是在其他一些修改包集之后。
https://stackoverflow.com/questions/40911434
复制相似问题