From 4d0fbd858618d1290e227a2ac7ed93675c5383b4 Mon Sep 17 00:00:00 2001
From: Danny Auble <da@schedmd.com>
Date: Mon, 14 May 2012 08:57:10 -0700
Subject: [PATCH] Load the jobacct_gather plugin in the slurmd to make sure it
 is possible.  Otherwise if it fails it wouldn't happen to the slurmstepd and
 might be missed by failing silently.

It will also mess up the packing/unpacking since it should be obvious if
it fails on the slurmctld.
---
 src/slurmd/slurmd/slurmd.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/slurmd/slurmd/slurmd.c b/src/slurmd/slurmd/slurmd.c
index cf3a4affbdc..988c9f035bc 100644
--- a/src/slurmd/slurmd/slurmd.c
+++ b/src/slurmd/slurmd/slurmd.c
@@ -296,6 +296,14 @@ main (int argc, char *argv[])
 		fatal("Unable to clear interconnect state.");
 	switch_g_slurmd_init();
 
+	/* Make sure we can load the jobacct_gather plugin so if there
+	   is a problem we don't have to wait for the slurm_stepd to
+	   figure it out.
+	*/
+	if (slurm_jobacct_gather_init() != SLURM_SUCCESS)
+		fatal("Unable to initialize jobacct_gather plugin.  "
+		      "This is manditory for pack/unpack jobs.");
+	slurm_jobacct_gather_fini();
 	_create_msg_socket();
 
 	conf->pid = getpid();
-- 
GitLab