class OpenShift::Utils::Cgroups

Public Class Methods

disable_cgroups(uuid) click to toggle source
# File lib/openshift-origin-node/utils/cgroups.rb, line 15
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 20
def self.enable_cgroups(uuid)
  OpenShift::Utils::oo_spawn("oo-admin-ctl-cgroups startuser #{uuid}",
                             expected_exitstatus: 0)
end
with_cgroups_disabled(uuid) { || ... } click to toggle source
# File lib/openshift-origin-node/utils/cgroups.rb, line 6
def self.with_cgroups_disabled(uuid)
  begin
    disable_cgroups(uuid)
    yield
  ensure
    enable_cgroups(uuid)
  end
end