- From: Joshua Timberman <
>
- To: "
" <
>
- Subject: [chef] Re: Dealing with back level ohai
- Date: Thu, 24 Jan 2013 05:51:03 +0000
- Accept-language: en-US
On 1/23/13 12:00 PM, "Booker Bense"
<
>
wrote:
>
What is the "right" way to deal with this problem? I'm using vagrant and
>
some boxes come with old versions of ohai that cause failures in the chef
>
run.
Upgrade the Chef+Ohai versions in the vagrant box and repackage it. You
can do something like this:
% vagrant up --no-provision BOXNAME
% vagrant ssh BOXNAME
vagrant$ wget -O -
http://opscode.com/chef/install.sh | sudo bash
vagrant$ rm /tmp/chef*{rpm,deb}
vagrant$ exit
% vagrant package BOXNAME
% rm -rf ~/.vagrant.d/boxes/BOXNAME
% vagrant box add BOXNAME package.box
Depending on how Chef was installed on the box, you may need to do
something else (package upgrade, gem install, etc). If it's so old it
doesn't have platform_family, I'm sure it isn't the "omnibus" package,
which is what the wget command above will install.
>
If packages is nil after this case statement what is the correct action
>
to take?
>
>
Ideally, I'd like a warning to pop up like
>
>
"Hey, your version of ohai is too old, please upgrade"
As I mentioned in another reply, the versions of Chef and Ohai that have
platform_family are several months old now. The number of cookbooks using
platform_family will only increase.
Alternately, you can use an older version of the build-essential cookbook.
The platform_family support was added in 1.1.0, so you would have to use
1.0.2.
Cheers,
Joshua
Archive powered by MHonArc 2.6.16.