[chef] Re: Re: Ohai EC2 plugin error


Chronological Thread 
  • From: Yoshi Spendiff < >
  • To:
  • Subject: [chef] Re: Re: Ohai EC2 plugin error
  • Date: Mon, 30 Mar 2015 15:12:16 -0700

Hi Julian,

Cool, didn't know there was a chef shell (chell?). Looking at the node['ec2'] attributes taught me yet another lesson in not blindly copying and pasting what I find on the internet.

Thanks for the help.

Regards,
Yoshi

On Mon, Mar 30, 2015 at 2:30 PM, Julian C. Dunn < " target="_blank"> > wrote:
So just to be clear: exceptions in Ohai are not necessarily indicative of an error. Some plugins raise exceptions if certain conditions are not met (like, if the GCE plugin is being run on a box not in Google Compute) and Ohai swallows all exceptions during regular operations.

Have you tried loading the plugin inside the chef-shell and poking at it to see what’s happening?

Most of the logic for grabbing metadata from EC2 is in here: https://github.com/chef/ohai/blob/master/lib/ohai/mixin/ec2_metadata.rb

- Julian

> On Mar 30, 2015, at 1:00 PM, Yoshi Spendiff < "> > wrote:
>
> Hi Julian,
>
> Looking over the stack trace more thoroughly it doesn't appear to be exactly the same problem, although the outcome and failure point is the same.
>
> I'm not getting the ohai ec2 node details when my recipe runs (I have the ec2 hint json file).
>
> It may be a legitimate failure of getaddrinfo but I'm not sure what it's being called on.
>
> Regards,
> Yoshi
>
> On Fri, Mar 27, 2015 at 7:29 PM, Julian C. Dunn < "> > wrote:
> I don't think that's the same issue as what's described in that
> ticket. In the ticket, it's the EC2 plugin which fails to run due to
> conflict with the GCE plugin.
>
> What exactly is the issue you are experiencing? You're running it in
> debug mode presumably to try and debug something else...?
>
> - Julian
>
> On Fri, Mar 27, 2015 at 10:28 AM, Yoshi Spendiff
> < "> > wrote:
> > Hi,
> >
> > I'm having the same problem listed here:
> > https://tickets.opscode.com/browse/OHAI-489
> > My Ohai version is 8.1.1 and chef-client version is 11.10.
> >
> > This is the stack trace when I run ohai -l debug:
> >
> > looks_like_ec2? == true
> > [2015-03-27T16:58:51+00:00] DEBUG: EC2 shows unsupported metadata version:
> > 2014-11-05
> > [2015-03-27T16:58:51+00:00] DEBUG: EC2 shows unsupported metadata version:
> > 2014-02-25
> > [2015-03-27T16:58:51+00:00] DEBUG: EC2 metadata version: 2012-01-12
> > [2015-03-27T16:58:51+00:00] DEBUG: EC2 shows unsupported metadata version:
> > 2014-11-05
> > [2015-03-27T16:58:51+00:00] DEBUG: EC2 shows unsupported metadata version:
> > 2014-02-25
> > [2015-03-27T16:58:51+00:00] DEBUG: EC2 metadata version: 2012-01-12
> > [2015-03-27T16:58:51+00:00] DEBUG: Plugin GCE threw #<SocketError:
> > getaddrinfo: Name or service not known>
> > [2015-03-27T16:58:51+00:00] DEBUG:
> > /opt/chef/embedded/apps/ohai/lib/ohai/mixin/gce_metadata.rb:30:in
> > `pack_sockaddr_in'
> > [2015-03-27T16:58:51+00:00] DEBUG:
> > /opt/chef/embedded/apps/ohai/lib/ohai/mixin/gce_metadata.rb:30:in
> > `can_metadata_connect?'
> > [2015-03-27T16:58:51+00:00] DEBUG:
> > /opt/chef/embedded/apps/ohai/lib/ohai/plugins/gce.rb:30:in
> > `has_gce_metadata?'
> > [2015-03-27T16:58:51+00:00] DEBUG:
> > /opt/chef/embedded/apps/ohai/lib/ohai/plugins/gce.rb:39:in `looks_like_gce?'
> > [2015-03-27T16:58:51+00:00] DEBUG:
> > /opt/chef/embedded/apps/ohai/lib/ohai/plugins/gce.rb:43:in `block (2 levels)
> > in <main>'
> > [2015-03-27T16:58:51+00:00] DEBUG:
> > /opt/chef/embedded/apps/ohai/lib/ohai/dsl/plugin/versionvii.rb:90:in
> > `instance_eval'
> > [2015-03-27T16:58:51+00:00] DEBUG:
> > /opt/chef/embedded/apps/ohai/lib/ohai/dsl/plugin/versionvii.rb:90:in
> > `run_plugin'
> > [2015-03-27T16:58:51+00:00] DEBUG:
> > /opt/chef/embedded/apps/ohai/lib/ohai/dsl/plugin.rb:98:in `run'
> > [2015-03-27T16:58:51+00:00] DEBUG:
> > /opt/chef/embedded/apps/ohai/lib/ohai/dsl/plugin.rb:169:in `safe_run'
> > [2015-03-27T16:58:51+00:00] DEBUG:
> > /opt/chef/embedded/apps/ohai/lib/ohai/runner.rb:82:in `run_v7_plugin'
> > [2015-03-27T16:58:51+00:00] DEBUG:
> > /opt/chef/embedded/apps/ohai/lib/ohai/runner.rb:43:in `run_plugin'
> > [2015-03-27T16:58:51+00:00] DEBUG:
> > /opt/chef/embedded/apps/ohai/lib/ohai/system.rb:94:in `block in run_plugins'
> > [2015-03-27T16:58:51+00:00] DEBUG:
> > /opt/chef/embedded/apps/ohai/lib/ohai/system.rb:93:in `each'
> > [2015-03-27T16:58:51+00:00] DEBUG:
> > /opt/chef/embedded/apps/ohai/lib/ohai/system.rb:93:in `run_plugins'
> > [2015-03-27T16:58:51+00:00] DEBUG:
> > /opt/chef/embedded/apps/ohai/lib/ohai/system.rb:71:in `all_plugins'
> > [2015-03-27T16:58:51+00:00] DEBUG:
> > /opt/chef/embedded/apps/ohai/lib/ohai/application.rb:90:in `run_application'
> > [2015-03-27T16:58:51+00:00] DEBUG:
> > /opt/chef/embedded/apps/ohai/lib/ohai/application.rb:70:in `run'
> > [2015-03-27T16:58:51+00:00] DEBUG:
> > /opt/chef/embedded/apps/ohai/bin/ohai:42:in `<top (required)>'
> > [2015-03-27T16:58:51+00:00] DEBUG: /usr/bin/ohai:23:in `load'
> > [2015-03-27T16:58:51+00:00] DEBUG: /usr/bin/ohai:23:in `<main>'
> >
> > Is there a way around this? Looking at the ticket it looks like a fix was
> > merged back in version 6.X and the issue is marked as resolved, but that's
> > not the case for me.
> >
> > --
> > Yoshi Spendiff
> > DevOps Engineer
> > Indochino
> > Mobile: +1 778 952 2025
> > Email: ">
>
>
>
> --
> [ Julian C. Dunn < "> >          * Sorry, I'm    ]
> [ WWW: http://www.aquezada.com/staff/julian    * only Web 1.0  ]
> [ gopher://sdf.org/1/users/keymaker/           * compliant!    ]
> [ PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9       ]
>
>
>
> --
> Yoshi Spendiff
> DevOps Engineer
> Indochino
> Mobile: +1 778 952 2025
> Email: ">




--
Yoshi Spendiff
DevOps Engineer
Indochino
Mobile: +1 778 952 2025



Archive powered by MHonArc 2.6.16.

§