diff --git a/Fix-test-21.41.patch b/Fix-test-21.41.patch new file mode 100644 index 0000000..bdb0499 --- /dev/null +++ b/Fix-test-21.41.patch @@ -0,0 +1,65 @@ +From: Egbert Eich +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 +Signed-off-by: Egbert Eich +--- + 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" diff --git a/Fix-test-3.13.patch b/Fix-test-3.13.patch new file mode 100644 index 0000000..b07cda1 --- /dev/null +++ b/Fix-test-3.13.patch @@ -0,0 +1,35 @@ +From: Egbert Eich +Date: Wed Jun 15 08:40:50 2022 +0200 +Subject: - Fix test 3.13 +Patch-mainline: Not yet +Git-repo: https://github.com/SchedMD/slurm +Git-commit: cc82d21d77ccd4753ed56f80e14cfa13acd3643d +References: + +Signed-off-by: Egbert Eich +Signed-off-by: Egbert Eich +--- + testsuite/expect/test3.13 | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) +diff --git a/testsuite/expect/test3.13 b/testsuite/expect/test3.13 +index bcce201215..9781ffcff9 100755 +--- a/testsuite/expect/test3.13 ++++ b/testsuite/expect/test3.13 +@@ -109,7 +109,7 @@ log_info "Test 1" + set no_jobs 0 + spawn $scontrol update JobName=$script_name UserID=1 Priority=$new_prio + expect { +- -re "No jobs with" { ++ -re "Invalid UserID" { + set no_jobs 1 + exp_continue + } +@@ -130,7 +130,7 @@ set no_jobs 0 + set my_uid [get_my_uid] + spawn $scontrol update JobName=$script_name UserID=$my_uid Priority=$new_prio + expect { +- -re "No jobs with" { ++ -re "Invalid UserID" { + set no_jobs 1 + exp_continue + } diff --git a/Fix-test-32.8.patch b/Fix-test-32.8.patch new file mode 100644 index 0000000..9927bbd --- /dev/null +++ b/Fix-test-32.8.patch @@ -0,0 +1,26 @@ +From: Egbert Eich +Date: Wed Jun 15 08:41:16 2022 +0200 +Subject: Fix test 32.8 +Patch-mainline: Not yet +Git-repo: https://github.com/SchedMD/slurm +Git-commit: 6641a03b1d1dfcb937617067f50c8069a04ec9b0 +References: + +Signed-off-by: Egbert Eich +Signed-off-by: Egbert Eich +--- + testsuite/expect/test32.8 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) +diff --git a/testsuite/expect/test32.8 b/testsuite/expect/test32.8 +index 76f65c3ccc..61dba8759b 100755 +--- a/testsuite/expect/test32.8 ++++ b/testsuite/expect/test32.8 +@@ -86,7 +86,7 @@ if {$job_id == 0} { + } + + wait_for_job -fail $job_id "DONE" +-wai_for_file -fail $file_out ++wait_for_file -fail $file_out + + set number_1 -1 + set number_2 -1 diff --git a/Fix-test-38.11.patch b/Fix-test-38.11.patch new file mode 100644 index 0000000..2e06a15 --- /dev/null +++ b/Fix-test-38.11.patch @@ -0,0 +1,30 @@ +From: Egbert Eich +Date: Wed Jun 15 08:41:45 2022 +0200 +Subject: Fix test 38.11 +Patch-mainline: Not yet +Git-repo: https://github.com/SchedMD/slurm +Git-commit: 235768790cb2e9cf011e6d08116a468ebec71582 +References: + +Signed-off-by: Egbert Eich +Signed-off-by: Egbert Eich +--- + testsuite/expect/test38.11 | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) +diff --git a/testsuite/expect/test38.11 b/testsuite/expect/test38.11 +index d2c07d60c7..bf5d10ecc9 100755 +--- a/testsuite/expect/test38.11 ++++ b/testsuite/expect/test38.11 +@@ -99,9 +99,9 @@ make_bash_script $script " + $srun -N1 -n1 --het-group=0 mkdir -p $tmp_dir/$node1 + $srun -N1 -n1 --het-group=1 mkdir -p $tmp_dir/$node2 + +-$sbcast -f -j$het_job_id $srun $tmp_dir/file +-$sbcast -f -j${het_job_id}+0 $srun $tmp_dir/$node1/file_comp0 +-$sbcast -f -j${het_job_id}+1 $srun $tmp_dir/$node2/file_comp1 ++$sbcast -f -j\$SLURM_JOBID $srun $tmp_dir/file ++$sbcast -f -j\$SLURM_JOBID $srun $tmp_dir/$node1/file_comp0 ++$sbcast -f -j\$((SLURM_JOBID+1)) $srun $tmp_dir/$node2/file_comp1 + + echo -n \"\nChecking node 1: \" + $srun -Q -N1 -n1 --het-group=1 ls $tmp_dir/file diff --git a/Fix-test7.2-to-find-libpmix-under-lib64-as-well.patch b/Fix-test7.2-to-find-libpmix-under-lib64-as-well.patch new file mode 100644 index 0000000..f557bce --- /dev/null +++ b/Fix-test7.2-to-find-libpmix-under-lib64-as-well.patch @@ -0,0 +1,26 @@ +From: Egbert Eich +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 +Signed-off-by: Egbert Eich +--- + 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" + } + diff --git a/Keep-logs-of-skipped-test-when-running-test-cases-sequentially.patch b/Keep-logs-of-skipped-test-when-running-test-cases-sequentially.patch new file mode 100644 index 0000000..42b9115 --- /dev/null +++ b/Keep-logs-of-skipped-test-when-running-test-cases-sequentially.patch @@ -0,0 +1,27 @@ +From: Egbert Eich +Date: Wed Jun 22 16:32:35 2022 +0200 +Subject: Keep logs of skipped test when running test cases sequentially. +Patch-mainline: Not yet +Git-repo: https://github.com/SchedMD/slurm +Git-commit: 457a53ca97b50530bb2fafda72d465507c434960 +References: + +Signed-off-by: Egbert Eich +Signed-off-by: Egbert Eich +--- + testsuite/expect/regression.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) +diff --git a/testsuite/expect/regression.py b/testsuite/expect/regression.py +index bcccaadbf5..b39af0c4e2 100755 +--- a/testsuite/expect/regression.py ++++ b/testsuite/expect/regression.py +@@ -199,7 +199,8 @@ def main(argv=None): + sys.stdout.write('SKIPPED\n') + if not options.keep_logs: + try: +- os.remove(testlog_name) ++# os.remove(testlog_name) ++ os.rename(testlog_name, testlog_name+'.skipped') + except IOError as e: + print('ERROR failed to close %s %s' % (testlog_name, e), + file=sys.stederr); diff --git a/README_Testsuite.md b/README_Testsuite.md new file mode 100644 index 0000000..d32da13 --- /dev/null +++ b/README_Testsuite.md @@ -0,0 +1,128 @@ +# 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 minimal text mode installation. +2. Add NFS kernel server support: + ``` + # zypper install nfs-kernel-server + ``` +3. 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 + ``` +4. Create a test user 'auser' allow ssh from/to root: + ``` + # useradd -m auser + # cp -r /root/.ssh /home/auser + ``` +5. 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" + # cat > root/etc/sysconfig/network/ifcfg-lan0 <> /etc/exports <> /etc/fstab < + +- update to 22.05.2 with following fixes: + * Fix regression which allowed the oversubscription of licenses. + * Fix a segfault in slurmctld when requesting gres in job arrays. + +------------------------------------------------------------------- +Wed Jun 8 13:15:24 UTC 2022 - Egbert Eich + +- Package the Slurm testsuite for QA purposes. + NOTE: This package is not meant to be used for testing by the + user but rather for testing by the maintainers to ensure the + package is working properly. + DO NOT report test suite failures unless you are able to confirm + that the failure is really a bug. + * Fixes for test suite: + Keep-logs-of-skipped-test-when-running-test-cases-sequentially.patch + Fix-test-21.41.patch + Fix-test-38.11.patch + Fix-test-32.8.patch + Fix-test-3.13.patch + Fix-test7.2-to-find-libpmix-under-lib64-as-well.patch + * Add documentation: + README_Testsuite.md +- Allow log in as user 'slurm'. This allows admins to run certain + priviledged commands more easily without becoming root. + ------------------------------------------------------------------- Tue May 31 12:56:05 UTC 2022 - Christian Goll diff --git a/slurm.spec b/slurm.spec index 9ad0ae9..fcfacfa 100644 --- a/slurm.spec +++ b/slurm.spec @@ -18,7 +18,7 @@ # Check file META in sources: update so_version to (API_CURRENT - API_AGE) %define so_version 38 -%define ver 22.05.0 +%define ver 22.05.2 %define _ver _22_05 %define dl_ver %{ver} # so-version is 0 and seems to be stable @@ -29,6 +29,8 @@ %define pname slurm +%define slurm_testsuite 1 + %ifarch i586 %arm s390 ExclusiveArch: do_not_build %endif @@ -49,7 +51,7 @@ ExclusiveArch: do_not_build %if 0%{?sle_version} == 150200 %define base_ver 2002 %endif -%if 0%{?sle_version} == 150300 +%if 0%{?sle_version} == 150300 || 0%{?sle_version} == 150400 %define base_ver 2011 %endif @@ -87,6 +89,7 @@ ExclusiveArch: do_not_build %define have_http_parser 1 %endif +# it seems as disabling slurmrestd has no effect on 22.05 %if 0%{?have_http_parser} && 0%{?have_json_c} %define build_slurmrestd 1 %endif @@ -124,7 +127,7 @@ ExclusiveArch: do_not_build %define slurm_g root %endif %define slurm_uid 120 -%define slurmdir %{_sysconfdir}/slurm +%define slurmdir %{_rundir}/slurm %define slurmdescr "SLURM workload manager" %define libslurm libslurm%{so_version} @@ -133,6 +136,9 @@ ExclusiveArch: do_not_build %if !0%{?_pam_moduledir:1} %define _pam_moduledir /%_lib %endif +%if !0%{?%_pam_secconfdir:1} +%define _pam_secconfdir %_sysconfdir/security +%endif Name: %{pname}%{?upgrade:%{_ver}} Version: %{ver} @@ -146,8 +152,17 @@ Source1: slurm-rpmlintrc Source10: https://raw.githubusercontent.com/openSUSE/hpc/10c105e/files/slurm/slurmd.xml Source11: https://raw.githubusercontent.com/openSUSE/hpc/10c105e/files/slurm/slurmctld.xml Source12: https://raw.githubusercontent.com/openSUSE/hpc/10c105e/files/slurm/slurmdbd.xml +# create: tar --owner=nobody --group=nogroup -cvzf test_setup.tar.gz test_setup +Source20: test_setup.tar.gz +Source21: README_Testsuite.md Patch0: Remove-rpath-from-build.patch Patch2: pam_slurm-Initialize-arrays-and-pass-sizes.patch +Patch10: Fix-test-21.41.patch +Patch11: Fix-test-38.11.patch +Patch12: Fix-test-32.8.patch +Patch13: Fix-test-3.13.patch +Patch14: Keep-logs-of-skipped-test-when-running-test-cases-sequentially.patch +Patch15: Fix-test7.2-to-find-libpmix-under-lib64-as-well.patch %{?upgrade:Provides: %{pname} = %{version}} %{?upgrade:Conflicts: %{pname}} @@ -229,12 +244,14 @@ management, scheduling and accounting modules. %package doc Summary: Documentation for SLURM Group: Documentation/HTML +BuildArch: noarch %{?upgrade:Provides: %{pname}-doc = %{version}} %{?upgrade:Conflicts: %{pname}-doc} %package webdoc Summary: Set up SLURM Documentation Server Group: Productivity/Clustering/Computing +BuildArch: noarch %if 0%{?have_apache_rpm_macros} BuildRequires: apache-rpm-macros %else @@ -500,6 +517,7 @@ Recommends: (%{name}-munge = %version if munge) %else Recommends: %{name}-munge = %version %endif +%{?with_pmix:Recommends: pmix-devel} %if 0%{?with_systemd} %{?systemd_ordering} %else @@ -515,6 +533,7 @@ This package contains just the minmal code to run a compute node. Summary: Config files and directories for slurm services Group: Productivity/Clustering/Computing Requires: logrotate +BuildArch: noarch %if 0%{?suse_version} <= 1140 Requires(pre): pwdutils %else @@ -533,6 +552,7 @@ for the slurm daemons. %package config-man Summary: Config files and directories for slurm services Group: Documentation/Man +BuildArch: noarch %{?upgrade:Provides: %{pname}-config-man = %{version}} %{?upgrade:Conflicts: %{pname}-config-man} @@ -556,12 +576,61 @@ Group: Productivity/Clustering/Computing Plugins for specific cray hardware, includes power and knl node management. Contains also cray specific documentation. +%package testsuite +Summary: Regression tests from Slurm sources +Group: Productivity/Clustering/Computing +Requires: %{name} = %version +Requires: %{name}-auth-none = %version +Requires: %{name}-cray = %version +Requires: %{name}-devel = %version +Requires: %{name}-hdf5 = %version +Requires: %{name}-lua = %version +Requires: %{name}-munge = %version +Requires: %{name}-node = %version +Requires: %{name}-openlava = %version +Requires: %{name}-rest = %version +Requires: %{name}-seff = %version +Requires: %{name}-sjstat = %version +Requires: %{name}-slurmdbd = %version +Requires: %{name}-sql = %version +Requires: %{name}-torque = %version +Requires: mariadb +%{?with_pmix:Requires: pmix-devel} +Requires: bzip2 +Requires: expect +Requires: gcc-c++ +Requires: libnuma-devel +Requires: openmpi4-gnu-hpc-devel +Requires: pdsh +Requires: perl-%{name} = %version +Requires: sudo +Requires: tar +BuildRequires: sudo + +%description testsuite +NOTE: THIS PACKAGE IS FOR TESTING PURPOSES ONLY. IT REQUIRES A +DEDICATED TESTING ENVIRONMENT. + +DO NOT INSTALL ON A PRODUCTION SYSTEM! + +Slurm provides a test set implemented as 'expect' scripts. +Not all of the tests are expected to pass, some require a modified +configuration. This test package is meant for internal purposes. +Do not run test suite and file bug reports for each failed test! + %prep %setup -q -n %{pname}-%{dl_ver} %patch0 -p1 #%%patch1 -p1 %patch2 -p1 #%%patch3 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 +%patch13 -p1 +%patch14 -p1 +%patch15 -p1 + %if 0%{?python_ver} < 3 # Workaround for wrongly flagged python3 to keep SLE-11-SP4 building mkdir -p mybin; ln -s /usr/bin/python2 mybin/python3 @@ -579,9 +648,9 @@ autoreconf --without-datawarp \ --with-shared-libslurm \ --with-pam_dir=%_pam_moduledir \ - %{?with_pmix:--with-pmix=/usr/} \ -%if 0%{?build_slurmrestd} - --enable-slurmrestd \ + %{?with_pmix:--with-pmix=%_prefix/} \ +%if 0%{!?build_slurmrestd:1} + --disable-slurmrestd \ %endif --with-yaml \ %{!?have_netloc:--without-netloc} \ @@ -620,7 +689,6 @@ mkdir -p %{buildroot}%{_localstatedir}/spool/slurm install -D -m644 etc/cgroup.conf.example %{buildroot}/%{_sysconfdir}/%{pname}/cgroup.conf install -D -m644 etc/slurm.conf.example %{buildroot}/%{_sysconfdir}/%{pname}/slurm.conf.example install -D -m600 etc/slurmdbd.conf.example %{buildroot}/%{_sysconfdir}/%{pname}/slurmdbd.conf -install -D -m600 etc/slurmdbd.conf.example %{buildroot}%{_sysconfdir}/%{pname}/slurmdbd.conf.example install -D -m755 contribs/sjstat %{buildroot}%{_bindir}/sjstat install -D -m755 contribs/sgather/sgather %{buildroot}%{_bindir}/sgather %if 0%{?have_firewalld} @@ -677,7 +745,8 @@ sed -i -e "s@PIDFile=.*@PIDFile=%{_localstatedir}/run/slurm/slurmdbd.pid@" \ -e 's@After=\(.*\)@After=\1 mariadb.service@' \ %{buildroot}/%{_unitdir}/slurmdbd.service %if 0%{?have_sysuser} -echo "u %slurm_u %{slurm_uid} \"%slurmdescr\" %{slurmdir}\n" > system-user-%{pname}.conf +[ -e /usr/bin/bash ] && BASH_BIN=/usr/bin/bash || BASH_BIN=/bin/bash +echo "u %slurm_u %{slurm_uid} \"%slurmdescr\" %{slurmdir} ${BASH_BIN}" > system-user-%{pname}.conf %sysusers_generate_pre system-user-%{pname}.conf %{pname} system-user-%{pname}.conf install -D -m 644 system-user-%{pname}.conf %{buildroot}%{_sysusersdir}/system-user-%{pname}.conf %endif @@ -763,10 +832,84 @@ cat > %{buildroot}/%{_sysconfdir}/%{pname}/nss_slurm.conf < %{buildroot}/srv/slurm-testsuite/testsuite/expect/globals.local < %{buildroot}/etc/sudoers.d/slurm +chmod 0440 %{buildroot}/etc/sudoers.d/slurm + +SLURMD_SERVICE=%{buildroot}%_sysconfdir/systemd/system/slurmd.service +mkdir -p `dirname $SLURMD_SERVICE` +cp %{buildroot}/%_unitdir/slurmd.service $SLURMD_SERVICE +if grep -qE "^LimitNPROC" $SLURMD_SERVICE; then + sed -i -e '/LimitNPROC/s@=.*@=infinity@' $SLURMD_SERVICE +else + sed -i -e '/LimitSTACK/aLimitNPROC=infinity' $SLURMD_SERVICE +fi +sed -i -e '/ExecStart/aExecStartPre=/bin/bash -c "for i in 0 1 2 3; do test -e /dev/nvidia$i || mknod /dev/nvidia$i c 10 $((i+2)); done"' $SLURMD_SERVICE + +tar -xzf %{S:20} +mkdir -p %{buildroot}%{_pam_secconfdir}/limits.d +mv test_setup/slurm.conf.limits %{buildroot}%_pam_secconfdir/limits.d/slurm.conf + +mkdir -p %{buildroot}/root +mv test_setup/setup-testsuite.sh %{buildroot}/root + +mkdir -p %{buildroot}/srv/slurm-testsuite/config/plugstack.conf.d +mv test_setup/* %{buildroot}/srv/slurm-testsuite/config +cp %{S:21} . +%endif + %fdupes -s %{buildroot} + # Temporary - remove when build is fixed upstream. %if !0%{?build_slurmrestd} -rm -f %{buildroot}/%{_mandir}/man8/slurmrestd.* +rm -f %{buildroot}%{_mandir}/man8/slurmrestd.* +rm -f %{buildroot}%{_libdir}/slurm/openapi_*.so +rm -f %{buildroot}%{_libdir}/slurm/rest_auth_*.so %endif %check @@ -861,7 +1004,7 @@ rm -f %{buildroot}/%{_mandir}/man8/slurmrestd.* %pre config %{?have_sysuser:-f %{pname}.pre} %if 0%{!?have_sysuser:1} getent group %slurm_g >/dev/null || groupadd -r %slurm_g -getent passwd %slurm_u >/dev/null || useradd -r -g %slurm_g -d %slurmdir -s /bin/false -c %{slurmdescr} %slurm_u +getent passwd %slurm_u >/dev/null || useradd -r -g %slurm_g -d %slurmdir -s /bin/bash -c %{slurmdescr} %slurm_u [ -d %{_localstatedir}/spool/slurm ] && /bin/chown -h %slurm_u:%slurm_g %{_localstatedir}/spool/slurm exit 0 %endif @@ -884,6 +1027,13 @@ exit 0 %post -n libnss_%{pname}%{nss_so}%{?upgrade:%{_ver}} -p /sbin/ldconfig %postun -n libnss_%{pname}%{nss_so}%{?upgrade:%{_ver}} -p /sbin/ldconfig +%post testsuite +rm -rf /srv/slurm-testsuite/src /srv/slurm-testsuite/testsuite /srv/slurm-testsuite/config.h +tar --same-owner -C /srv/slurm-testsuite -xjf /srv/slurm-testsuite/slurmtest.tar.bz2 + +%preun testsuite +rm -rf /srv/slurm-testsuite/src /srv/slurm-testsuite/testsuite /srv/slurm-testsuite/config.h + %{!?nil: # On update the %%postun code of the old package restarts the # service. This breaks in case the ABI between slurm and its @@ -1015,7 +1165,7 @@ exit 0 %files webdoc %{?comp_at} -%{apache_sysconfdir}/conf.d/slurm.conf +%config %{apache_sysconfdir}/conf.d/slurm.conf %files -n %{libslurm} %{?comp_at} @@ -1069,7 +1219,6 @@ exit 0 %{_mandir}/man5/slurmdbd.* %{_mandir}/man8/slurmdbd.* %config(noreplace) %attr(0600,%slurm_u,%slurm_g) %{_sysconfdir}/%{pname}/slurmdbd.conf -%attr(0600,%slurm_u,%slurm_g) %{_sysconfdir}/%{pname}/slurmdbd.conf.example %if 0%{?with_systemd} %{_unitdir}/slurmdbd.service %else @@ -1105,7 +1254,9 @@ exit 0 %{_libdir}/slurm/burst_buffer_lua.so %{?have_json_c:%{_libdir}/slurm/burst_buffer_datawarp.so} %{_libdir}/slurm/cgroup_v1.so +%if 0%{?suse_version} >= 1500 %{_libdir}/slurm/cgroup_v2.so +%endif %{_libdir}/slurm/core_spec_none.so %{_libdir}/slurm/cli_filter_none.so %{_libdir}/slurm/cli_filter_lua.so @@ -1310,4 +1461,23 @@ exit 0 %{_libdir}/slurm/power_cray_aries.so %endif +%if 0%{?slurm_testsuite} +%files testsuite +%defattr(-, %slurm_u, %slurm_u, -) +%dir %attr(-, %slurm_u, %slurm_u) /srv/slurm-testsuite +%if 0%{?sle_version} == 120200 +%dir %{_pam_secconfdir}/limits.d +%endif +%doc testsuite/expect/README +%doc %{basename: %{S:21}} +%config %attr( -, root, root) %{_sysconfdir}/systemd/system/slurmd.service +%config %attr(0440, root, root) %{_sysconfdir}/sudoers.d/slurm +%config %attr( -, root, root) %{_pam_secconfdir}/limits.d/slurm.conf +%{_libdir}/slurm/libslurm.so +%attr(0600, %slurm_u, %slurm_g) /srv/slurm-testsuite/config/slurmdbd.conf +/srv/slurm-testsuite/* +%dir %attr(-, %slurm_u, %slurm_g) %_localstatedir/lib/slurm/shared +%attr( -, root, root) /root/setup-testsuite.sh +%endif + %changelog diff --git a/test_setup.tar.gz b/test_setup.tar.gz new file mode 100644 index 0000000..2f44713 --- /dev/null +++ b/test_setup.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:981cd56a0203f88f65ff762b6ab09655d7f529bc383e5ffc7f5d0a034001a9ea +size 3104