- From: Michael Leinartas <
>
- To:
- Subject: [chef] Re: Re: Re: Re: Re: Re: Re: aws_elastic_ip MissingParameter error
- Date: Tue, 6 Dec 2011 17:12:15 -0600
Just want to note that there's now an ohai resource (added in 0.10 I
think?) that will do the reload as well that looks a little cleaner
(to my eyes at least), though does exactly the same thing:
http://wiki.opscode.com/display/chef/Resources#Resources-Ohai
ohai "reload" do
action :reload
end
On Tue, Dec 6, 2011 at 10:42 AM, Joshua Timberman
<
>
wrote:
>
What happened, and this is normal without modification via a recipe:
>
>
* Instance is launched rand new with no chef, original public ip from ec2
>
is assigned.
>
* Chef gets installed and runs Ohai, which detects the ec2 assigned IP.
>
* elastic ip is assigned by the recipe.
>
(at this point you may lose connectivity if you were on the ec2 assign ip)
>
* chef run completes and the node is saved.
>
>
At no point does chef rerun Ohai to detect the ip. It is correct after chef
>
runs again because the elastic ip is now the default.
>
>
You can initialize rerunning Ohai in a chef run like this:
>
>
o = Ohai::System.new
>
o.all_plugins
>
node.automatic_attrs.merge! o.data
>
>
Put that in a ruby_block so it happens during the execute phase of
>
convergence. You can also call node.save explicitly in the ruby_block.
>
>
On Dec 1, 2011, at 10:56, Bryan McLellan
>
<
>
>
wrote:
>
>
> On Thu, Dec 1, 2011 at 8:09 AM, Kevin Harvey
>
> <
>
>
> wrote:
>
>> I just manually ssh'd in to the server (ssh
>
>>
)
>
>> and ran
>
>> chef-client. It appears that resync'd the instance at OpsCode. I'm now
>
>> able
>
>
>
> It is possible that the instance hadn't populated that information
>
> correctly with the server. It is hard to tell now that you fixed it,
>
> so just glad it is working for you now.
>
>
>
> Bryan
Archive powered by MHonArc 2.6.16.