Skip to content

Commit

Permalink
revert to using run_local to launch scripts
Browse files Browse the repository at this point in the history
Required-githooks: true
Skipped-githooks: flake,pylint

Signed-off-by: Maureen Jean <[email protected]>
  • Loading branch information
mjean308 committed Oct 5, 2024
1 parent 54cac75 commit 339672c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
5 changes: 4 additions & 1 deletion src/tests/ftest/util/soak_test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def pre_tear_down(self):
"""
self.log.info("<<preTearDown Started>> at %s", time.ctime())
errors = []
# clear out any jobs in squeue;
# clear out any jobs in squeue or jobscripts still in progress;

Check warning on line 139 in src/tests/ftest/util/soak_test_base.py

View workflow job for this annotation

GitHub Actions / Pylint check

wrong-spelling-in-comment, Wrong spelling of a word 'jobscripts' in a comment:
if self.failed_job_id_list and self.job_scheduler == "slurm":
job_id = " ".join([str(job) for job in self.failed_job_id_list])
self.log.info("<<Cancel jobs in queue with ids %s >>", job_id)
Expand All @@ -145,6 +145,9 @@ def pre_tear_down(self):
if not run_local(self.log, cmd, timeout=120).passed:
# Exception was raised due to a non-zero exit status
errors.append(f"Failed to cancel jobs {self.failed_job_id_list}")
elif self.job_scheduler != "slurm":
cmd = "pkill jobscript"
run_remote(self.log, self.hostlist_clients, cmd)
if self.all_failed_jobs:
errors.append("SOAK FAILED: The following jobs failed {} ".format(
" ,".join(str(j_id) for j_id in self.all_failed_jobs)))
Expand Down
16 changes: 8 additions & 8 deletions src/tests/ftest/util/soak_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,14 +454,14 @@ def launch_jobscript(
joblog = job_log1.replace("RHOST", str(rhost))
errorlog = error_log1.replace("RHOST", str(rhost))
cmd = ";".join([env, f"{script} {hosts} {job_id} {joblog} {errorlog}"])
# if "_fio_" in job_log:
# job_results = run_remote(
# log, rhost, cmd, verbose=False, timeout=timeout * 60, task_debug=False, stderr=False)
# else:
# job_results = run_local(
# log, cmd, verbose=False, timeout=timeout * 60, capture_output=False, stderr=False)
job_results = run_remote(
log, rhost, cmd, verbose=False, timeout=timeout * 60, task_debug=False, stderr=False)
if "_fio_" in job_log:
job_results = run_remote(
log, rhost, cmd, verbose=False, timeout=timeout * 60, task_debug=False, stderr=False)
else:
job_results = run_local(
log, cmd, verbose=False, timeout=timeout * 60, capture_output=False, stderr=False)
# job_results = run_remote(
# log, rhost, cmd, verbose=False, timeout=timeout * 60, task_debug=False, stderr=False)
if job_results:
if job_results.timeout:
state = "TIMEOUT"
Expand Down

0 comments on commit 339672c

Please sign in to comment.