From 22f4362d3476b8ad64bb61bbe8cb93d2bd1363ed Mon Sep 17 00:00:00 2001 From: Nate Rini <nate@schedmd.com> Date: Thu, 6 Feb 2020 16:04:31 -0700 Subject: [PATCH] Add DEBUG_FLAG_NET --- doc/man/man5/slurm.conf.5 | 3 +++ slurm/slurm.h.in | 2 +- src/common/read_config.c | 8 ++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/doc/man/man5/slurm.conf.5 b/doc/man/man5/slurm.conf.5 index 3118caf0244..1dcc495743e 100644 --- a/doc/man/man5/slurm.conf.5 +++ b/doc/man/man5/slurm.conf.5 @@ -615,6 +615,9 @@ Job container plugin details \fBLicense\fR License management details .TP +\fBNetwork\fR +Network details +.TP \fBNodeFeatures\fR Node Features plugin debug info .TP diff --git a/slurm/slurm.h.in b/slurm/slurm.h.in index 1488278829a..52236de37a9 100644 --- a/slurm/slurm.h.in +++ b/slurm/slurm.h.in @@ -2553,7 +2553,7 @@ typedef struct reservation_name_msg { * dealing with TRES=NODE */ #define DEBUG_FLAG_DATA 0x0000000000000100 /* data_t logging */ /* #define DEBUG_FLAG_FREE 0x0000000000000200 */ -/* #define DEBUG_FLAG_FREE 0x0000000000000400 */ +#define DEBUG_FLAG_NET 0x0000000000000400 /* Network logging */ #define DEBUG_FLAG_PRIO 0x0000000000000800 /* debug for priority * plugin */ #define DEBUG_FLAG_BACKFILL 0x0000000000001000 /* debug for diff --git a/src/common/read_config.c b/src/common/read_config.c index 4ae7c024c49..432ca7e89ef 100644 --- a/src/common/read_config.c +++ b/src/common/read_config.c @@ -5315,6 +5315,11 @@ extern char * debug_flags2str(uint64_t debug_flags) xstrcat(rc, ","); xstrcat(rc, "License"); } + if (debug_flags & DEBUG_FLAG_NET) { + if (rc) + xstrcat(rc, ","); + xstrcat(rc, "Network"); + } if (debug_flags & DEBUG_FLAG_NO_CONF_HASH) { if (rc) xstrcat(rc, ","); @@ -5490,6 +5495,9 @@ extern int debug_str2flags(char *debug_flags, uint64_t *flags_out) (*flags_out) |= DEBUG_FLAG_JOB_CONT; else if (xstrcasecmp(tok, "License") == 0) (*flags_out) |= DEBUG_FLAG_LICENSE; + else if (xstrcasecmp(tok, "Network") == 0 || + xstrcasecmp(tok, "Net") == 0) + (*flags_out) |= DEBUG_FLAG_NET; else if (xstrcasecmp(tok, "NO_CONF_HASH") == 0) (*flags_out) |= DEBUG_FLAG_NO_CONF_HASH; else if (xstrcasecmp(tok, "NodeFeatures") == 0) -- GitLab