From 5badfd1c2ce7515626c728ec90e88207fb9a553e Mon Sep 17 00:00:00 2001 From: Stefano Alberto Russo <stefano.russo@gmail.com> Date: Sat, 7 Oct 2023 13:12:41 +0200 Subject: [PATCH] Fixed unhandled port for stopping tasks via SSH on Slurm cluster computing resources. --- services/webapp/code/rosetta/core_app/computing_managers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/webapp/code/rosetta/core_app/computing_managers.py b/services/webapp/code/rosetta/core_app/computing_managers.py index 011ef8d..493c732 100644 --- a/services/webapp/code/rosetta/core_app/computing_managers.py +++ b/services/webapp/code/rosetta/core_app/computing_managers.py @@ -571,7 +571,7 @@ class SlurmSSHClusterComputingManager(ClusterComputingManager, SSHComputingManag computing_user, computing_host, computing_port, computing_keys = get_ssh_access_mode_credentials(self.computing, task.user) # Stop the task remotely - stop_command = 'ssh -o LogLevel=ERROR -i {} -4 -o StrictHostKeyChecking=no {}@{} \'/bin/bash -c "scancel {}"\''.format(computing_keys.private_key_file, computing_user, computing_host, task.id) + stop_command = 'ssh -o -p {} LogLevel=ERROR -i {} -4 -o StrictHostKeyChecking=no {}@{} \'/bin/bash -c "scancel {}"\''.format(computing_port, computing_keys.private_key_file, computing_user, computing_host, task.id) out = os_shell(stop_command, capture=True) if out.exit_code != 0: raise Exception(out.stderr) -- GitLab