Skip to content

Commit

Permalink
HPC: Do not attempt to install slurm-node for old slurm versions
Browse files Browse the repository at this point in the history
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
  • Loading branch information
schlad committed Mar 7, 2024
1 parent 03dc455 commit 797253a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
13 changes: 10 additions & 3 deletions tests/hpc/slurm_db.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
12 changes: 10 additions & 2 deletions tests/hpc/slurm_slave.pm
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,24 @@ 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) {
select_serial_terminal();
$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);
Expand Down

0 comments on commit 797253a

Please sign in to comment.