From b4abc7afb58edaf1fa492b35774eb7492d7a3440 Mon Sep 17 00:00:00 2001 From: David Vanhoucke Date: Thu, 24 Oct 2024 15:39:31 +0100 Subject: [PATCH 1/5] execute add_mcli before installing and registering minio --- resources/recipes/configure.rb | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/resources/recipes/configure.rb b/resources/recipes/configure.rb index 269892fa..3da331bc 100644 --- a/resources/recipes/configure.rb +++ b/resources/recipes/configure.rb @@ -577,12 +577,11 @@ s3_secrets = {} -if manager_services['s3'] && (external_services['s3'] == 'onpremise') - begin - s3_secrets = data_bag_item('passwords', 's3') - rescue - s3_secrets = {} - end + +begin + s3_secrets = data_bag_item('passwords', 's3') +rescue + s3_secrets = {} end # Allow only s3 onpremise nodes for now.. @@ -592,9 +591,9 @@ secret_key_id s3_secrets['s3_secret_key_id'] if manager_services['s3'] && (external_services['s3'] == 'onpremise') ipaddress node['ipaddress_sync'] - action [:add, :register, :add_mcli] + action [:add_mcli, :add, :register] else - action [:remove, :deregister, :add_mcli] + action [:add_mcli, :remove, :deregister] end end From 019f35a6c268ea1f4b4e6ff8a53beb0c58211364 Mon Sep 17 00:00:00 2001 From: Juan Soto Date: Tue, 12 Nov 2024 12:20:18 +0000 Subject: [PATCH 2/5] Fix lint --- resources/metadata.rb | 2 ++ resources/recipes/configure.rb | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/metadata.rb b/resources/metadata.rb index 6b1bc099..9a941a4b 100644 --- a/resources/metadata.rb +++ b/resources/metadata.rb @@ -1,4 +1,6 @@ # frozen_string_literal: true +unified_mode true + name 'rb-manager' maintainer 'Eneo Tecnología S.L.' diff --git a/resources/recipes/configure.rb b/resources/recipes/configure.rb index 6165420e..eebb19b8 100644 --- a/resources/recipes/configure.rb +++ b/resources/recipes/configure.rb @@ -608,7 +608,6 @@ s3_secrets = {} - begin s3_secrets = data_bag_item('passwords', 's3') rescue @@ -682,7 +681,7 @@ # ....... # pending_changes==n -> chef-client has to run n times # -node.normal['redborder']['pending_changes'] = node['redborder']['pending_changes'] > 0 ? node.normal['redborder']['pending_changes'].to_i - 1 : 0 +node.override['redborder']['pending_changes'] = node['redborder']['pending_changes'] > 0 ? node.override['redborder']['pending_changes'].to_i - 1 : 0 execute 'force_chef_client_wakeup' do command '/usr/lib/redborder/bin/rb_wakeup_chef.sh' From e866d3b110a6953caf56c5f57aea59e8224a0689 Mon Sep 17 00:00:00 2001 From: Juan Soto Date: Wed, 13 Nov 2024 14:12:57 +0000 Subject: [PATCH 3/5] Delete unified mode --- resources/metadata.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/resources/metadata.rb b/resources/metadata.rb index 9a941a4b..6b1bc099 100644 --- a/resources/metadata.rb +++ b/resources/metadata.rb @@ -1,6 +1,4 @@ # frozen_string_literal: true -unified_mode true - name 'rb-manager' maintainer 'Eneo Tecnología S.L.' From 1c3a2b9dee68cc6e9b0a910cd8b145a094c9ed89 Mon Sep 17 00:00:00 2001 From: Juan Soto Date: Wed, 13 Nov 2024 14:21:37 +0000 Subject: [PATCH 4/5] Puts back node.normal --- resources/recipes/configure.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/recipes/configure.rb b/resources/recipes/configure.rb index eebb19b8..ad2ec621 100644 --- a/resources/recipes/configure.rb +++ b/resources/recipes/configure.rb @@ -681,7 +681,7 @@ # ....... # pending_changes==n -> chef-client has to run n times # -node.override['redborder']['pending_changes'] = node['redborder']['pending_changes'] > 0 ? node.override['redborder']['pending_changes'].to_i - 1 : 0 +node.normal['redborder']['pending_changes'] = node['redborder']['pending_changes'] > 0 ? node.normal['redborder']['pending_changes'].to_i - 1 : 0 execute 'force_chef_client_wakeup' do command '/usr/lib/redborder/bin/rb_wakeup_chef.sh' From 81c4f3a068306f4adb4340677a1d4c4ae816fcf9 Mon Sep 17 00:00:00 2001 From: Juan Soto Date: Wed, 13 Nov 2024 14:27:54 +0000 Subject: [PATCH 5/5] Release 4.6.0 --- CHANGELOG.md | 5 +++++ resources/metadata.rb | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c684f58..dbc4b3f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ cookbook-rb-manager CHANGELOG =============== +## 4.6.0 + + - David Vanhoucke + - [b4abc7a] execute add_mcli before installing and registering minio + ## 4.5.0 - Miguel Negrón diff --git a/resources/metadata.rb b/resources/metadata.rb index 5b798310..4c992d3d 100644 --- a/resources/metadata.rb +++ b/resources/metadata.rb @@ -5,7 +5,7 @@ maintainer_email 'git@redborder.com' license 'AGPL-3.0' description 'Installs/Configures redborder manager' -version '4.5.0' +version '4.6.0' depends 'rb-common' depends 'chef-server'