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:
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
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
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
Hope this helps.
On Fri, Jan 30, 2015 at 5:47 PM, Douglas Garstang
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
It looks like someone has created a cookbook as a workaround for a issue
with similar symptons. Is this a known issue?