Ticket 1306

Summary: SLURM_JOB_ACCT is not propagated to the job environment
Product: Slurm Reporter: Gene Soudlenkov <g.soudlenkov>
Component: slurmdAssignee: David Bigagli <david>
Status: RESOLVED FIXED QA Contact:
Severity: 3 - Medium Impact    
Priority: --- CC: brian, da
Version: 14.03.8   
Hardware: Linux   
OS: Linux   
Site: University of Auckland Alineos Sites: ---
Atos/Eviden Sites: --- Confidential Site: ---
Coreweave sites: --- Cray Sites: ---
DS9 clusters: --- HPCnow Sites: ---
HPE Sites: --- IBM Sites: ---
NOAA SIte: --- OCF Sites: ---
Recursion Pharma Sites: --- SFW Sites: ---
SNIC sites: --- Linux Distro: ---
Machine Name: CLE Version:
Version Fixed: 15.08.0pre2 Target Release: ---
DevPrio: --- Emory-Cloud Sites: ---

Description Gene Soudlenkov 2014-12-08 10:38:18 MST
SLURM_JOB_ACCT is not propagated to the running environment. Can only be see in the job prolog and cannot be used inside a job. We have a preloaded library that requires account ID to function properly. Is there another way to get a current job account (-A)?
Comment 1 David Bigagli 2014-12-09 08:58:21 MST
Hi,
   are you referring to the variable SLURM_JOB_ACCOUNT? This one is currently only available in the slurmctld prolog/epilog. An option for now is to 
call the scontrol command to get the accounting the job is using.

We can consider this as an enhancement for the next release.

David
Comment 2 Gene Soudlenkov 2014-12-09 10:39:01 MST
Thanks - it would be great to have it for a job.
Comment 3 David Bigagli 2014-12-19 04:50:43 MST
Fixed in commit 167d9ef2bc21c7. It will be released with 15.08.0pre2 version.

David
Comment 4 David Bigagli 2014-12-19 05:23:31 MST
A note of caution. This patch requires protocol changes between slurmctld 
and the slurmd so we do not recommend you back port it to your version as it will
disrupt your cluster.

David
Comment 5 Gene Soudlenkov 2014-12-19 05:56:57 MST
Thanks - we update versions during outages anyway so it won't be too much of a hassle

Cheers,
Gene
Comment 6 David Bigagli 2014-12-19 05:59:35 MST
Ok. Please keep in mind that 15.08 is a development version not ready for production use. As we keep developing and releasing 15.08.pre there is absolutely no guarantee of backward compatibility until the final 15.08 release.

David
Comment 7 Moe Jette 2014-12-22 04:33:59 MST
(In reply to David Bigagli from comment #3)
> Fixed in commit 167d9ef2bc21c7. It will be released with 15.08.0pre2 version.
> 
> David

Previous commit is incomplete and will result in slurmctld aborts. Additional commits below are required:
https://github.com/SchedMD/slurm/commit/30e45f8a21549523267b4c0a7839bec3ad4cfe81
https://github.com/SchedMD/slurm/commit/c2b6d81f4d314b119c4e309cb70447f7fbb30eb6