Skip to content
Snippets Groups Projects
Commit 47ac3915 authored by Moe Jette's avatar Moe Jette
Browse files

move slurmstepd _reclaim_privileges() so that it gets called for batch jobs

   otherwise a batch job is unable to create an sgi_jobs container for the
   proctrack/sgi_jobs plugin
parent 2937b833
No related branches found
No related tags found
No related merge requests found
...@@ -461,19 +461,22 @@ _setup_normal_io(slurmd_job_t *job) ...@@ -461,19 +461,22 @@ _setup_normal_io(slurmd_job_t *job)
} }
} }
if (_reclaim_privileges(&sprivs) < 0)
error("sete{u/g}id(%lu/%lu): %m",
(u_long) sprivs.saved_uid, (u_long) sprivs.saved_gid);
rc = io_initial_client_connect(srun, job, srun_stdout_tasks, rc = io_initial_client_connect(srun, job, srun_stdout_tasks,
srun_stderr_tasks); srun_stderr_tasks);
if (rc < 0) if (rc < 0)
return ESLURMD_IO_ERROR; return ESLURMD_IO_ERROR;
} }
if (!job->batch) if (_reclaim_privileges(&sprivs) < 0) {
error("sete{u/g}id(%lu/%lu): %m",
(u_long) sprivs.saved_uid, (u_long) sprivs.saved_gid);
}
if (!job->batch) {
if (io_thread_start(job) < 0) if (io_thread_start(job) < 0)
return ESLURMD_IO_ERROR; return ESLURMD_IO_ERROR;
}
debug2("Leaving _setup_normal_io"); debug2("Leaving _setup_normal_io");
return SLURM_SUCCESS; return SLURM_SUCCESS;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment