From 956c7d19fd80f41aa2b92a69a55d99310c101368 Mon Sep 17 00:00:00 2001 From: abbas1902 Date: Thu, 20 Feb 2025 00:52:44 +0000 Subject: [PATCH] Revert "Remove unused MD5s from config" This reverts commit b67fb68e489425bdd6b6810a9f5360aa0a34dda3. --- .../modules/slurm_files/main.tf | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/community/modules/scheduler/schedmd-slurm-gcp-v6-controller/modules/slurm_files/main.tf b/community/modules/scheduler/schedmd-slurm-gcp-v6-controller/modules/slurm_files/main.tf index 5a8f5c4b82..7783258299 100644 --- a/community/modules/scheduler/schedmd-slurm-gcp-v6-controller/modules/slurm_files/main.tf +++ b/community/modules/scheduler/schedmd-slurm-gcp-v6-controller/modules/slurm_files/main.tf @@ -40,6 +40,8 @@ resource "random_uuid" "cluster_id" { ################## locals { + tp = "${local.bucket_dir}/" # prefix to trim from the bucket path to get a "file name" + config = { enable_bigquery_load = var.enable_bigquery_load cloudsql_secret = var.cloudsql_secret @@ -84,6 +86,29 @@ locals { # Providers endpoint_versions = var.endpoint_versions + + # Extra-files MD5 hashes + # Makes config file creation depend on the files + # Allows for informed updates & checks on slurmsync side + slurm_gcp_scripts_md5 = google_storage_bucket_object.devel.md5hash, + controller_startup_scripts_md5 = { + for o in values(google_storage_bucket_object.controller_startup_scripts) : trimprefix(o.name, local.tp) => o.md5hash + } + compute_startup_scripts_md5 = { + for o in values(google_storage_bucket_object.compute_startup_scripts) : trimprefix(o.name, local.tp) => o.md5hash + } + nodeset_startup_scripts_md5 = { + for o in values(google_storage_bucket_object.nodeset_startup_scripts) : trimprefix(o.name, local.tp) => o.md5hash + } + login_startup_scripts_md5 = { + for o in values(google_storage_bucket_object.login_startup_scripts) : trimprefix(o.name, local.tp) => o.md5hash + } + prolog_scripts_md5 = { + for o in values(google_storage_bucket_object.prolog_scripts) : trimprefix(o.name, local.tp) => o.md5hash + } + epilog_scripts_md5 = { + for o in values(google_storage_bucket_object.epilog_scripts) : trimprefix(o.name, local.tp) => o.md5hash + } } x_nodeset = toset(var.nodeset[*].nodeset_name)