From 797253acaca240a6e80dd659d787cc0c77c0027b Mon Sep 17 00:00:00 2001 From: Sebastian Chlad Date: Thu, 7 Mar 2024 09:10:11 +0100 Subject: [PATCH] HPC: Do not attempt to install slurm-node for old slurm versions For the older, base, slurm versions there is no slurm-node package. The tests attempt to install it which leads to conflicts. Also, the slurm base version, does not provide mariadb as a dependency, so that must be installed explicitly --- tests/hpc/slurm_db.pm | 13 ++++++++++--- tests/hpc/slurm_slave.pm | 12 ++++++++++-- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/tests/hpc/slurm_db.pm b/tests/hpc/slurm_db.pm index 98abfd11f908..a371d86e6be4 100644 --- a/tests/hpc/slurm_db.pm +++ b/tests/hpc/slurm_db.pm @@ -25,10 +25,17 @@ sub run ($self) { $self->prepare_user_and_group(); - # Install slurm + # If one wants to test unversioned slurm, one should not + # install slurm-node at all. Also slurm rpm does not + # provide mariadb as a dependency + if ($slurm_pkg eq 'slurm' and is_sle('=12-sp5')) { + zypper_call("in slurm mariadb"); + } else { + zypper_call("in $slurm_pkg-node"); + } + # $slurm_pkg-munge is installed explicitly since slurm_23_02 - zypper_call("in $slurm_pkg $slurm_pkg-munge $slurm_pkg-slurmdbd"); - zypper_call("in $slurm_pkg-node"); + zypper_call("in $slurm_pkg-munge $slurm_pkg-slurmdbd"); my $mariadb_service = "mariadb"; $mariadb_service = "mysql" if is_sle('<12-sp4'); diff --git a/tests/hpc/slurm_slave.pm b/tests/hpc/slurm_slave.pm index 32a91fc05c80..524bc4f7de2a 100644 --- a/tests/hpc/slurm_slave.pm +++ b/tests/hpc/slurm_slave.pm @@ -13,6 +13,7 @@ use testapi; use serial_terminal 'select_serial_terminal'; use lockapi; use utils; +use version_utils 'is_sle'; use hpc::utils 'get_slurm_version'; sub run ($self) { @@ -20,9 +21,16 @@ sub run ($self) { $self->prepare_user_and_group(); my $slurm_pkg = get_slurm_version(get_var('SLURM_VERSION', '')); - # Install slurm + # If one wants to test unversioned slurm, one should not + # install slurm-node at all. + if ($slurm_pkg eq 'slurm' and is_sle('=12-sp5')) { + zypper_call("in slurm"); + } else { + zypper_call("in $slurm_pkg-node $slurm_pkg-munge"); + } + # $slurm_pkg-munge is installed explicitly since slurm_23_02 - zypper_call("in $slurm_pkg-node $slurm_pkg-munge"); + zypper_call("in $slurm_pkg-munge"); if (get_required_var('EXT_HPC_TESTS')) { zypper_ar(get_required_var('DEVEL_TOOLS_REPO'), no_gpg_check => 1);