From 46b546a031dd75205efd6b89660723d70f498b92 Mon Sep 17 00:00:00 2001 From: Stefano Alberto Russo <stefano.russo@gmail.com> Date: Thu, 8 Apr 2021 23:04:55 +0200 Subject: [PATCH] Moved form "master" to "host" for Slurm+SSH access method conf. --- services/webapp/code/rosetta/core_app/api.py | 10 ---------- .../webapp/code/rosetta/core_app/computing_managers.py | 6 +++--- .../core_app/management/commands/core_app_populate.py | 2 +- 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/services/webapp/code/rosetta/core_app/api.py b/services/webapp/code/rosetta/core_app/api.py index 591b7b3..3add43a 100644 --- a/services/webapp/code/rosetta/core_app/api.py +++ b/services/webapp/code/rosetta/core_app/api.py @@ -373,11 +373,6 @@ class FileManagerAPI(PrivateGETAPI, PrivatePOSTAPI): # Get computing host computing_host = computing.conf.get('host') - - # Trick for handling Slurm.. TODO: fix me! - if not computing_host: - computing_host = computing.conf.get('master') - computing_user = computing.conf.get('user') if not computing_host: @@ -405,11 +400,6 @@ class FileManagerAPI(PrivateGETAPI, PrivatePOSTAPI): # Get computing host computing_host = computing.conf.get('host') - - # Trick for handling Slurm.. TODO: fix me! - if not computing_host: - computing_host = computing.conf.get('master') - computing_user = computing.conf.get('user') if not computing_host: diff --git a/services/webapp/code/rosetta/core_app/computing_managers.py b/services/webapp/code/rosetta/core_app/computing_managers.py index 08cd271..a043601 100644 --- a/services/webapp/code/rosetta/core_app/computing_managers.py +++ b/services/webapp/code/rosetta/core_app/computing_managers.py @@ -323,7 +323,7 @@ class SlurmSSHClusterComputingManager(ClusterComputingManager, SSHComputingManag logger.debug('Starting a remote task "{}"'.format(self.computing)) # Get computing host - host = self.computing.conf.get('master') + host = self.computing.conf.get('host') user = self.computing.conf.get('user') # Get user keys @@ -448,7 +448,7 @@ class SlurmSSHClusterComputingManager(ClusterComputingManager, SSHComputingManag raise NotImplementedError('Remote tasks not requiring keys are not yet supported') # Get computing host - host = self.computing.conf.get('master') + host = self.computing.conf.get('host') user = self.computing.conf.get('user') # Stop the task remotely @@ -471,7 +471,7 @@ class SlurmSSHClusterComputingManager(ClusterComputingManager, SSHComputingManag raise NotImplementedError('Remote tasks not requiring keys are not yet supported') # Get computing host - host = self.computing.conf.get('master') + host = self.computing.conf.get('host') user = self.computing.conf.get('user') # View log remotely diff --git a/services/webapp/code/rosetta/core_app/management/commands/core_app_populate.py b/services/webapp/code/rosetta/core_app/management/commands/core_app_populate.py index 3d74c37..8cfdeb5 100644 --- a/services/webapp/code/rosetta/core_app/management/commands/core_app_populate.py +++ b/services/webapp/code/rosetta/core_app/management/commands/core_app_populate.py @@ -259,7 +259,7 @@ class Command(BaseCommand): # Create demo slurm sys computing conf ComputingSysConf.objects.create(computing = demo_slurm_computing, - data = {'master': 'slurmclustermaster-main', 'default_partition': 'partition1', + data = {'host': 'slurmclustermaster-main', 'default_partition': 'partition1', 'binds': '/shared/data/users:/shared/data/users,/shared/scratch:/shared/scratch'}) # Create demo slurm user computing conf -- GitLab