Skip to content

Commit

Permalink
Run slurm sync script as root user and run network storage function
Browse files Browse the repository at this point in the history
after redeployment
  • Loading branch information
harshthakkar01 committed May 2, 2024
1 parent c849346 commit 983fdab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ansible/roles/slurmcmd/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
src: slurmcmd.service.j2
dest: /usr/lib/systemd/system/slurmcmd.service
vars:
service_user: '{{slurm_user.user}}'
service_user: "root"
service_path: '{{slurm_paths.scripts}}'

- name: Install Timer
Expand Down
6 changes: 6 additions & 0 deletions scripts/slurmsync.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,11 @@ def read_hash(filename):
return file.readline()


def setup_network_storage2():
from setup import setup_network_storage
setup_network_storage()


def save_hash(filename, hash):
with open(filename, "w+", encoding="utf-8") as file:
file.write(hash)
Expand Down Expand Up @@ -484,6 +489,7 @@ def reconfigure_slurm():
run("systemctl restart slurmd")
util.run(f"wall '{update_msg}'", timeout=30)
log.debug("Done.")
setup_network_storage2()


def main():
Expand Down

0 comments on commit 983fdab

Please sign in to comment.