Skip to content

Commit

Permalink
Merge pull request #13 from redBorder/development
Browse files Browse the repository at this point in the history
release 0.1.5
  • Loading branch information
davidredborder authored Oct 1, 2024
2 parents cdc0417 + 2de6391 commit abf26cd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.4
0.1.5
9 changes: 6 additions & 3 deletions resources/scripts/rb_check_cgroups.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ module RedBorder
# Module to check if cgroups need to be reassigned
module Checker
def self.check_memservices_cgroups
active_memory_services.all? do |s|
is_config_ok = true
active_memory_services.each do |s|
next if s.include? "chef-client"
cgroup = `systemctl show -p ControlGroup #{s}`.gsub('ControlGroup=', '').chomp
s = s.delete('\",-').chomp
# every assigned cgroup should cointain redborder-....slice any else false
cgroup.include?("redborder-#{s}.slice")
is_config_ok = false if !cgroup.include?("redborder-#{s}.slice")
end
exit(1) unless is_config_ok
end

def self.hostname
Expand All @@ -30,4 +33,4 @@ def self.active_memory_services
end
end

RedBorder::Checker.check_memservices_cgroups
RedBorder::Checker.check_memservices_cgroups

0 comments on commit abf26cd

Please sign in to comment.