nixos/slurm: update test, add test for enableStools
* Add pure submit host to test 'enableStools' * Disable client.enable on control machine
This commit is contained in:
parent
8026127e47
commit
c8faa482fa
@ -1,7 +1,6 @@
|
|||||||
import ./make-test.nix ({ pkgs, ... }:
|
import ./make-test.nix ({ pkgs, ... }:
|
||||||
let mungekey = "mungeverryweakkeybuteasytointegratoinatest";
|
let mungekey = "mungeverryweakkeybuteasytointegratoinatest";
|
||||||
slurmconfig = {
|
slurmconfig = {
|
||||||
client.enable = true;
|
|
||||||
controlMachine = "control";
|
controlMachine = "control";
|
||||||
nodeName = ''
|
nodeName = ''
|
||||||
control
|
control
|
||||||
@ -20,9 +19,12 @@ in {
|
|||||||
# TODO slrumd port and slurmctld port should be configurations and
|
# TODO slrumd port and slurmctld port should be configurations and
|
||||||
# automatically allowed by the firewall.
|
# automatically allowed by the firewall.
|
||||||
networking.firewall.enable = false;
|
networking.firewall.enable = false;
|
||||||
services.slurm = slurmconfig;
|
services.slurm = {
|
||||||
|
client.enable = true;
|
||||||
|
} // slurmconfig;
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
|
|
||||||
control =
|
control =
|
||||||
{ config, pkgs, ...}:
|
{ config, pkgs, ...}:
|
||||||
{
|
{
|
||||||
@ -31,17 +33,28 @@ in {
|
|||||||
server.enable = true;
|
server.enable = true;
|
||||||
} // slurmconfig;
|
} // slurmconfig;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
submit =
|
||||||
|
{ config, pkgs, ...}:
|
||||||
|
{
|
||||||
|
networking.firewall.enable = false;
|
||||||
|
services.slurm = {
|
||||||
|
enableStools = true;
|
||||||
|
} // slurmconfig;
|
||||||
|
};
|
||||||
|
|
||||||
node1 = computeNode;
|
node1 = computeNode;
|
||||||
node2 = computeNode;
|
node2 = computeNode;
|
||||||
node3 = computeNode;
|
node3 = computeNode;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
testScript =
|
testScript =
|
||||||
''
|
''
|
||||||
startAll;
|
startAll;
|
||||||
|
|
||||||
# Set up authentification across the cluster
|
# Set up authentification across the cluster
|
||||||
foreach my $node (($control,$node1,$node2,$node3))
|
foreach my $node (($submit,$control,$node1,$node2,$node3))
|
||||||
{
|
{
|
||||||
$node->waitForUnit("default.target");
|
$node->waitForUnit("default.target");
|
||||||
|
|
||||||
@ -60,7 +73,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
subtest "can_start_slurmd", sub {
|
subtest "can_start_slurmd", sub {
|
||||||
foreach my $node (($control,$node1,$node2,$node3))
|
foreach my $node (($node1,$node2,$node3))
|
||||||
{
|
{
|
||||||
$node->succeed("systemctl restart slurmd.service");
|
$node->succeed("systemctl restart slurmd.service");
|
||||||
$node->waitForUnit("slurmd");
|
$node->waitForUnit("slurmd");
|
||||||
@ -72,7 +85,7 @@ in {
|
|||||||
subtest "run_distributed_command", sub {
|
subtest "run_distributed_command", sub {
|
||||||
# Run `hostname` on 3 nodes of the partition (so on all the 3 nodes).
|
# Run `hostname` on 3 nodes of the partition (so on all the 3 nodes).
|
||||||
# The output must contain the 3 different names
|
# The output must contain the 3 different names
|
||||||
$control->succeed("srun -N 3 hostname | sort | uniq | wc -l | xargs test 3 -eq");
|
$submit->succeed("srun -N 3 hostname | sort | uniq | wc -l | xargs test 3 -eq");
|
||||||
};
|
};
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user