Related to the investigation for a user job mentioned in https://bugs.schedmd.com/show_bug.cgi?id=12245 and https://bugs.schedmd.com/show_bug.cgi?id=12266 On a 8 slurmd single node cluster, we have the following in epilog.sh: logger -s -t slurm-epilog "START user=$SLURM_JOB_USER job=$SLURM_JOB_ID node=$SLURMD_NODENAME" Consider the following run.sub: $ cat run_bug2.sub #!/bin/bash -eu #SBATCH -N8 echo initial allocation: ${SLURM_NNODES} ${SLURM_NODELIST} scontrol update jobid=${SLURM_JOBID} NumNodes=4 >/dev/null source ./slurm_job_${SLURM_JOBID}_resize.sh rm -f ./slurm_job_${SLURM_JOBID}_resize.{csh,sh} echo new allocation: ${SLURM_NNODES} ${SLURM_NODELIST} srun sleep 60s Here is an example output: $ cat slurm-439.out initial allocation: 8 node-[1-8] new allocation: 4 node-[1-4] But when shrinking the job to 4 nodes, the epilog is executed as if the job was owned by root: SLURM_JOB_USER=root SLURM_JOB_UID=0 SLURM_JOB_GID=0 The log is the following: ug 12 16:24:37 ioctl slurm-epilog[249772]: START user=root job=439 node=node-6 Aug 12 16:24:37 ioctl slurm-epilog[249771]: START user=root job=439 node=node-5 Aug 12 16:24:37 ioctl slurm-epilog[249773]: START user=root job=439 node=node-7 Aug 12 16:24:37 ioctl slurm-epilog[249775]: START user=root job=439 node=node-8 Aug 12 16:25:38 ioctl slurm-epilog[249915]: START user=fabecassis job=439 node=node-4 Aug 12 16:25:38 ioctl slurm-epilog[249913]: START user=fabecassis job=439 node=node-2 Aug 12 16:25:38 ioctl slurm-epilog[249914]: START user=fabecassis job=439 node=node-1 Aug 12 16:25:38 ioctl slurm-epilog[249916]: START user=fabecassis job=439 node=node-3 This can cause a problem with our epilog scripts that attempt to detect known issues on the node after a job, on nodes that were removed early from the job, we can't attribute those issues to the right user.
We just wanted to update you and let you know that we have a patch for this issue currently going through our QA and review process. We will update you on the status once this is resolved.
Hi Those commits fix this issue. 21.08.0 and above will include all of these fixes. https://github.com/SchedMD/slurm/commit/d29e0f8b9d https://github.com/SchedMD/slurm/commit/0a937b6a70 I'll go ahead and close this out. Dominik