GoogleCloudPlatform / slurm-gcp

Apache License 2.0
26 stars 20 forks source link

Prolog/Epilog Broken in HPCToolkit v1.35.0 #171

Closed tfhartmann closed 3 months ago

tfhartmann commented 3 months ago

Hi folks, I believe this commit broke the ability to add Prolog/Epilog scripts in HPCToolkit in v1.35.0.

After upgrade I see this error:

Initializing deployment group deployment/cluster01-poc/primary
Testing if deployment group deployment/cluster01-poc/primary requires adding or changing cloud infrastructure
Error: exit status 1

Error: Missing map element

  on .terraform/modules/slurm_controller.slurm_files/terraform/slurm_cluster/modules/slurm_files/main.tf line 234, in resource "google_storage_bucket_object" "prolog_scripts":
 234:   source  = each.value.source
    ├────────────────
    │ each.value is map of string with 2 elements

This map does not have an element with the key "source".

Error: Missing map element

  on .terraform/modules/slurm_controller.slurm_files/terraform/slurm_cluster/modules/slurm_files/main.tf line 246, in resource "google_storage_bucket_object" "epilog_scripts":
 246:   source  = each.value.source
    ├────────────────
    │ each.value is map of string with 2 elements

This map does not have an element with the key "source".

Hint: terraform plan for deployment group deployment/cluster01-poc/primary failed

when passing this script using the content argument

          prolog_scripts:
            - filename: "podman-prolog.bash"
              content: |
                #!/bin/bash
                loginctl enable-linger $SLURM_JOB_USER

switching to source doesn't work, as the terraform errors out claiming that content is a required argument.

mr0re1 commented 3 months ago

@tfhartmann thank you for reporting!

I'm working on the fix.

mr0re1 commented 3 months ago

@tfhartmann you can use develop version of toolkit, if you're blocked.

tfhartmann commented 3 months ago

@tfhartmann you can use develop version of toolkit, if you're blocked.

Cool! I'll give that a try! I was able to use the v1.34.3 versions of the modules as a work around, but I'd defiantly prefer to keep using the new hotness :)

mr0re1 commented 3 months ago

Hi @tfhartmann , we released hpc-toolkit v1.35.1 with fix. Closing this issue, please feel free to re-open.