Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Blocker
-
Resolution: Unresolved
-
Affects Version/s: 0.6.8, 0.6.10, 6.14.0, 6.16.0
-
Fix Version/s: None
-
Labels:
-
Environment:
Windows Server 2008 R2 or Windows 7 or Windows XP Pro 2002 SP3
Ruby 1.9.2 or 1.9.3 (RubyInstaller + DevKit)
Description
Ohai does not return a platform_version when running under Windows Ruby 1.9. The short story is the latest version (2.4.0) of 'systemu' is broken on Windows Ruby 1.9:
C:\Ruby192\bin>irb irb(main):001:0> require 'systemu' => true irb(main):002:0> systemu('ruby --version') RuntimeError: wtf? o:↕ArgumentError: mesg"∟dump format error(0x67):bt[I"rC:/Users/ADMINI~1/Ap pData/Local/Temp/2/systemu_ip-0ADC899B_2824_1916_0.8916156963740122_1/program:3: in `load'♠: encoding"♂IBM437I"tC:/Users/ADMINI~1/AppData/Local/Temp/2/systemu_ip-0ADC899B_28 24_1916_0.8916156963740122_1/program:3:in `<main>'♠@ from C:/Ruby192/lib/ruby/gems/1.9.1/gems/systemu-2.4.0/lib/systemu.rb:88 :in `rescue in block (3 levels) in systemu' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/systemu-2.4.0/lib/systemu.rb:81 :in `block (3 levels) in systemu' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/systemu-2.4.0/lib/systemu.rb:75 :in `popen' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/systemu-2.4.0/lib/systemu.rb:75 :in `block (2 levels) in systemu' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/systemu-2.4.0/lib/systemu.rb:16 7:in `quietly' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/systemu-2.4.0/lib/systemu.rb:74 :in `block in systemu' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/systemu-2.4.0/lib/systemu.rb:23 3:in `call' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/systemu-2.4.0/lib/systemu.rb:23 3:in `block in tmpdir' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/systemu-2.4.0/lib/systemu.rb:21 8:in `loop' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/systemu-2.4.0/lib/systemu.rb:21 8:in `tmpdir' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/systemu-2.4.0/lib/systemu.rb:67 :in `systemu' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/systemu-2.4.0/lib/systemu.rb:9: in `systemu' from (irb):2 from C:/Ruby192/bin/irb:12:in `<main>'
This causes any Ohai plugin that 'shell outs' to fail. The worst of these failures stops the windows::kernel plugin from loading and many required attributes (namely kernel[:release]) are not set.
The short-term fix is to downgrade (and peg) the last known working version of systemu (2.2.0) required by Ohai.
Fix can be pulled from:
https://github.com/schisamo/ohai/tree/OHAI-306