- From: "Julian C. Dunn" <
>
- To:
- Subject: [chef] Re: Re: Re: aws and chef do not play nice
- Date: Wed, 20 Nov 2013 23:10:51 -0500
Part of the issue is that we have not yet found a reliable way in Ohai
to detect whether a machine is running in EC2. Hence the hints file.
However, creating the hints file in recipe code is not sufficient to
populate node['ec2'] because by that point, Ohai has already run.
You can create the hints file *before* you run Chef in a number of
ways, one of which is that "knife ec2 server create" will take a
--hint parameter.
- Julian
On Wed, Nov 20, 2013 at 2:49 AM, Jordan Dea-Mattson
<
>
wrote:
>
The issue is, I believe, that at the time you execute this recipe that
>
node['ec2']['instance_id'] is not defined. This is the cause of your failure
>
due to 'undefined method'.
>
>
This is a Ruby runtime exception and is not 'managed' by 'ignore_failure'.
>
>
I previously encountered a similar issue. It was due to Ohai not setting the
>
'instance_id' appropriately on first run and was tied to a particular
>
version of Ohai. What version of Chef and version of Ohai are you using?
>
>
The reason it executes successfully following your first run, is that Ohai
>
is not properly setting the 'instance_id'.
>
>
Yours,
>
>
Jordan
--
[ Julian C. Dunn
<
>
* Sorry, I'm ]
[ WWW:
http://www.aquezada.com/staff/julian * only Web 1.0 ]
[
gopher://sdf.org/1/users/keymaker/ * compliant! ]
[ PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9 ]
Archive powered by MHonArc 2.6.16.