Skip to content

Commit

Permalink
Merge pull request #18832 from schlad/poo156868_slurm_node
Browse files Browse the repository at this point in the history
HPC: Do not attempt to install slurm-node for old slurm versions
  • Loading branch information
czerw authored Mar 11, 2024
2 parents 5f63456 + ffc1ddd commit aaa04ac
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_pkg mariadb");
} else {
zypper_call("in $slurm_pkg $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_pkg");
} else {
zypper_call("in $slurm_pkg-node");
}

# $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 aaa04ac

Please sign in to comment.