From 6878325a780decbe69e25844336309fe53ac2223 Mon Sep 17 00:00:00 2001 From: Patrik Holmqvist Date: Tue, 7 Jan 2025 13:27:03 +0100 Subject: [PATCH 1/4] Prevent backup from failing if PRESCHEDULECMD fails. We noticed that the backup failed on all nodes with TBMR generating these errors: 2025-01-01 01:06:53 ANS1902E The PRESCHEDULECMD command failed. The scheduled event will not be executed. 2025-01-01 01:06:53 ANS1512E Scheduled event 'FILE_0200' failed. Return code = 12. This was due to the fact that the TBMR license had expired. So this change will prevent the backup from failing when there is an issue with TBMR. This is now the recomended way in the SafeSpring docs: https://docs.safespring.com/backup/recovery/linux-recovery/ --- templates/baas2/dsm.sys.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/baas2/dsm.sys.erb b/templates/baas2/dsm.sys.erb index c86bbd09d..f69a02e43 100644 --- a/templates/baas2/dsm.sys.erb +++ b/templates/baas2/dsm.sys.erb @@ -75,5 +75,5 @@ SERVERNAME SafeDC <% if @install_tbmr -%> * Collect TBMR information before doing the backup -PRESCHEDULECMD '"/usr/bin/tbmrcfg"' +PRESCHEDULECMD '"/usr/bin/tbmrcfg" 1> tbmr.log 2>&1 || (exit 0)' <% end -%> From e4fa80fc2223eafefc08f2b5502b455a95f47558 Mon Sep 17 00:00:00 2001 From: Patrik Holmqvist Date: Tue, 7 Jan 2025 13:44:05 +0100 Subject: [PATCH 2/4] Update to new recommended TBMR version --- manifests/baas2.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifests/baas2.pp b/manifests/baas2.pp index 80d37d982..873f1a007 100644 --- a/manifests/baas2.pp +++ b/manifests/baas2.pp @@ -37,8 +37,8 @@ Array[String] $backup_dirs = [], Array[String] $exclude_list = [], Boolean $install_tbmr=false, - String $tbmr_version='9.5.2.3206-1', - String $tbmr_url='https://s3.sto1.safedc.net/94f5b4f4aa674782b6bc4181943e67f1:tbmr/wab0snk8lrh6l8cjzgnaozm8siw7g7/tbmr_9.5.2.3206-1_amd64.deb', + String $tbmr_version='9.6.3.3418-1', + String $tbmr_url='https://s3.sto1.safedc.net/94f5b4f4aa674782b6bc4181943e67f1:tbmr/wab0snk8lrh6l8cjzgnaozm8siw7g7/tbmr_9.6.3.3418-1_amd64.deb', ) { # MUST be set properly in hiera to continue From 52303444c003babe25088ac4ee4c69eb917683cc Mon Sep 17 00:00:00 2001 From: Patrik Holmqvist Date: Tue, 7 Jan 2025 14:28:45 +0100 Subject: [PATCH 3/4] Use the tbmr_version variable in the download URL. Makes it easier so you do not have to remember to update in 2 places. --- manifests/baas2.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/baas2.pp b/manifests/baas2.pp index 873f1a007..67046f01a 100644 --- a/manifests/baas2.pp +++ b/manifests/baas2.pp @@ -38,7 +38,7 @@ Array[String] $exclude_list = [], Boolean $install_tbmr=false, String $tbmr_version='9.6.3.3418-1', - String $tbmr_url='https://s3.sto1.safedc.net/94f5b4f4aa674782b6bc4181943e67f1:tbmr/wab0snk8lrh6l8cjzgnaozm8siw7g7/tbmr_9.6.3.3418-1_amd64.deb', + String $tbmr_url='https://s3.sto1.safedc.net/94f5b4f4aa674782b6bc4181943e67f1:tbmr/wab0snk8lrh6l8cjzgnaozm8siw7g7/tbmr_${tbmr_version}_amd64.deb', ) { # MUST be set properly in hiera to continue From 7ae95902b785dce3106ce385fcd0d7e8a43b04c6 Mon Sep 17 00:00:00 2001 From: Patrik Holmqvist Date: Tue, 7 Jan 2025 14:32:45 +0100 Subject: [PATCH 4/4] Need to use the right fnutts for variable expansion... --- manifests/baas2.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/baas2.pp b/manifests/baas2.pp index 67046f01a..5587b7201 100644 --- a/manifests/baas2.pp +++ b/manifests/baas2.pp @@ -38,7 +38,7 @@ Array[String] $exclude_list = [], Boolean $install_tbmr=false, String $tbmr_version='9.6.3.3418-1', - String $tbmr_url='https://s3.sto1.safedc.net/94f5b4f4aa674782b6bc4181943e67f1:tbmr/wab0snk8lrh6l8cjzgnaozm8siw7g7/tbmr_${tbmr_version}_amd64.deb', + String $tbmr_url="https://s3.sto1.safedc.net/94f5b4f4aa674782b6bc4181943e67f1:tbmr/wab0snk8lrh6l8cjzgnaozm8siw7g7/tbmr_${tbmr_version}_amd64.deb", ) { # MUST be set properly in hiera to continue