Class: RightScale::LinuxBlockDevice

Inherits:
Object
  • Object
show all
Defined in:
lib/chef/plugins.rb

Overview

Preload content of /sys/block to avoid deadlocks when loading from a different thread (issue with async IO and sysfs):

  • File.read(‘/sys/block/…’) will hang if run in a multithread ruby process because it will use async IO

  • ‘cat /sys/block/…` will deadlock with the uptime command ran from agents’s hearbeat callback

Constant Summary collapse

@@info =
Hash.new

Class Method Summary collapse

Class Method Details

.infoObject



52
53
54
# File 'lib/chef/plugins.rb', line 52

def self.info
  @@info
end