Update to version 24.11.1:

* With client commands `MIN_MEMORY` will show `mem_per_tres` if
    specified.
  * Fix errno message about bad constraint.
  * `slurmctld` - Fix crash and possible split brain issue if the
    backup controller handles an scontrol reconfigure while in control
    before the primary resumes operation.
  * Fix `stepmgr` not getting dynamic node addrs from the controller
  * `stepmgr` - avoid "`Unexpected missing socket`" errors.
  * Fix `scontrol show steps` with dynamic stepmgr.
  * Deny jobs using the "`R:`" option of `--signal` if `PreemptMode=OFF`
    globally.
  * Force jobs using the "`R:`" option of `--signal` to be
    preemptable.
    by requeue or cancel only. If `PreemptMode` on the partition or
    QOS is off or suspend, the job will default to using
    `PreemptMode=cancel`.
  * If `--mem-per-cpu` exceeds `MaxMemPerCPU`, the number of CPUs
    per task will always be increased even if --cpus-per-task was
    specified. This is needed to ensure each task gets the expected
    amount of memory.
  * Fix compilation issue on OpenSUSE Leap 15.
  * Fix jobs using more nodes than needed when not using `-N`.
  * Fix issue with allocation being allocated less resources.
    than needed when using `--gres-flags=enforce-binding`.
  * `select/cons_tres` - Fix errors with `MaxCpusPerSocket`
    partition limit. Used CPUs/cores weren't counted properly,
    nor limiting free ones to avail, when the socket was partially
    allocated, or the job request went beyond this limit.
  * Fix issue when jobs were preempted for licenses even if there

OBS-URL: https://build.opensuse.org/package/show/network:cluster/slurm?expand=0&rev=309
This commit is contained in:
Egbert Eich 2025-02-08 09:34:28 +00:00 committed by Git OBS Bridge
commit a28d9f9bdb
21 changed files with 7752 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

65
Fix-test-21.41.patch Normal file
View File

@ -0,0 +1,65 @@
From: Egbert Eich <eich@suse.com>
Date: Wed Jun 22 14:39:10 2022 +0200
Subject: Fix test 21.41
Patch-mainline: Not yet
Git-repo: https://github.com/SchedMD/slurm
Git-commit: 21619ffa15d1d656ee11a477ebb8215a06387fdd
References:
Since expect is not line oriented, the output is not matched line by line.
Thus the order in which results are returned by sacctmgr actually matters:
If the first test case matches what is returned first, this part will be
consumed. If the 2nd test case will then match what is left over, the
test will actually succeed.
If this is not the case, ie if the first test matches a part that is
actually sent later, the earlier parts will actually be forgotten and
won't match at all.
To make the test resilient to different order of results, the test has
been rewritten to only contain a single match line.
Signed-off-by: Egbert Eich <eich@suse.com>
Signed-off-by: Egbert Eich <eich@suse.de>
---
testsuite/expect/test21.41 | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/testsuite/expect/test21.41 b/testsuite/expect/test21.41
index c0961522db..1fd921a48f 100755
--- a/testsuite/expect/test21.41
+++ b/testsuite/expect/test21.41
@@ -372,21 +372,21 @@ expect {
-re "There was a problem" {
fail "There was a problem with the sacctmgr command"
}
- -re "$user1.$wckey1.($number)." {
- set user1wckey1 $expect_out(1,string)
- exp_continue
- }
- -re "$user2.$wckey1.($number)." {
- set user2wckey1 $expect_out(1,string)
- exp_continue
- }
- -re "$user1.$wckey2.($number)." {
- set user1wckey2 $expect_out(1,string)
- exp_continue
- }
- -re "$user2.$wckey2.($number)." {
- set user2wckey2 $expect_out(1,string)
- exp_continue
+ -re "($user1|$user2).($wckey1|$wckey2).($number)." {
+ if { $expect_out(1,string) eq $user1 } {
+ if { $expect_out(2,string) eq $wckey1 } {
+ set user1wckey1 $expect_out(3,string)
+ } elseif { $expect_out(2,string) eq $wckey2 } {
+ set user1wckey2 $expect_out(3,string)
+ }
+ } elseif { $expect_out(1,string) eq $user2 } {
+ if { $expect_out(2,string) eq $wckey1 } {
+ set user2wckey1 $expect_out(3,string)
+ } elseif { $expect_out(2,string) eq $wckey2 } {
+ set user2wckey2 $expect_out(3,string)
+ }
+ }
+ exp_continue
}
timeout {
fail "sacctmgr wckeys not responding"

View File

@ -0,0 +1,26 @@
From: Egbert Eich <eich@suse.com>
Date: Sat Jul 2 11:25:11 2022 +0200
Subject: Fix test7.2 to find libpmix under lib64 as well
Patch-mainline: Not yet
Git-repo: https://github.com/SchedMD/slurm
Git-commit: 4771b96995f90a64a828aac16a10bd56db61a711
References:
Signed-off-by: Egbert Eich <eich@suse.com>
Signed-off-by: Egbert Eich <eich@suse.de>
---
testsuite/expect/test7.2 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testsuite/expect/test7.2 b/testsuite/expect/test7.2
index 9d1f1a2dee..f63ecd643e 100755
--- a/testsuite/expect/test7.2
+++ b/testsuite/expect/test7.2
@@ -42,7 +42,7 @@ if {[get_config_param "SwitchType"] eq "switch/cray"} {
skip "This test is incompatible with Cray systems"
}
-if { [file exists ${slurm_dir}/lib/libpmi.so] == 0 } {
+if { ![file exists ${slurm_dir}/lib/libpmi.so] && ![file exists ${slurm_dir}/lib64/libpmi.so]} {
skip "PMI library not compiled, can't perform pmi testing"
}

125
README_Testsuite.md Normal file
View File

@ -0,0 +1,125 @@
# Running the Slurm 'expect' Testsuite
The ```slurm-testsuite``` package contains the Slurm expect test suite.
This package is meant to be installed on a test setup only, it should
NEVER BE INSTALLED ON A REGULAR OR EVEN PRODUCTION SYSTEM.
SUSE uses this package to determine regressions and for quality assurance.
The results are monitored and evaluated regularly in house.
A specific configuration is required to run this test suite, this document
attempts to describe the steps needed.
A small subset of tests is currently failing. The reasons are yet to be
determined.
Please do not file bug reports based on test results!
The testsuite is preconfigured to work with 4 nodes: ```node01```,...,
```node04```. ```node01``` serves as control and compute node. The slurm
configuration, home, and the test suite are shared across the nodes.
The test suite should be mounted under /home (to make ```sgather``` work
correctly).
For tests involving MPI this test suite currently uses OpenMPI version 4.
## Install and set up the Base System
1. Prepare image with a minimal text mode installation.
2. Install, enable and start sshd and make sure root is able to log in
without password across all nodes.
```
# zypper install openssh-server openssh-clients
# systemctl enable --now sshd
# ssh-keygen -t rsa -f .ssh/id_rsa -N
# cat .ssh/id_rsa.pub >> .ssh/authorized_keys
```
3. Create a test user 'auser' allow ssh from/to root:
```
# useradd -m auser
# cp -r /root/.ssh /home/auser
```
4. Set up a persistent network if to obtain the network address and
hostname thru DHCP:
```
# echo 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", '\
'ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1",'\
' KERNEL=="?*", NAME="lan0" >> /etc/udev/rules.d/70-persistent-net.rules
# cat > /etc/sysconfig/network/ifcfg-lan0 <<EOF
BOOTPROTO='dhcp'
MTU=''
REMOTE_IPADDR=''
STARTMODE='onboot'
EOF
# sed -i 's/DHCLIENT_SET_HOSTNAME="no"/DHCLIENT_SET_HOSTNAME="yes"/' \
/etc/sysconfig/network/dhcp
```
## Install and set up the Slurm specific Environment
1. Install package slurm-testsuite.
2. Set up, enable & start mariadb, add slurm accounting database:
```
# sed -i -e "/^bind-address/s@\(^.*$\)@# \1@" /etc/my.cnf
# systemctl start mariadb
# mysql -uroot -e "create user 'slurm'@'node01' identified by 'linux';"
# mysql -uroot -e "create database slurm_acct_db;"
# mysql -uroot -e "grant all on slurm_acct_db.* TO 'slurm'@'node01';"
```
3. Set up shared home, testsuite and slurm config directories, install and
enable NFS kernel server.
```
# mkdir -p /srv/home
# mv /home/auser /srv/home
# cat >> /etc/exports <<EOF
/srv/home *(rw,no_subtree_check,sync,no_root_squash)
/srv/slurm-testsuite *(rw,no_subtree_check,sync,no_root_squash)
/srv/slurm-testsuite/shared *(rw,no_subtree_check,sync,no_root_squash)
/srv/slurm-testsuite/config *(rw,no_subtree_check,sync,no_root_squash)
EOF
# cat >> /etc/fstab <<EOF
node01:/srv/home /home nfs sync,hard,rw 0 0
node01:/srv/slurm-testsuite/config /etc/slurm nfs sync,hard,rw 0 0
node01:/srv/slurm-testsuite/shared /var/lib/slurm/shared nfs sync,hard,rw 0 0
node01:/srv/slurm-testsuite /home/slurm-testsuite nfs sync,hard,rw 0 0
EOF
# zypper install nfs-kernel-server
# systemctl enable nfs-server
```
4. Enable munge and slurmd:
```
# systemctl enable munge
# systemctl enable slurmd
```
# Clone Nodes and bring up Test System
1. Now halt the system and duplicate it 3 times.
2. Set up the dhcp server and make sure the nodes receive the hostnames
``node01```,..., ```node04```.
4. Boot all 4 nodes (start with ```node01```).
5. On ```node01```, log in as ```root``` and run ```setup-testsuite.sh```:
```
# ./setup-testsuite.sh
```
6. Load the environment and run the tests as user 'slurm':
```
# sudo -s -u slurm
$ module load gnu openmpi
$ cd /home/slurm-testsuite/testsuite/expect
$ ./regression.py
```
There are a number of tests which require a different configuration
and thus will be skipped.
For a number of these, the alternatives are documented in the config
file shipped with this package.
A small number of tests fail for yet unknown reasons.
Also, when run sequentially, some tests may fail intermittendly as the
test suite is not race free. Often the reason for this is that tests
try to determine the availability of resources and may behave incorrectly
if an insufficient number is marked 'idle'. This problem may be less
pronounced when more resources (nodes) are available. Usually, these
issues will not show when tests are run manually. Therefore, it is important
the re-check failed tests manually.

View File

@ -0,0 +1,58 @@
From 46bea350d06e9c8e1f93938ce2b2bd04a1c3bf3f Mon Sep 17 00:00:00 2001
From: Egbert Eich <eich@suse.com>
Date: Wed, 8 Jan 2020 20:56:25 +0100
Subject: [PATCH] Remove rpath from build
Signed-off-by: Egbert Eich <eich@suse.com>
---
contribs/perlapi/libslurm/perl/Makefile.PL.in | 4 ++--
contribs/perlapi/libslurmdb/perl/Makefile.PL.in | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/contribs/perlapi/libslurm/perl/Makefile.PL.in b/contribs/perlapi/libslurm/perl/Makefile.PL.in
index e8f8aff54d..b51f53f412 100644
--- a/contribs/perlapi/libslurm/perl/Makefile.PL.in
+++ b/contribs/perlapi/libslurm/perl/Makefile.PL.in
@@ -68,7 +68,7 @@ DESTDIR_BUG
# AIX has problems with not always having the correct
# flags so we have to add some :)
my $os = lc(`uname`);
-my $other_ld_flags = '-Wl,-rpath,@top_builddir@/src/api/.libs -Wl,-rpath,@libdir@';
+my $other_ld_flags = "-L@top_builddir@/src/api/.libs -lslurm";
$other_ld_flags = " -brtl -G -bnoentry -bgcbypass:1000 -bexpfull"
if $os =~ "aix";
@@ -79,7 +79,7 @@ WriteMakefile(
($] >= 5.005 ? ## Add these new keywords supported since 5.005
(ABSTRACT_FROM => 'lib/Slurm.pm', # retrieve abstract from module
AUTHOR => 'Hongjia Cao <hjcao@nudt.edu.cn>') : ()),
- LIBS => ['-L@top_builddir@/src/api/.libs -L@libdir@ -lslurm'], # e.g., '-lm'
+ LIBS => ["-L@prefix@/lib -lslurm"], # e.g., '-lm'
DEFINE => '', # e.g., '-DHAVE_SOMETHING'
INC => "-I. -I@top_srcdir@ -I@top_srcdir@/contribs/perlapi/common -I@top_builddir@",
# Un-comment this if you add C files to link with later:
diff --git a/contribs/perlapi/libslurmdb/perl/Makefile.PL.in b/contribs/perlapi/libslurmdb/perl/Makefile.PL.in
index 4fb38b9725..148efa6e82 100644
--- a/contribs/perlapi/libslurmdb/perl/Makefile.PL.in
+++ b/contribs/perlapi/libslurmdb/perl/Makefile.PL.in
@@ -68,7 +68,7 @@ DESTDIR_BUG
# AIX has problems with not always having the correct
# flags so we have to add some :)
my $os = lc(`uname`);
-my $other_ld_flags = '-Wl,-rpath,@top_builddir@/src/db_api/.libs -Wl,-rpath,@libdir@';
+my $other_ld_flags = "-L@top_builddir@/src/api/.libs -lslurm";
$other_ld_flags = " -brtl -G -bnoentry -bgcbypass:1000 -bexpfull"
if $os =~ "aix";
@@ -79,7 +79,7 @@ WriteMakefile(
($] >= 5.005 ? ## Add these new keywords supported since 5.005
(ABSTRACT_FROM => 'Slurmdb.pm', # retrieve abstract from module
AUTHOR => 'Don Lipari <lipari@llnl.gov>') : ()),
- LIBS => ['-L@top_builddir@/src/api/.libs -L@libdir@ -lslurm'], # e.g., '-lm'
+ LIBS => ["-L@prefix@/lib -lslurm"], # e.g., '-lm'
DEFINE => '', # e.g., '-DHAVE_SOMETHING'
INC => "-I. -I@top_srcdir@ -I@top_srcdir@/contribs/perlapi/common -I@top_builddir@",
# Un-comment this if you add C files to link with later:
--
2.42.1

5
_service Normal file
View File

@ -0,0 +1,5 @@
<services>
<service name="download_files" mode="localonly">
<param name="enforceupstream">yes</param>
</service>
</services>

View File

@ -0,0 +1,86 @@
From d51d3e1db8b2ed650a042352eff041ae77e467f9 Mon Sep 17 00:00:00 2001
From: Egbert Eich <eich@suse.com>
Date: Mon, 20 Feb 2023 21:29:27 +0100
Subject: [PATCH] pam_slurm: Initialize arrays and pass sizes
PAM is security critical:
- clear arrays
- ensure strings are NULL-terminated.
Signed-off-by: Egbert Eich <eich@suse.com>
Originally-from: Sebastian Krahmer <krahmer@suse.com>
Signed-off-by: Egbert Eich <eich@suse.de>
---
contribs/pam/pam_slurm.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/contribs/pam/pam_slurm.c b/contribs/pam/pam_slurm.c
index a27e651548..eac9879c07 100644
--- a/contribs/pam/pam_slurm.c
+++ b/contribs/pam/pam_slurm.c
@@ -279,9 +279,9 @@ static int
_gethostname_short (char *name, size_t len)
{
int error_code, name_len;
- char *dot_ptr, path_name[1024];
+ char *dot_ptr, path_name[1024] = {0};
- error_code = gethostname(path_name, sizeof(path_name));
+ error_code = gethostname(path_name, sizeof(path_name) - 1);
if (error_code)
return error_code;
@@ -309,13 +309,13 @@ static int
_slurm_match_allocation(uid_t uid)
{
int authorized = 0, i;
- char hostname[HOST_NAME_MAX];
+ char hostname[HOST_NAME_MAX] = {0};
char *nodename = NULL;
job_info_msg_t * msg;
slurm_init(NULL);
- if (_gethostname_short(hostname, sizeof(hostname)) < 0) {
+ if (_gethostname_short(hostname, sizeof(hostname) - 1) < 0) {
_log_msg(LOG_ERR, "gethostname: %m");
return 0;
}
@@ -438,7 +438,7 @@ _send_denial_msg(pam_handle_t *pamh, struct _options *opts,
*/
extern void libpam_slurm_init (void)
{
- char libslurmname[64];
+ char libslurmname[64] = {0};
if (slurm_h)
return;
@@ -446,10 +446,10 @@ extern void libpam_slurm_init (void)
/* First try to use the same libslurm version ("libslurm.so.24.0.0"),
* Second try to match the major version number ("libslurm.so.24"),
* Otherwise use "libslurm.so" */
- if (snprintf(libslurmname, sizeof(libslurmname),
+ if (snprintf(libslurmname, sizeof(libslurmname) - 1,
"libslurm.so.%d.%d.%d", SLURM_API_CURRENT,
SLURM_API_REVISION, SLURM_API_AGE) >=
- sizeof(libslurmname) ) {
+ sizeof(libslurmname) - 1) {
_log_msg (LOG_ERR, "Unable to write libslurmname\n");
} else if ((slurm_h = dlopen(libslurmname, RTLD_NOW|RTLD_GLOBAL))) {
return;
@@ -458,8 +458,10 @@ extern void libpam_slurm_init (void)
libslurmname, dlerror ());
}
- if (snprintf(libslurmname, sizeof(libslurmname), "libslurm.so.%d",
- SLURM_API_CURRENT) >= sizeof(libslurmname) ) {
+ memset(libslurmname, 0, sizeof(libslurmname));
+
+ if (snprintf(libslurmname, sizeof(libslurmname) - 1, "libslurm.so.%d",
+ SLURM_API_CURRENT) >= sizeof(libslurmname) - 1) {
_log_msg (LOG_ERR, "Unable to write libslurmname\n");
} else if ((slurm_h = dlopen(libslurmname, RTLD_NOW|RTLD_GLOBAL))) {
return;
--
2.42.1

369
regression.py.sle12 Normal file
View File

@ -0,0 +1,369 @@
#!/usr/bin/env python3
############################################################################
# Copyright (C) 2006 The Regents of the University of California.
# Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
# Written by Christopher J. Morrone <morrone2@llnl.gov>
# CODE-OCEC-09-009. All rights reserved.
#
# This file is part of Slurm, a resource management program.
# For details, see <https://slurm.schedmd.com/>.
# Please also read the supplied file: DISCLAIMER.
#
# Slurm is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# Slurm is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along
# with Slurm; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
############################################################################
"""This script makes it easier to run the Slurm expect test scripts."""
from __future__ import print_function
import json
import os
import re
import sys
import time
import signal
from optparse import OptionParser
from optparse import OptionValueError
from subprocess import Popen
def main(argv=None):
# "tests" is a list containing tuples of length 3 of the form
# (test major number, test minor number, test filename)
tests = []
failed_tests = []
passed_tests = []
skipped_tests = []
begin = (1, 1)
abort = False
# Handle command line parameters
if argv is None:
argv = sys.argv
parser = OptionParser()
parser.add_option(
"-t",
"--time-individual",
action="store_true",
dest="time_individual",
default=False,
)
parser.add_option(
"-e",
"--exclude",
type="string",
dest="exclude_tests",
action="callback",
callback=test_parser,
help="comma or space separated string of tests to skip",
)
parser.add_option(
"-i",
"--include",
type="string",
dest="include_tests",
action="callback",
callback=test_parser,
help="comma or space separated string of tests to include",
)
parser.add_option("-k", "--keep-logs", action="store_true", default=False)
parser.add_option("-s", "--stop-on-first-fail", action="store_true", default=False)
parser.add_option(
"-b",
"--begin-from-test",
type="string",
dest="begin_from_test",
action="callback",
callback=test_parser,
)
parser.add_option(
"-f",
"--results-file",
type="string",
help="write json result to specified file name",
)
(options, args) = parser.parse_args(args=argv)
# Sanity check
if not os.path.isfile("globals"):
print('ERROR: "globals" not here as needed', file=sys.stderr)
return -1
# Clear any environment variables that could break the tests.
# Cray sets some squeue format options that break tests
del os.environ["SQUEUE_ALL"]
del os.environ["SQUEUE_SORT"]
del os.environ["SQUEUE_FORMAT"]
del os.environ["SQUEUE_FORMAT2"]
# Read the current working directory and build a sorted list
# of the available tests.
test_re = re.compile(r"test(\d+)\.(\d+)$")
for filename in os.listdir("."):
match = test_re.match(filename)
if match:
major = int(match.group(1))
minor = int(match.group(2))
if not test_in_list(major, minor, options.exclude_tests) and (
not options.include_tests
or test_in_list(major, minor, options.include_tests)
):
tests.append((major, minor, filename))
if not tests:
print(
"ERROR: no test files found in current working directory", file=sys.stderr
)
return -1
# sory by major, minor
tests.sort(key=lambda t: (t[0], t[1]))
# Set begin value
if options.begin_from_test is not None:
begin = options.begin_from_test[0]
# Now run the tests
start_time = time.time()
test_env = os.environ.copy()
if options.stop_on_first_fail:
test_env["SLURM_TESTSUITE_CLEANUP_ON_FAILURE"] = "false"
else:
test_env["SLURM_TESTSUITE_CLEANUP_ON_FAILURE"] = "true"
print("Started:", time.asctime(time.localtime(start_time)), file=sys.stdout)
sys.stdout.flush()
results_list = []
for test in tests:
if begin[0] > test[0] or (begin[0] == test[0] and begin[1] > test[1]):
continue
test_id = "{0}.{1}".format(test[0],test[1])
sys.stdout.write("Running test %s " % test_id)
sys.stdout.flush()
test_dict = {}
test_dict["id"] = test_id
testlog_name = "test{test_id}.log"
try:
os.remove(testlog_name + ".failed")
except:
pass
testlog = open(testlog_name, "w+")
if options.time_individual:
t1 = time.time()
test_dict["start_time"] = float("%.03f" % t1)
try:
child = Popen(
("expect", test[2]),
shell=False,
env=test_env,
stdout=testlog,
stderr=testlog,
)
retcode = child.wait()
except KeyboardInterrupt:
child.send_signal(signal.SIGINT)
retcode = child.wait()
abort = True
if options.time_individual:
t2 = time.time()
minutes = int(int(t2 - t1) / 60)
seconds = (int(t2 - t1)) % 60
if minutes > 0:
sys.stdout.write("%d min " % (minutes))
sys.stdout.write("%.2f sec " % (seconds))
test_dict["duration"] = float("%.03f" % (t2 - t1))
if retcode == 0:
status = "pass"
elif retcode > 127:
status = "skip"
else:
status = "fail"
test_dict["status"] = status
# Determine the reason if requesting a json results file
if status != "pass" and options.results_file:
testlog.flush()
testlog.seek(0)
test_output = testlog.read()
sections = [s for s in test_output.split("=" * 78 + "\n")]
header = sections[1]
body = sections[2]
footer = "".join(sections[3:])
fatals = re.findall(
r"(?ms)\[[^\]]+\][ \[]+Fatal[ \]:]+(.*?) \(fail[^\)]+\)$", body
)
errors = re.findall(
r"(?ms)\[[^\]]+\][ \[]+Error[ \]:]+(.*?) \(subfail[^\)]+\)$", body
)
warnings = re.findall(
r"(?ms)\[[^\]]+\][ \[]+Warning[ \]:]+((?:(?!Warning).)*) \((?:sub)?skip[^\)]+\)$",
body,
)
if fatals:
test_dict["reason"] = fatals[0]
elif errors:
test_dict["reason"] = errors[0]
elif warnings:
test_dict["reason"] = warnings[0]
results_list.append(test_dict)
testlog.close()
if status == "pass":
passed_tests.append(test)
sys.stdout.write("\n")
if not options.keep_logs:
try:
os.remove(testlog_name)
except IOError as e:
print(
"ERROR failed to close %s %s" % (testlog_name, e),
file=sys.stederr,
)
elif status == "skip":
skipped_tests.append(test)
sys.stdout.write("SKIPPED\n")
if not options.keep_logs:
try:
os.remove(testlog_name)
except IOError as e:
print(
"ERROR failed to close %s %s" % (testlog_name, e),
file=sys.stederr,
)
else:
failed_tests.append(test)
os.rename(testlog_name, testlog_name + ".failed")
sys.stdout.write("FAILED!\n")
if options.stop_on_first_fail:
break
sys.stdout.flush()
if abort:
sys.stdout.write("\nRegression interrupted!\n")
break
end_time = time.time()
print("Ended:", time.asctime(time.localtime(end_time)), file=sys.stdout)
print(
"\nTestsuite ran for %d minutes %d seconds"
% ((end_time - start_time) / 60, (end_time - start_time) % 60),
file=sys.stdout,
)
if options.results_file:
with open(options.results_file, "w") as results_file:
json.dump(results_list, results_file)
print("Completions :", len(passed_tests), file=sys.stdout)
print("Failures :", len(failed_tests), file=sys.stdout)
print("Skipped :", len(skipped_tests), file=sys.stdout)
if len(failed_tests) > 0:
print("Failed tests : ", file=sys.stdout)
first = True
for test in failed_tests:
if first:
first = False
else:
sys.stdout.write(",")
sys.stdout.write("%d.%d" % (test[0], test[1]))
sys.stdout.write("\n")
sys.stdout.flush()
if abort:
print("INCOMPLETE", file=sys.stdout)
if len(failed_tests) > 0:
return 1
def test_in_list(major, minor, test_list):
"""Test for whether a test numbered major.minor is in test_list.
"major" and "minor" must be integers. "test_list" is a list of
tuples, each tuple representing one test. The tuples are of the
form:
(major, minor, filename)
Returns True if the test is in the list, and False otherwise.
"""
if not test_list:
return False
for test in test_list:
if (test[0] == "*" or test[0] == major) and (
test[1] == "*" or test[1] == minor
):
return True
return False
def test_parser(option, opt_str, value, parser):
"""Option callback function for the optparse.OptionParser class.
Will take a string representing one or more test names and append
a tuple representing the test into a list in the options's destination
variable.
A string representing test names must patch the regular expression
named "test_re" below. Some examples of exceptable options are:
'1.5'
'test9.8'
'2.6 test3.1 14.2'
'3.4,6.7,8.3'
'1.*'
'*.2'
'1.*,3.8,9.2'
Raises OptionValueError on error.
"""
# Initialize the option's destination array, if is does not already exist.
if not hasattr(parser.values, option.dest):
setattr(parser.values, option.dest, [])
if getattr(parser.values, option.dest) is None:
setattr(parser.values, option.dest, [])
# Get a pointer to the option's destination array.
l = getattr(parser.values, option.dest)
# Split the user's option string into a series of tuples that represent
# each test, and add each tuple to the destination array.
splitter = re.compile(r"[,\s]+")
val = splitter.split(value)
test_re = re.compile(r"(test)?((\d+)|\*)\.((\d+)|\*)$")
for v in val:
m = test_re.match(v)
if not m:
raise OptionValueError
major = m.group(2)
if major != "*":
major = int(major)
minor = m.group(4)
if minor != "*":
minor = int(minor)
l.append((major, minor))
if __name__ == "__main__":
sys.exit(main())

3
slurm-23.11.5.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7a8f4b1b46d3a8ec9a95066b04635c97f9095877f6189a8ff7388e5e74daeef3
size 7365175

3
slurm-24.05.4.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:240a2105c8801bc0d222fa2bbcf46f71392ef94cce9253357e5f43f029adaf9b
size 7183430

3
slurm-24.11.0.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:39ebeeeeb5d874e090b7f2629bd319bfe7c41510931ff2244f85e961bdc69056
size 7254375

3
slurm-24.11.1.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b3a2b54040c89618a3d2de8ebc1661e8d4658d420d3e7a433191a6e65c34b173
size 7243730

54
slurm-rpmlintrc Normal file
View File

@ -0,0 +1,54 @@
addFilter(".*obsolete-not-provided slurm-sched-wiki.*")
addFilter(".*obsolete-not-provided slurmdb-direct.*")
# libslurm provides an ABI and a wire protocol. The wire protocol may change
# with any Slurm version in an incompatible way. The wire protocol is
# implemented in the library libslurm.
# Therefore, multiple versions of libslurm should not be installed on the
# same system.
# Thus, libraries depending on libslurm need to match the installed Slurm
# version - independent of their major versions.
# To host multiple Slurm versions in the same repository we add the version
# string to package names for none-base versions - even to library packages.
# This mainly applies to upgrade packages for Leap and SLE in the maintenance
# channel.
addFilter("libnss_slurm\d_\d{2}_\d{2}.*: E: shlib-policy-name-error.*")
# Our logrotate file names are derived from the service name.
addFilter(".* (W|E): incoherent-logrotate-file /etc/logrotate.d/slurm.*\.conf")
# libpmix2 is opened using dlopen() - no automatic dependency resolution possible
addFilter("slurm(|_.*)-plugins.x86_64: (W|E): explicit-lib-dependency libpmix2")
# We need to build for more than one product. rpmlint tests differ between products
# Some may not trigger on all products.
addFilter("slurm.src: (W|E): unused-rpmlintrc-filter .*")
# ? Why should we package the log dir?
addFilter(".*: E: logrotate-log-dir-not-packaged /var/log")
# these packages contain %service_del_postun_without_restart -
# which we define if it is not defined. This needs to be kept
# as long as we need to support the HPC module for SLE-12.
addFilter("slurm(|-node|-slurmdbd)\..*: systemd-service-without-service_del_postun .*")
# Testsuite is not meant to be installed on a user system.
# The idea is to place the test suite into a package mostly unaltered
# to place it to a test rig without requiring to install the full Slurm
# sources.
# This is by intention - the test suite requires a test suite specific
# systemd unit file.
addFilter("slurm(|_.*)-testsuite.*: E: filelist-forbidden-systemd-userdirs")
# We want to give root a script to set up the test system
addFilter("slurm(|_.*)-testsuite.*: E: (suse-|)filelist-forbidden-fhs23 /root")
# Testsuite needs this as it builds test binaries.
addFilter("slurm(|_.*)-testsuite.*: devel-dependency libnuma-devel")
addFilter("slurm(|_.*)-testsuite.*: E: explicit-lib-dependency libnuma-devel")
# To reduce the amount of preparation, the test suite supplies all required
# settings.
addFilter("slurm(|_.*)-testsuite.*: sudoers-file-unauthorized .*")
# Testsuite needs to override default slurmd.service
addFilter("slurm(|_.*)-testsuite.x86_64: W: suse-filelist-forbidden-systemd-userdirs /etc/systemd/system/slurmd.service")
# dito
addFilter("slurm(|_.*)-testsuite.x86_64: W: systemd-unit-in-etc /etc/systemd/system/slurmd.service")
# No lib dependency - test suite needs devel package to compile tests
addFilter("slurm-testsuite.x86_64: W: explicit-lib-dependency .*")

5475
slurm.changes Normal file

File diff suppressed because it is too large Load Diff

1416
slurm.spec Normal file

File diff suppressed because it is too large Load Diff

7
slurmctld.xml Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>slurmctld</short>
<description>slurmctld is the management daemon for SLURM cluster management.</description>
<port protocol="tcp" port="6817"/>
<port protocol="udp" port="6817"/>
</service>

7
slurmd.xml Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>slurmd</short>
<description>slurmd is the daemon which starts jobs for the SLURM cluster management.</description>
<port protocol="tcp" port="6818"/>
<port protocol="udp" port="6818"/>
</service>

7
slurmdbd.xml Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>slurmd</short>
<description>slurmdbd is the database daemon for the SLURM cluster management.</description>
<port protocol="tcp" port="6819"/>
<port protocol="udp" port="6819"/>
</service>

3
test_setup.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2c340ed694a276a0901f704fd9bcb6cbb7ae28bd4b97a0b1ec708735d944327e
size 3201

13
upgrades Normal file
View File

@ -0,0 +1,13 @@
24.05.4
24.05.3
23.11.1
23.02.7
23.02.6
23.02.5
23.02.3
23.02.0
22.05.11
22.05.10
22.05.5
22.05.2
22.05.0