# Still necessary to hint Ohai on EC2 VPC?

**URL:** <https://discourse.chef.io/t/still-necessary-to-hint-ohai-on-ec2-vpc/5620>\
**Category:** Chef Infra (archive)\
**Created:** [August 12, 2014, 9:58am UTC](https://discourse.chef.io/t/still-necessary-to-hint-ohai-on-ec2-vpc/5620 "2014-08-12T09:58:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bryan\_Berry](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/bryan_berry/32/213_2.png) [@Bryan\_Berry](https://discourse.chef.io/u/Bryan_Berry)\
**Post date:** [August 12, 2014, 9:58am UTC](https://discourse.chef.io/t/still-necessary-to-hint-ohai-on-ec2-vpc/5620/1 "2014-08-12T09:58:17Z")

</div>

Dear chefs,

according to this list thread from Jan of this year  
[http://lists.opscode.com/sympa/arc/chef/2014-01/msg00340.html](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

---

<div class="post-metadata">

**Author:** ![Bosoxjay](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/bosoxjay/32/233_2.png) [@Bosoxjay](https://discourse.chef.io/u/Bosoxjay)\
**Post date:** [August 12, 2014, 10:59am UTC](https://discourse.chef.io/t/still-necessary-to-hint-ohai-on-ec2-vpc/5620/2 "2014-08-12T10:59:20Z")

</div>

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:
> 
> Dear chefs,
> 
> according to this list thread from Jan of this year [chef - [chef] Re: Re: Ohai on a AWS VPC instance](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

---

<div class="post-metadata">

**Author:** ![Bryan\_Berry](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/bryan_berry/32/213_2.png) [@Bryan\_Berry](https://discourse.chef.io/u/Bryan_Berry)\
**Post date:** [August 12, 2014, 11:02am UTC](https://discourse.chef.io/t/still-necessary-to-hint-ohai-on-ec2-vpc/5620/3 "2014-08-12T11:02:40Z")

</div>

thanks Jason, that's very helpful to know

On Tue, Aug 12, 2014 at 12:59 PM, Jason Perry [bosoxjay@gmail.com](mailto: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](mailto: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](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

---

<div class="post-metadata">

**Author:** ![Paul\_MacDougall](https://avatars.discourse-cdn.com/v4/letter/p/67e7ee/32.png) [@Paul\_MacDougall](https://discourse.chef.io/u/Paul_MacDougall)\
**Post date:** [August 12, 2014, 4:13pm UTC](https://discourse.chef.io/t/still-necessary-to-hint-ohai-on-ec2-vpc/5620/4 "2014-08-12T16:13:59Z")

</div>

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](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)  
> [mailto:bryan.berry@gmail.com](mailto:bryan.berry@gmail.com)\> wrote:
> 
> Bryan Berry [mailto:bryan.berry@gmail.com](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](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

---

<div class="post-metadata">

**Author:** ![kallistec](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/kallistec/32/23_2.png) [@kallistec](https://discourse.chef.io/u/kallistec)\
**Post date:** [August 12, 2014, 4:55pm UTC](https://discourse.chef.io/t/still-necessary-to-hint-ohai-on-ec2-vpc/5620/5 "2014-08-12T16:55:57Z")

</div>

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](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
