From f64763bc20d7d302cbb7399cfc90efb5f6c1ced4 Mon Sep 17 00:00:00 2001 From: Miguel Alvarez Date: Wed, 25 Sep 2024 10:41:06 +0100 Subject: [PATCH 1/2] Correctly check cgroup configuration --- resources/scripts/rb_check_cgroups.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/resources/scripts/rb_check_cgroups.rb b/resources/scripts/rb_check_cgroups.rb index 75f860e..fade8b5 100644 --- a/resources/scripts/rb_check_cgroups.rb +++ b/resources/scripts/rb_check_cgroups.rb @@ -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 @@ -30,4 +33,4 @@ def self.active_memory_services end end -RedBorder::Checker.check_memservices_cgroups +RedBorder::Checker.check_memservices_cgroups \ No newline at end of file From 2de6391614200945b15a3e7f4060ce9cd784571b Mon Sep 17 00:00:00 2001 From: David Vanhoucke Date: Tue, 1 Oct 2024 13:32:29 +0100 Subject: [PATCH 2/2] bump version to 0.1.5 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 845639e..9faa1b7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.4 +0.1.5