Still necessary to hint Ohai on EC2 VPC?

Dear chefs,

according to this list thread from Jan of this year
http://lists.opscode.com/sympa/arc/chef/2014-01/msg00340.html, it is
necessary to hint Ohai when running inside an EC2 VPC. Is this still the
case?

cheers,

Bryan W. Berry

Hey Bryan,

I believe this is still the case considering last week I pulled in the latest ohai cookbook and the node[:ec2] attribute was not populated in my ec2 vpc (kind of annoying). I had to use the ohai_hint lwrp and reload ohai directly afterwards. Few things to note though, make sure and provide a value for the ec2 hint. I ended up just putting { "type" => "vpc" } for the content attribute to the ohai_hint lwrp (otherwise the ec2.json file will not be created - see the provider code for why this is). You'll also have to make sure and run the ohai_hint and ohai reload in the convergence phase if you use the node[:ec2] anywhere during that phase. Hopefully ec2 vpc detection can be detected in the near future.

-- Jay

On Aug 12, 2014, at 5:58 AM, Bryan Berry bryan.berry@gmail.com wrote:

Dear chefs,

according to this list thread from Jan of this year chef - [chef] Re: Re: Ohai on a AWS VPC instance, it is necessary to hint Ohai when running inside an EC2 VPC. Is this still the case?

cheers,

Bryan W. Berry

thanks Jason, that's very helpful to know

On Tue, Aug 12, 2014 at 12:59 PM, Jason Perry bosoxjay@gmail.com wrote:

Hey Bryan,

I believe this is still the case considering last week I pulled in the
latest ohai cookbook and the node[:ec2] attribute was not populated in my
ec2 vpc (kind of annoying). I had to use the ohai_hint lwrp and reload
ohai directly afterwards. Few things to note though, make sure and provide
a value for the ec2 hint. I ended up just putting { "type" => "vpc" } for
the content attribute to the ohai_hint lwrp (otherwise the ec2.json file
will not be created - see the provider code for why this is). You'll also
have to make sure and run the ohai_hint and ohai reload in the convergence
phase if you use the node[:ec2] anywhere during that phase. Hopefully ec2
vpc detection can be detected in the near future.

-- Jay

On Aug 12, 2014, at 5:58 AM, Bryan Berry bryan.berry@gmail.com wrote:

Dear chefs,

according to this list thread from Jan of this year
chef - [chef] Re: Re: Ohai on a AWS VPC instance, it is
necessary to hint Ohai when running inside an EC2 VPC. Is this still the
case?

cheers,

Bryan W. Berry

Is there an issue or PR for this on github? I'd like to follow it for
future reference.

TIA,
--Paul

Jason Perry mailto:bosoxjay@gmail.com
August 12, 2014 at 3:59
Hey Bryan,

I believe this is still the case considering last week I pulled in the
latest ohai cookbook and the node[:ec2] attribute was not populated in
my ec2 vpc (kind of annoying). I had to use the ohai_hint lwrp and
reload ohai directly afterwards. Few things to note though, make sure
and provide a value for the ec2 hint. I ended up just putting {
"type" => "vpc" } for the content attribute to the ohai_hint lwrp
(otherwise the ec2.json file will not be created - see the provider
code for why this is). You'll also have to make sure and run the
ohai_hint and ohai reload in the convergence phase if you use the
node[:ec2] anywhere during that phase. Hopefully ec2 vpc detection
can be detected in the near future.

-- Jay

On Aug 12, 2014, at 5:58 AM, Bryan Berry <bryan.berry@gmail.com
mailto:bryan.berry@gmail.com> wrote:

Bryan Berry mailto:bryan.berry@gmail.com
August 12, 2014 at 2:58
Dear chefs,

according to this list thread from Jan of this year
chef - [chef] Re: Re: Ohai on a AWS VPC instance, it is
necessary to hint Ohai when running inside an EC2 VPC. Is this still
the case?

cheers,

Bryan W. Berry

On Tuesday, August 12, 2014 at 9:13 AM, Paul MacDougall wrote:

Is there an issue or PR for this on github? I'd like to follow it for future reference.

TIA,
--Paul

I don’t think there’s any open issues for this, you can poke through the old ticketing system (https://tickets.opscode.com/secure/Dashboard.jspa) to find the discussions for why things are the way they are now. Tl;dr, there isn’t a reliable way to tell if you’re on EC2 that doesn’t involve network calls (which could take a long while to time out depending on your network topology). Until Amazon does something about that, there’s nothing we can do in ohai.

--
Daniel DeLeo