Skip to content

Commit d2d8a21

Browse files
Progress for slurmrest integration
1 parent f0ac693 commit d2d8a21

File tree

4 files changed

+447
-6
lines changed

4 files changed

+447
-6
lines changed

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ RUN printf "deb http://ftp.us.debian.org/debian buster main" > /etc/apt/sources.
4343
apt-get update && apt-get install libreadline7 && \
4444
rm -rf /var/lib/apt/lists/*
4545

46+
# SSH support to run commands on slurmctld using ssh
47+
RUN mkdir -p ./ssh-keys
48+
RUN ssh-keygen -t ed25519 -f ./ssh-keys/id_ed25519 -N "" -y
49+
RUN echo "Generated SSH KEY"
50+
4651
EXPOSE 80
4752
EXPOSE 25
4853

coldfront/plugins/slurm/associations.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
slurm_fixed_width_lines_to_dict,
2929
SlurmError,
3030
)
31-
31+
from coldfront.plugins.slurm.integrations import SlurmError, get_cluster_connection
3232

3333
logger = logging.getLogger(__name__)
3434

@@ -226,7 +226,7 @@ def create_allocation_attributes(project, justification, quantity, resource):
226226
)
227227
return new_allocation
228228

229-
partitions = slurm_list_partitions()
229+
partitions = get_cluster_connection(self.name).list_partitions()
230230
current_cluster_resource = Resource.objects.filter(
231231
resourceattribute__value=self.name, resource_type__name='Cluster').first()
232232
if not current_cluster_resource:
@@ -281,7 +281,7 @@ def map_shares(share_info):
281281
}
282282

283283
if not file:
284-
share_info = slurm_collect_shares(cluster=self.name)
284+
share_info = get_cluster_connection(self.name).collect_shares()
285285
else:
286286
with open(file, 'r') as share_file:
287287
share_data = list(share_file)

0 commit comments

Comments
 (0)