Bug 8272

Summary: RPMs do not create the /var/log/slurm directory
Product: Slurm Reporter: Ole.H.Nielsen <Ole.H.Nielsen>
Component: Build System and PackagingAssignee: Jason Booth <jbooth>
Status: RESOLVED INFOGIVEN QA Contact:
Severity: 4 - Minor Issue    
Priority: ---    
Version: 19.05.5   
Hardware: Linux   
OS: Linux   
Site: DTU Physics 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: Target Release: ---
DevPrio: --- Emory-Cloud Sites: ---

Description Ole.H.Nielsen@fysik.dtu.dk 2019-12-26 03:28:16 MST
I'm testing a new compute node installation method using Ansible, and I have discovered that the Slurm 19.05 RPMs do not create the /var/log/slurm directory, which my previous installation scripts had created manually.  With this omission Slurm creates no log files at all which is quite bad.

IMHO, the slurm-xx.xx RPM must create the /var/log/slurm directory so that users won't have to do this manually.  Probably a configuration in the %post section in slurm.spec is required with:

mkdir /var/log/slurm
chown slurm: /var/log/slurm

FYI: My compute node has these RPMs installed:

$ rpm -qa | grep slurm
slurm-19.05.5-1.el7.x86_64
slurm-slurmd-19.05.5-1.el7.x86_64
slurm-perlapi-19.05.5-1.el7.x86_64
slurm-devel-19.05.5-1.el7.x86_64
slurm-pam_slurm-19.05.5-1.el7.x86_64
slurm-contribs-19.05.5-1.el7.x86_64
Comment 2 Jason Booth 2019-12-26 10:44:42 MST
This is the intended behavior since the default is to log via syslog and then allow sites to specify the logging directory/file via the SlurmdLogFile. Additionally, not all sites use /var/log/slurm so hardcoding this would be less than desirable.

SlurmdLogFile
Fully qualified pathname of a file into which the slurmd daemon's logs are written. The default value is none (performs logging via syslog). Any "%h" within the name is replaced with the hostname on which the slurmd is running. Any "%n" within the name is replaced with the Slurm node name on which the slurmd is running.
See the section LOGGING if a pathname is specified.


I am making this as resolved.
Comment 3 Ole.H.Nielsen@fysik.dtu.dk 2019-12-26 10:56:32 MST
(In reply to Jason Booth from comment #2)
> This is the intended behavior since the default is to log via syslog and
> then allow sites to specify the logging directory/file via the
> SlurmdLogFile. Additionally, not all sites use /var/log/slurm so hardcoding
> this would be less than desirable.
> 
> SlurmdLogFile
> Fully qualified pathname of a file into which the slurmd daemon's logs are
> written. The default value is none (performs logging via syslog). Any "%h"
> within the name is replaced with the hostname on which the slurmd is
> running. Any "%n" within the name is replaced with the Slurm node name on
> which the slurmd is running.
> See the section LOGGING if a pathname is specified.
> 
> 
> I am making this as resolved.

Hi Jason, thanks for the quick answer!
Ole