- From: Daniel DeLeo <
>
- To:
- Cc: Joshua Timberman <
>, Brad Knowles <
>
- Subject: [chef] Re: Re: Re: Re: Re: Re: Providing specific version numbers of packages to install with yum...
- Date: Mon, 24 Oct 2011 09:11:42 -0700
>
>
I'll give this a shot, but it seems that we still will have a timing issue
>
here. I've gone through this a couple of times, and I'm convinced that the
>
issue I'm running into is that the EPEL Erlang repo is not being fully
>
installed before yum goes to install the correct version of the Erlang
>
package. Most recently when I tried this (hard-coding a specific Erlang
>
version as part of the recipe), I got this error:
>
>
FATAL: Chef::Exceptions::Package: yum_package[erlang] (erlang::default line
>
35) had an error: Version R14B-03.3.el5 of erlang not found. Did you
>
specify both version and release? (version-release, e.g. 1.84-10.fc6)
>
>
However, I know that if I run chef-client again on this node, everything
>
will install fine. I'm wondering what is the proper way to ensure that the
>
EPEL Erlang repo is fully installed before trying to do the yum install of
>
the package -- put the yum install in a ruby_block, to force it to be as
>
late in the process as possible? Is there a way to cause the install of the
>
EPEL Erlang repo to happen a lot earlier in the process?
Yes, use the run_action trick. Using apt-get update as an example that I'm
familiar with:
execute "apt-get update" do
action :nothing
# !!! If you put the run_action inside the block, put it last
run_action :run
end
This will probably fix your problem. Chef has some internal caching of yum
info that could be involved as well, but it's had a lot of updates recently
so I'm not sure of the best procedure to flush it anymore.
HTH,
--
Dan DeLeo
Archive powered by MHonArc 2.6.16.