Parent

OpenShift::Utils::Cgroups

Public Class Methods

disable_cgroups(uuid) click to toggle source
# File lib/openshift-origin-node/utils/cgroups.rb, line 76
def self.disable_cgroups(uuid)
  OpenShift::Utils::oo_spawn("oo-admin-ctl-cgroups stopuser #{uuid}",
                             expected_exitstatus: 0)
end
enable_cgroups(uuid) click to toggle source
# File lib/openshift-origin-node/utils/cgroups.rb, line 81
def self.enable_cgroups(uuid)
  OpenShift::Utils::oo_spawn("oo-admin-ctl-cgroups startuser #{uuid}",
                             expected_exitstatus: 0)
end
with_no_cpu_limits(uuid) click to toggle source
# File lib/openshift-origin-node/utils/cgroups.rb, line 63
def self.with_no_cpu_limits(uuid)
  param = "cpu.cfs_quota_us"
  attrs = Attrs.new(uuid)
  full_cpu = attrs["cpu.cfs_period_us"]
  oldlimit = attrs[param]
  begin
    attrs[param]=full_cpu
    yield
  ensure
    attrs[param]=oldlimit
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.