From 4c63f2a825f40bc0340ea61d9da6b4313ced006b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorsten=20M=C3=BCller?= Date: Tue, 6 Jul 2021 15:14:33 +0200 Subject: [PATCH] fix: slurm host system access --- cobald.yml | 1 + roles/slurm/tasks/host-config.yml | 4 ++++ roles/slurm/tasks/main.yml | 11 ++++------- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/cobald.yml b/cobald.yml index aae8866..f31b3ec 100644 --- a/cobald.yml +++ b/cobald.yml @@ -43,6 +43,7 @@ # containers runtime name (not hostname supplied!) and netname is # the network name in host environment. We should run our own dns... docker_network: slurm + slurm_hostsystem_cluster_access: True when: '"slurm" in group_names' tags: slurm, cobald, influxdb, slurm-config # tags: cobald requires some slurm facts, so cobald tag is included here diff --git a/roles/slurm/tasks/host-config.yml b/roles/slurm/tasks/host-config.yml index 7f8f192..68f749a 100644 --- a/roles/slurm/tasks/host-config.yml +++ b/roles/slurm/tasks/host-config.yml @@ -1,3 +1,6 @@ +# TODO: this does not work quite right since slurm-ctl does not reach the host +# system. sinfo, scontrol etc. work but srun does not! + - name: "get addresses from docker network" docker_network_info: name: "{{ docker_network }}" @@ -28,4 +31,5 @@ - name: start munge locally service: name: munge + enabled: True state: started diff --git a/roles/slurm/tasks/main.yml b/roles/slurm/tasks/main.yml index 003513e..f9ce939 100644 --- a/roles/slurm/tasks/main.yml +++ b/roles/slurm/tasks/main.yml @@ -92,18 +92,11 @@ notify: reconfigure slurm tags: slurm-config -- import_tasks: host-config.yml - when: slurm_hostsystem_cluster_access | default(False) - - name: "create docker volume for shared access between nodes" docker_volume: name: slurm-shared state: present -# TODO: reserve some address using docker_network_info and assign as aux -# address to enable slurmctld to get a static address in order to be -# reachable from slurm running on docker host to enable submitting jobs. - - name: run slurm docker containers docker_container: name: "{{ slurm_prefix }}-{{ item.machine }}" @@ -130,6 +123,10 @@ label: "{{slurm_prefix}}-{{ item.machine }}" tags: slurm-config +- name: configure host system to integrate into slurm cluster + import_tasks: host-config.yml + when: slurm_hostsystem_cluster_access | default(False) + - name: export facts about slurm cluster to be used by other modules set_fact: slurm: