From f214a2b15df6f9cc84088b527bf9af50ea4f04fe Mon Sep 17 00:00:00 2001
From: Moe Jette <jette1@llnl.gov>
Date: Fri, 8 Feb 2008 23:55:43 +0000
Subject: [PATCH] Add logic to report GetEnvTimeout config parameter

---
 slurm/slurm.h.in                 | 2 +-
 src/api/config_info.c            | 4 +++-
 src/common/slurm_protocol_pack.c | 4 ++++
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/slurm/slurm.h.in b/slurm/slurm.h.in
index ed4629b57cf..9a7b543e406 100644
--- a/slurm/slurm.h.in
+++ b/slurm/slurm.h.in
@@ -937,6 +937,7 @@ typedef struct slurm_ctl_conf {
 	uint32_t next_job_id;	/* next slurm generated job_id to assign */
 	uint16_t fast_schedule;	/* 1 to *not* check configurations by node 
 				 * (only check configuration file, faster) */
+	uint16_t get_env_timeout; /* timeout for srun --get-user-env option */
 	uint16_t inactive_limit;/* seconds of inactivity before a
 				 * inactive resource allocation is released */
 	char *job_acct_gather_type; /* job accounting gather type */
@@ -957,7 +958,6 @@ typedef struct slurm_ctl_conf {
 	char *job_credential_private_key;	/* path to private key */
 	char *job_credential_public_certificate;/* path to public certificate*/
 	uint16_t job_file_append; /* if set, append to stdout/err file */
-	uint16_t get_env_timeout; /* secs allowed for srun --get-user-env */
 	uint16_t kill_wait;	/* seconds between SIGXCPU to SIGKILL 
 				 * on job termination */
 	char *mail_prog;	/* pathname of mail program */
diff --git a/src/api/config_info.c b/src/api/config_info.c
index 948c8a92272..5f625e78599 100644
--- a/src/api/config_info.c
+++ b/src/api/config_info.c
@@ -147,7 +147,9 @@ void slurm_print_ctl_conf ( FILE* out,
 	fprintf(out, "FastSchedule            = %u\n",
 		slurm_ctl_conf_ptr->fast_schedule);
 	fprintf(out, "FirstJobId              = %u\n",
-		 slurm_ctl_conf_ptr->first_job_id);
+		slurm_ctl_conf_ptr->first_job_id);
+	fprintf(out, "GetEnvTimeout           = %u\n",
+		slurm_ctl_conf_ptr->get_env_timeout);
 #ifdef HAVE_XCPU
 	fprintf(out, "HAVE_XCPU               = %d\n", HAVE_XCPU);
 #endif
diff --git a/src/common/slurm_protocol_pack.c b/src/common/slurm_protocol_pack.c
index 6e5a9cf826d..4ce27d6b70f 100644
--- a/src/common/slurm_protocol_pack.c
+++ b/src/common/slurm_protocol_pack.c
@@ -2215,6 +2215,8 @@ _pack_slurm_ctl_conf_msg(slurm_ctl_conf_info_msg_t * build_ptr, Buf buffer)
 	pack16(build_ptr->fast_schedule, buffer);
 	pack32(build_ptr->first_job_id, buffer);
 
+	pack16(build_ptr->get_env_timeout, buffer);
+
 	pack16(build_ptr->inactive_limit, buffer);
 
 	pack16(build_ptr->job_acct_gather_freq, buffer);
@@ -2347,6 +2349,8 @@ _unpack_slurm_ctl_conf_msg(slurm_ctl_conf_info_msg_t **
 	safe_unpack16(&build_ptr->fast_schedule, buffer);
 	safe_unpack32(&build_ptr->first_job_id, buffer);
 
+	safe_unpack16(&build_ptr->get_env_timeout, buffer);
+
 	safe_unpack16(&build_ptr->inactive_limit, buffer);
 
 	safe_unpack16(&build_ptr->job_acct_gather_freq, buffer);
-- 
GitLab