[chef] crazy-making with yum_package and package


Chronological Thread 
  • From:
  • To: chef < >
  • Subject: [chef] crazy-making with yum_package and package
  • Date: Tue, 25 Sep 2012 11:42:34 -0700


hi. i'm having problems trying to install a package. any help?

specs: CentOS 5.8, chef-full-0.10.10-1

case node[:platform]
when "redhat", "centos", "scientific", "fedora"
  yum_package "zrm-innobackupex" do
    version "0.81.3-1"
    options "--enablerepo=epel --enablerepo=palominodb"
    action :install
  end
end

results in:

[Tue, 25 Sep 2012 18:26:42 +0000] INFO: Processing 
yum_package[zrm-innobackupex] action install (cupcake-percona::percona-setup 
line 75)
[Tue, 25 Sep 2012 18:26:42 +0000] DEBUG: yum_package[zrm-innobackupex] 
couldn't match zrm-innobackupex in installed Provides, loading available 
Provides - this may take a moment
[Tue, 25 Sep 2012 18:26:46 +0000] DEBUG: yum_package[zrm-innobackupex] 
checking yum info for zrm-innobackupex-0.81.3-1
[Tue, 25 Sep 2012 18:26:46 +0000] DEBUG: yum_package[zrm-innobackupex] 
installed version: (none) candidate version: (none)
[Tue, 25 Sep 2012 18:26:46 +0000] ERROR: yum_package[zrm-innobackupex] 
(cupcake-percona::percona-setup line 75) has had an error
[Tue, 25 Sep 2012 18:26:46 +0000] ERROR: yum_package[zrm-innobackupex] 
(/var/cache/chef/cookbooks/cupcake-percona/recipes/percona-setup.rb:75:in 
`from_file') had an error:
yum_package[zrm-innobackupex] (cupcake-percona::percona-setup line 75) had an 
error: Chef::Exceptions::Package: Version 0.81.3-1 of zrm-innobackupex not 
found. Did you specify both version and release? (version-release, e.g. 
1.84-10.fc6)
/opt/opscode/embedded/lib/ruby/gems/1.9.1/gems/chef-0.10.10/lib/chef/provider/package/yum.rb:1088:in
 `install_package'
/opt/opscode/embedded/lib/ruby/gems/1.9.1/gems/chef-0.10.10/lib/chef/provider/package.rb:59:in
 `action_install'
/opt/opscode/embedded/lib/ruby/gems/1.9.1/gems/chef-0.10.10/lib/chef/resource.rb:454:in
 `run_action'
/opt/opscode/embedded/lib/ruby/gems/1.9.1/gems/chef-0.10.10/lib/chef/runner.rb:49:in
 `run_action'
/opt/opscode/embedded/lib/ruby/gems/1.9.1/gems/chef-0.10.10/lib/chef/runner.rb:85:in
 `block (2 levels) in converge'
/opt/opscode/embedded/lib/ruby/gems/1.9.1/gems/chef-0.10.10/lib/chef/runner.rb:85:in
 `each'
/opt/opscode/embedded/lib/ruby/gems/1.9.1/gems/chef-0.10.10/lib/chef/runner.rb:85:in
 `block in converge'
/opt/opscode/embedded/lib/ruby/gems/1.9.1/gems/chef-0.10.10/lib/chef/resource_collection.rb:94:in
 `block in execute_each_resource'
/opt/opscode/embedded/lib/ruby/gems/1.9.1/gems/chef-0.10.10/lib/chef/resource_collection/stepable_iterator.rb:116:in
 `call'
/opt/opscode/embedded/lib/ruby/gems/1.9.1/gems/chef-0.10.10/lib/chef/resource_collection/stepable_iterator.rb:116:in
 `call_iterator_block'
/opt/opscode/embedded/lib/ruby/gems/1.9.1/gems/chef-0.10.10/lib/chef/resource_collection/stepable_iterator.rb:85:in
 `step'
/opt/opscode/embedded/lib/ruby/gems/1.9.1/gems/chef-0.10.10/lib/chef/resource_collection/stepable_iterator.rb:104:in
 `iterate'
/opt/opscode/embedded/lib/ruby/gems/1.9.1/gems/chef-0.10.10/lib/chef/resource_collection/stepable_iterator.rb:55:in
 `each_with_index'
/opt/opscode/embedded/lib/ruby/gems/1.9.1/gems/chef-0.10.10/lib/chef/resource_collection.rb:92:in
 `execute_each_resource'
..snip


for 'version' in the above resource block, i've also tried specifying
"0.81.3-1.noarch", but it still errors.

side question -- it seems to me specifying version is required. is it?
if so, why? i would think the yum_package resource could grab the latest
available from the configured yum repos.

i have also tried substituting resource 'package' for 'yum_package', but
got similar failures.


and yet, when i do this install by hand, yum has no problem finding the
package and dependencies:

# yum --enablerepo=epel --enablerepo=palominodb install zrm-innobackupex
...snip
Dependencies Resolved

================================================================================
 Package                        Arch      Version           Repository     
Size
================================================================================
Installing:
 zrm-innobackupex               noarch    0.81.3-1          palominodb     26 
k
Installing for dependencies:
 MySQL-zrm                      noarch    2.1.1-5.el5       epel          131 
k
 perl-Data-Report               noarch    0.10-4.el5        epel           28 
k
 perl-DateTime-Format-Mail      noarch    0.30-4.el5        epel          179 
k
 perl-DateTime-Format-W3CDTF    noarch    0.04-1.el5        epel           16 
k
 perl-Text-CSV                  noarch    1.10-3.el5        epel           49 
k
 perl-XML-RSS                   noarch    1.31-1.el5        epel           50 
k

Transaction Summary
================================================================================
Install       7 Package(s)
Upgrade       0 Package(s)

Total download size: 479 k
Is this ok [y/N]:



thanks so much,
kallen




Archive powered by MHonArc 2.6.16.

§