From f820cdb5db860cab588071515f4de8b8ab8a661b Mon Sep 17 00:00:00 2001 From: Luis Blanco Date: Mon, 29 Apr 2024 16:23:13 +0100 Subject: [PATCH 1/5] added chef to gemfile --- Gemfile | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 Gemfile diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..5599072 --- /dev/null +++ b/Gemfile @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +source 'http://geminabox.redborder.com' + +gem 'chef', '>= 17.10.0' From d9d306f2b3feb9878fad54a88667316f171826c8 Mon Sep 17 00:00:00 2001 From: Luis Blanco Date: Mon, 29 Apr 2024 16:24:44 +0100 Subject: [PATCH 2/5] ignore gemfile lock --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 273ce02..9cafcf7 100644 --- a/.gitignore +++ b/.gitignore @@ -59,3 +59,4 @@ build-iPhoneSimulator/ # Used by RuboCop. Remote config files pulled in from inherit_from directive. # .rubocop-https?--* +Gemfile.lock From 7644e4fc4e394a8023a4ef2f876f12acb5438134 Mon Sep 17 00:00:00 2001 From: Luis Blanco Date: Tue, 30 Apr 2024 16:27:12 +0100 Subject: [PATCH 3/5] Removed last dependency with chef, instead of creating a new one --- Gemfile | 5 ----- resources/scripts/rb_check_cgroups.rb | 6 ++---- 2 files changed, 2 insertions(+), 9 deletions(-) delete mode 100644 Gemfile diff --git a/Gemfile b/Gemfile deleted file mode 100644 index 5599072..0000000 --- a/Gemfile +++ /dev/null @@ -1,5 +0,0 @@ -# frozen_string_literal: true - -source 'http://geminabox.redborder.com' - -gem 'chef', '>= 17.10.0' diff --git a/resources/scripts/rb_check_cgroups.rb b/resources/scripts/rb_check_cgroups.rb index 1f31f0b..6de80ec 100644 --- a/resources/scripts/rb_check_cgroups.rb +++ b/resources/scripts/rb_check_cgroups.rb @@ -2,23 +2,21 @@ # frozen_string_literal: true require 'socket' -require 'chef' # Module to interact with Cgroup v2 in an easy way module RedBorder # Module to check if cgroups need to be reassigned module Checker def self.check_memservices_cgroups - Chef::Log.info('Memservices Check') active_memory_services.all? do |s| 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") + cgroup.include?("redborder-#{s}.slice") end end - def self.hostname + def self.hostname `hostname -s`.strip end From 1cc204e7bfae90b0b424e5e6f0f4d13c976d0ed0 Mon Sep 17 00:00:00 2001 From: Luis Blanco Date: Thu, 2 May 2024 10:00:55 +0100 Subject: [PATCH 4/5] remove unused gem --- resources/scripts/rb_check_cgroups.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/resources/scripts/rb_check_cgroups.rb b/resources/scripts/rb_check_cgroups.rb index 6de80ec..9ffe947 100644 --- a/resources/scripts/rb_check_cgroups.rb +++ b/resources/scripts/rb_check_cgroups.rb @@ -1,8 +1,6 @@ #!/usr/bin/env ruby # frozen_string_literal: true -require 'socket' - # Module to interact with Cgroup v2 in an easy way module RedBorder # Module to check if cgroups need to be reassigned From 874020a3df72185ea920c6ca7f4f7389db462466 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81lvarez?= <128592227+malvads@users.noreply.github.com> Date: Mon, 6 May 2024 12:50:21 +0100 Subject: [PATCH 5/5] Update VERSION --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index d917d3e..b1e80bb 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.2 +0.1.3