Bug #2044

problems with virtual.rb on RHEL4

Added by Waldemar Brodkorb about 3 years ago. Updated about 3 years ago.

Status:Closed Start date:03/03/2009
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:library
Target version:1.5.5
Keywords:virtual xen proc capabilities puppetd hangs after trigger Affected Facter version:
Branch:
Votes: 0

Description

Hi,

I have a problem with facter 1.5.2 under Red Hat 4 ES/AS (Xen guests). When I trigger a configuration run via puppetrun, puppetd hangs after reading /proc/xen/capabilities. It does not happen on RHEL5 or real hardware.

Problem is similar to this bug report: http://fossplanet.com/sysutils.puppet.devel/thread-1849839-hangs/

Solution is similar, too: diff -Nur facter-1.5.2.orig/lib/facter/virtual.rb facter-1.5.2/lib/facter/virtual.rb —– facter-1.5.2.orig/lib/facter/virtual.rb 2008-09-09 05:00:03.000000000 +0200 +++ facter-1.5.2/lib/facter/virtual.rb 2009-03-03 12:55:43.000000000 +0100 @@ -1,4 +1,5 @@ Facter.add(“virtual”) do + require ‘thread’ confine :kernel => %w{Linux FreeBSD OpenBSD}

ENV[“PATH”]=“/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:/usr/local/bin” @@ -11,12 +12,14 @@

   result = "openvz"
 end
  • if FileTest.exists?(“/proc/xen/capabilities”) && FileTest.readable?(“/proc/xen/capabilities”)
  • txt = File.read(“/proc/xen/capabilities”)
  • if txt =~ /control_d/i
  •  result = "xen0"
    
  • else
  •  result = "xenu" 
    
  • Thread::exclusive do
  • if FileTest.exists?(“/proc/xen/capabilities”) && FileTest.readable?(“/proc/xen/capabilities”)
  •  txt = File.read("/proc/xen/capabilities")
    
  •  if txt =~ /control_d/i
    
  •    result = "xen0"
    
  •  else
    
  •    result = "xenu" 
    
  •  end
    

    end end

Have fun Waldemar

History

Updated by James Turnbull about 3 years ago

  • Status changed from Unreviewed to Closed
  • Target version changed from 1.5.2 to 1.6.0

Pushed in commit:9376e5bf883dc9460a4e19c7952c7c996f43e0e3 in branch 0.24.x

Updated by James Turnbull about 3 years ago

  • Target version changed from 1.6.0 to 1.5.5

Also available in: Atom PDF