You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by di...@apache.org on 2026/10/01 03:34:57 UTC

(airavata) 01/02: Creating workdir before submitting the job

This is an automated email from the ASF dual-hosted git repository.

DImuthuUpe pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata.git

commit 7713b793d66d2e75a1a7c004f831b4b27dc3372e
Author: DImuthuUpe <di...@gmail.com>
AuthorDate: Wed Sep 30 23:34:19 2026 -0400

    Creating workdir before submitting the job
---
 internal/orchestration/batch.go | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/internal/orchestration/batch.go b/internal/orchestration/batch.go
index 6bbd04dfa0..5675f4f931 100644
--- a/internal/orchestration/batch.go
+++ b/internal/orchestration/batch.go
@@ -87,6 +87,14 @@ func (a *ExecutionEngine) submitBatchJob(ctx context.Context, executionContext *
 		return nil, err
 	}
 
+	slog.Info("Creating job working directory through SSH", "taskId", taskID, "processId", processID, "destinationDirectory", *jst.WorkingDir)
+	if err := CreateDirectorySSH(ctx, clusterConfig.SlurmCluster.HeadnodeHost, clusterConfig.SlurmCluster.HeadnodePort,
+		clusterConfig.LoginUser, *clusterConfig.SSHKey, *jst.WorkingDir); err != nil {
+		slog.Error("Failed to create destination directory through SSH", "taskId", taskID, "processId", processID,
+			"destinationDirectory", *jst.WorkingDir, "error", err)
+		return nil, err
+	}
+
 	scriptUploadPath := path.Join(*jst.WorkingDir, "script.slurm")
 	slog.Info("Uploading slurm script to cluster", "taskId", taskID, "processId", processID, "scriptPath", scriptPath, "remotePath", scriptUploadPath)
 	if err := UploadFileToSCP(ctx, clusterConfig.SlurmCluster.HeadnodeHost,