Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package pdsh for openSUSE:Factory checked in 
at 2023-03-14 18:16:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/pdsh (Old)
 and      /work/SRC/openSUSE:Factory/.pdsh.new.31432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "pdsh"

Tue Mar 14 18:16:48 2023 rev:48 rq:1071207 version:2.34

Changes:
--------
--- /work/SRC/openSUSE:Factory/pdsh/pdsh.changes        2023-03-02 
23:04:41.792211521 +0100
+++ /work/SRC/openSUSE:Factory/.pdsh.new.31432/pdsh.changes     2023-03-14 
18:16:49.451789376 +0100
@@ -1,0 +2,7 @@
+Mon Mar 13 14:31:14 UTC 2023 - Egbert Eich <e...@suse.com>
+
+- Fix slurm plugin: make sure slurm_init() is called before using
+  the Slurm API. This has been the case since version 20.11 (bsc#1209216).
+  Add-call-to-slurm_init-this-makes-sure-the-config-options-are-set.patch
+
+-------------------------------------------------------------------

New:
----
  Add-call-to-slurm_init-this-makes-sure-the-config-options-are-set.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ pdsh.spec ++++++
--- /var/tmp/diff_new_pack.1yFXJJ/_old  2023-03-14 18:16:50.075792712 +0100
+++ /var/tmp/diff_new_pack.1yFXJJ/_new  2023-03-14 18:16:50.079792734 +0100
@@ -70,6 +70,7 @@
 Patch6:         fail-fast-on-ssh-errors-or-non-zero-return-code.patch
 Patch7:         doc-fast-fail-update.patch
 Patch8:         
Hack-to-work-around-a-generic-type-name-breakage-introduced-by-latest-Slurm.patch
+Patch9:         
Add-call-to-slurm_init-this-makes-sure-the-config-options-are-set.patch
 
 %description
 Pdsh is a multithreaded remote shell client which executes commands on
@@ -140,6 +141,7 @@
 %patch6 -p1
 %patch7 -p1
 %patch8 -p1
+%patch9 -p1
 
 %build
 export CFLAGS="%{optflags} -fno-strict-aliasing"

++++++ Add-call-to-slurm_init-this-makes-sure-the-config-options-are-set.patch 
++++++
From: Egbert Eich <e...@suse.com>
Date: Mon Mar 13 15:27:01 2023 +0100
Subject: Add call to slurm_init() - this makes sure, the config options are set.
Patch-mainline: Not yet
Git-commit: b158df3b522360247bef95544c54708b05f069f7
References: 

Signed-off-by: Egbert Eich <e...@suse.com>
Signed-off-by: Egbert Eich <e...@suse.de>
---
 src/modules/slurm.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
diff --git a/src/modules/slurm.c b/src/modules/slurm.c
index 48e6dde..20613c2 100644
--- a/src/modules/slurm.c
+++ b/src/modules/slurm.c
@@ -295,6 +295,19 @@ static hostlist_t _hl_append (hostlist_t hl, char *nodes)
     return (hl);
 }
 
+/*
+ * Make sure, slurm_init() is called before any call to the Slurm API
+ */
+static void _slurm_init() {
+  static bool _inited = false;
+
+  if (_inited)
+    return;
+
+  slurm_init(NULL);
+  _inited = true;
+}
+
 static hostlist_t _slurm_wcoll (List joblist)
 {
     int i;
@@ -306,6 +319,8 @@ static hostlist_t _slurm_wcoll (List joblist)
     if ((joblist == NULL) && (envjobid = _slurm_jobid()) < 0)
         return (NULL);
 
+    _slurm_init(NULL);
+
     if (slurm_load_jobs((time_t) NULL, &msg, SHOW_ALL) < 0) 
         errx ("Unable to contact slurm controller: %s\n", 
               slurm_strerror (errno));
@@ -355,6 +370,8 @@ static hostlist_t _slurm_wcoll_partition (List 
partitionlist)
     partition_info_t * p;
     ListIterator li;
 
+    _slurm_init(NULL);
+
     if (slurm_load_partitions((time_t) NULL, &msg, SHOW_ALL) < 0)
         errx ("Unable to contact slurm controller: %s\n",
               slurm_strerror (errno));
@@ -398,6 +415,8 @@ static hostlist_t _slurm_wcoll_constraint (hostlist_t wl, 
List constraintlist)
     char *c;
     ListIterator li;
 
+    _slurm_init(NULL);
+
     if (slurm_load_node((time_t) NULL, &msg, SHOW_ALL) < 0)
         errx ("Unable to contact slurm controller: %s\n",
               slurm_strerror (errno));

Reply via email to