[chef] Re: Ohai timeouts inside VPC


Chronological Thread 
  • From: Steven Danna < >
  • To: " " < >
  • Subject: [chef] Re: Ohai timeouts inside VPC
  • Date: Fri, 30 Jan 2015 19:24:43 +0000

Hi,

A quick follow up.  I just saw your other thread about writing a VPC
plugin.  It looks like my knowledge about it being difficult to detect
VPC might be out of date?  If so, improvements to the ec2 plugin
itself are also welcome.

Cheers,

Steven

On Fri, Jan 30, 2015 at 7:20 PM, Steven Danna 
< >
 wrote:
> Hi Douglas,
>
> Unfortunately, reliably detecting VPC nodes is difficult.  If you are
> only seeing slowness without the ohai hint in place, then my guess is
> that it is a result of the fact that we detect being on ec2 by making
> a network call to the metadata API:
>
> https://github.com/chef/ohai/blob/master/lib/ohai/plugins/ec2.rb#L45
>
> If you are seeing the reload slowness even with the hint enabled, then
> I would recommend running chef-client with debug logging turned on.
> The timestamps in the log can often help find which plugins are slow
> to load.
>
>> It looks like someone has created a cookbook as a workaround for a issue 
>> with similar symptons. Is this a known issue?
>
> The difficulty and slowness of detecting EC2 nodes is known and was
> one of the primary motivators for Ohai's hint system.  Currently,
> using an ohai hint when you know you are on EC2 and disabling the
> plugin when you know you are not on EC2 is the best method to avoid
> the speed penalty (and unreliability) of the ec2 detection methods we
> have.
>
> The ec2 hint can be put on disk by the knife-ec2 plugin at the time of
> provisioning or by the ohai cookbook's ohai_hint LWRP on the first
> chef-client run. (The ohai cookbook is also capable of disabling
> plugins).
>
> Hope this helps.
>
> Cheers,
>
> Steven
>
>
>
> On Fri, Jan 30, 2015 at 5:47 PM, Douglas Garstang
> < >
>  wrote:
>> I'm running chef and using ohai plugins inside EC2 instances running in a
>> VPC. Aside from creating the hints file, it seems that any ohai reloads are
>> horribly slow.
>>
>> It looks like someone has created a cookbook as a workaround for a issue
>> with similar symptons. Is this a known issue?
>>
>https://github.com/marcelom/ohai_ec2_hack
>>
>> Doug



Archive powered by MHonArc 2.6.16.

§