From dc004335224ba181bb7b05a91e353f62741d9617 Mon Sep 17 00:00:00 2001
From: Chris Hines <chris.hines@monash.edu>
Date: Tue, 16 Aug 2016 13:52:50 +1000
Subject: [PATCH] rotate the slurm log correctly

Former-commit-id: f4e47d9496e92d353c0c33c5006981a3b59cbd69
---
 roles/slurm-common/templates/slurmlog.j2 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/roles/slurm-common/templates/slurmlog.j2 b/roles/slurm-common/templates/slurmlog.j2
index 58274079..3e3d3e68 100644
--- a/roles/slurm-common/templates/slurmlog.j2
+++ b/roles/slurm-common/templates/slurmlog.j2
@@ -20,9 +20,9 @@
 {% if ansible_os_family == 'RedHat' and ansible_distribution_version >= '7' %}
  postrotate
 {% if slurmctrl == inventory_hostname %}
-   {{ slurm_dir }}/sbin/slurmctld flushlogs 1>/dev/null || true
+  systemctl kill -s HUP --kill-who=main slurmctld
 {% else %}
-   {{ slurm_dir }}/sbin/slurmd flushlogs 1>/dev/null || true
+  systemctl kill -s HUP --kill-who=main slurmd
 {% endif %}
 {% else %}
  postrotate /etc/init.d/slurm reconfig 
-- 
GitLab