diff --git a/VERSION b/VERSION index 845639e..9faa1b7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.4 +0.1.5 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