Ohai returning 'lxc'


#1

This is mighty strange, and something I haven’t seen before. With a recent
cookbook, node[:virtualization][:system] as reported by ohai is coming up
as ‘lxc’ on AWS EC2 instances when the chef-client first runs. It should be
’xen’.

However, when chef runs again, it returns ‘xen’, and every attempt I’ve
made to look at it with ohai (even before the chef client starts) shows
’xen’.

What’s up with that?

Doug


#2

What version of Ohai? Does it have a virtualization.systems key you can
use for a better match?

Eric G. Wolfe
email: eric.wolfe@cyclecomputing.com
cell: 304.942.3970
twitter: @atomic_penguin

Cycle Computing
Better Answers. Faster.


twitter: @cyclecomputing

On 02/18/2015 01:27 PM, Douglas Garstang wrote:

This is mighty strange, and something I haven’t seen before. With a recent
cookbook, node[:virtualization][:system] as reported by ohai is coming up
as ‘lxc’ on AWS EC2 instances when the chef-client first runs. It should be
’xen’.

However, when chef runs again, it returns ‘xen’, and every attempt I’ve
made to look at it with ohai (even before the chef client starts) shows
’xen’.

What’s up with that?

Doug


#3

Is that before or after the EC2 hint is loaded?


~~ StormeRider ~~

“Every world needs its heroes […] They inspire us to be better than we
are. And they protect from the darkness that’s just around the corner.”

(from Smallville Season 6x1: “Zod”)

On why I hate the phrase “that’s so lame”… http://bit.ly/Ps3uSS

On Wed, Feb 18, 2015 at 10:44 AM, Eric G. Wolfe eric.wolfe@gmail.com
wrote:

What version of Ohai? Does it have a virtualization.systems key you can
use for a better match?

Eric G. Wolfe
email: eric.wolfe@cyclecomputing.com
cell: 304.942.3970
twitter: @atomic_penguin

Cycle Computing
Better Answers. Faster.

http://www.cyclecomputing.com
twitter: @cyclecomputing

On 02/18/2015 01:27 PM, Douglas Garstang wrote:

This is mighty strange, and something I haven’t seen before. With a
recent
cookbook, node[:virtualization][:system] as reported by ohai is coming up
as ‘lxc’ on AWS EC2 instances when the chef-client first runs. It should
be
’xen’.

However, when chef runs again, it returns ‘xen’, and every attempt I’ve
made to look at it with ohai (even before the chef client starts) shows
’xen’.

What’s up with that?

Doug


#4

I actually JUST had this problem!

If you’re using chef before 11.18.6 on Ubuntu > 12.04, upgrade chef -
there’s a guard since added to Ohai that fixes this issue.

Here’s what the older version looks like:

And here’s the more recent fixed version:

Brian

On Wed, Feb 18, 2015 at 1:27 PM, Douglas Garstang doug.garstang@gmail.com
wrote:

This is mighty strange, and something I haven’t seen before. With a recent
cookbook, node[:virtualization][:system] as reported by ohai is coming up
as ‘lxc’ on AWS EC2 instances when the chef-client first runs. It should be
’xen’.

However, when chef runs again, it returns ‘xen’, and every attempt I’ve
made to look at it with ohai (even before the chef client starts) shows
’xen’.

What’s up with that?

Doug


#5

Ah, then I bet the “first run” symptom is probably a result of using
something like omnibus_updater.


~~ StormeRider ~~

“Every world needs its heroes […] They inspire us to be better than we
are. And they protect from the darkness that’s just around the corner.”

(from Smallville Season 6x1: “Zod”)

On why I hate the phrase “that’s so lame”… http://bit.ly/Ps3uSS

On Wed, Feb 18, 2015 at 11:04 AM, Brian Hatfield bmhatfield@gmail.com
wrote:

I actually JUST had this problem!

If you’re using chef before 11.18.6 on Ubuntu > 12.04, upgrade chef -
there’s a guard since added to Ohai that fixes this issue.

Here’s what the older version looks like:
https://github.com/chef/ohai/blob/7.0.2/lib/ohai/plugins/linux/virtualization.rb#L130-L156

And here’s the more recent fixed version:
https://github.com/chef/ohai/blob/7.4.0/lib/ohai/plugins/linux/virtualization.rb#L153-L190

Brian

On Wed, Feb 18, 2015 at 1:27 PM, Douglas Garstang <doug.garstang@gmail.com

wrote:

This is mighty strange, and something I haven’t seen before. With a
recent cookbook, node[:virtualization][:system] as reported by ohai is
coming up as ‘lxc’ on AWS EC2 instances when the chef-client first runs. It
should be ‘xen’.

However, when chef runs again, it returns ‘xen’, and every attempt I’ve
made to look at it with ohai (even before the chef client starts) shows
’xen’.

What’s up with that?

Doug


#6

It wasn’t for me, since I don’t use omnibus_updater - I don’t know what it
was about the first full chef run that was flipping it over. Updating from
11.12.2 to 11.18.6 pulled in the guard I linked above and fixed it for me
nonetheless.

On Wed, Feb 18, 2015 at 2:22 PM, Morgan Blackthorne stormerider@gmail.com
wrote:

Ah, then I bet the “first run” symptom is probably a result of using
something like omnibus_updater.


~~ StormeRider ~~

“Every world needs its heroes […] They inspire us to be better than we
are. And they protect from the darkness that’s just around the corner.”

(from Smallville Season 6x1: “Zod”)

On why I hate the phrase “that’s so lame”… http://bit.ly/Ps3uSS

On Wed, Feb 18, 2015 at 11:04 AM, Brian Hatfield bmhatfield@gmail.com
wrote:

I actually JUST had this problem!

If you’re using chef before 11.18.6 on Ubuntu > 12.04, upgrade chef -
there’s a guard since added to Ohai that fixes this issue.

Here’s what the older version looks like:
https://github.com/chef/ohai/blob/7.0.2/lib/ohai/plugins/linux/virtualization.rb#L130-L156

And here’s the more recent fixed version:
https://github.com/chef/ohai/blob/7.4.0/lib/ohai/plugins/linux/virtualization.rb#L153-L190

Brian

On Wed, Feb 18, 2015 at 1:27 PM, Douglas Garstang <
doug.garstang@gmail.com> wrote:

This is mighty strange, and something I haven’t seen before. With a
recent cookbook, node[:virtualization][:system] as reported by ohai is
coming up as ‘lxc’ on AWS EC2 instances when the chef-client first runs. It
should be ‘xen’.

However, when chef runs again, it returns ‘xen’, and every attempt I’ve
made to look at it with ohai (even before the chef client starts) shows
’xen’.

What’s up with that?

Doug


#7

On Wed, Feb 18, 2015 at 1:27 PM, Douglas Garstang doug.garstang@gmail.com
wrote:

This is mighty strange, and something I haven’t seen before. With a recent
cookbook, node[:virtualization][:system] as reported by ohai is coming up
as ‘lxc’ on AWS EC2 instances when the chef-client first runs. It should be
’xen’.

However, when chef runs again, it returns ‘xen’, and every attempt I’ve
made to look at it with ohai (even before the chef client starts) shows
’xen’.

Doug, what version of Ohai and Chef are you using?