From 916520151e495fae53c467c8667cecf8a3570f0c Mon Sep 17 00:00:00 2001 From: Daniel Kuehn Date: Sun, 27 Oct 2019 13:46:05 +0100 Subject: [PATCH 1/5] nixos/ceph: Rename old ceph test and add new multi-node test Rename the old ceph test to ceph-single-node and add a new test ceph-multi-node. The ceph-single-node represents a dev cluster whereas ceph-multi-node is closer to a prod cluster. --- nixos/tests/ceph-multi-node.nix | 231 ++++++++++++++++++ .../tests/{ceph.nix => ceph-single-node.nix} | 0 2 files changed, 231 insertions(+) create mode 100644 nixos/tests/ceph-multi-node.nix rename nixos/tests/{ceph.nix => ceph-single-node.nix} (100%) diff --git a/nixos/tests/ceph-multi-node.nix b/nixos/tests/ceph-multi-node.nix new file mode 100644 index 00000000000..a42d2b87c4a --- /dev/null +++ b/nixos/tests/ceph-multi-node.nix @@ -0,0 +1,231 @@ +import ./make-test.nix ({pkgs, lib, ...}: + +let + generateCephConfig = { daemonConfig }: { + enable = true; + global = { + fsid = "066ae264-2a5d-4729-8001-6ad265f50b03"; + monInitialMembers = "a"; + monHost = "192.168.1.1"; + }; + } // daemonConfig; + + generateHost = { pkgs, cephConfig, networkConfig, ... }: { + virtualisation = { + memorySize = 1536; + emptyDiskImages = [ 20480 ]; + vlans = [ 1 ]; + }; + + networking = networkConfig; + + environment.systemPackages = with pkgs; [ + bash + sudo + ceph + xfsprogs + netcat-openbsd + ]; + + boot.kernelModules = [ "xfs" ]; + + services.ceph = cephConfig; + + # So that we don't have to battle systemd when bootstraping + systemd.targets.ceph.wantedBy = lib.mkForce []; + }; + + networkMonA = { + dhcpcd.enable = false; + interfaces.eth1.ipv4.addresses = pkgs.lib.mkOverride 0 [ + { address = "192.168.1.1"; prefixLength = 24; } + ]; + firewall = { + allowedTCPPorts = [ 6789 3300 ]; + allowedTCPPortRanges = [ { from = 6800; to = 7300; } ]; + }; + }; + cephConfigMonA = generateCephConfig { daemonConfig = { + mon = { + enable = true; + daemons = [ "a" ]; + }; + mgr = { + enable = true; + daemons = [ "a" ]; + }; + }; }; + + networkOsd0 = { + dhcpcd.enable = false; + interfaces.eth1.ipv4.addresses = pkgs.lib.mkOverride 0 [ + { address = "192.168.1.2"; prefixLength = 24; } + ]; + firewall = { + allowedTCPPortRanges = [ { from = 6800; to = 7300; } ]; + }; + }; + cephConfigOsd0 = generateCephConfig { daemonConfig = { + osd = { + enable = true; + daemons = [ "0" ]; + }; + }; }; + + networkOsd1 = { + dhcpcd.enable = false; + interfaces.eth1.ipv4.addresses = pkgs.lib.mkOverride 0 [ + { address = "192.168.1.3"; prefixLength = 24; } + ]; + firewall = { + allowedTCPPortRanges = [ { from = 6800; to = 7300; } ]; + }; + }; + cephConfigOsd1 = generateCephConfig { daemonConfig = { + osd = { + enable = true; + daemons = [ "1" ]; + }; + }; }; +in { + name = "basic-multi-node-ceph-cluster"; + meta = with pkgs.stdenv.lib.maintainers; { + maintainers = [ lejonet ]; + }; + + nodes = { + monA = generateHost { pkgs = pkgs; cephConfig = cephConfigMonA; networkConfig = networkMonA; }; + osd0 = generateHost { pkgs = pkgs; cephConfig = cephConfigOsd0; networkConfig = networkOsd0; }; + osd1 = generateHost { pkgs = pkgs; cephConfig = cephConfigOsd1; networkConfig = networkOsd1; }; + }; + + testScript = { ... }: '' + startAll; + + $monA->waitForUnit("network.target"); + $osd0->waitForUnit("network.target"); + $osd1->waitForUnit("network.target"); + + # Create the ceph-related directories + $monA->mustSucceed( + "mkdir -p /var/lib/ceph/mgr/ceph-a", + "mkdir -p /var/lib/ceph/mon/ceph-a", + "chown ceph:ceph -R /var/lib/ceph/", + "mkdir -p /etc/ceph", + "chown ceph:ceph -R /etc/ceph" + ); + $osd0->mustSucceed( + "mkdir -p /var/lib/ceph/osd/ceph-0", + "chown ceph:ceph -R /var/lib/ceph/", + "mkdir -p /etc/ceph", + "chown ceph:ceph -R /etc/ceph" + ); + $osd1->mustSucceed( + "mkdir -p /var/lib/ceph/osd/ceph-1", + "chown ceph:ceph -R /var/lib/ceph/", + "mkdir -p /etc/ceph", + "chown ceph:ceph -R /etc/ceph" + ); + + # Bootstrap ceph-mon daemon + $monA->mustSucceed( + "sudo -u ceph ceph-authtool --create-keyring /tmp/ceph.mon.keyring --gen-key -n mon. --cap mon 'allow *'", + "sudo -u ceph ceph-authtool --create-keyring /etc/ceph/ceph.client.admin.keyring --gen-key -n client.admin --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow *' --cap mgr 'allow *'", + "sudo -u ceph ceph-authtool /tmp/ceph.mon.keyring --import-keyring /etc/ceph/ceph.client.admin.keyring", + "monmaptool --create --add a 192.168.1.1 --fsid 066ae264-2a5d-4729-8001-6ad265f50b03 /tmp/monmap", + "sudo -u ceph ceph-mon --mkfs -i a --monmap /tmp/monmap --keyring /tmp/ceph.mon.keyring", + "sudo -u ceph touch /var/lib/ceph/mon/ceph-a/done", + "systemctl start ceph-mon-a" + ); + $monA->waitForUnit("ceph-mon-a"); + $monA->mustSucceed("ceph mon enable-msgr2"); + + # Can't check ceph status until a mon is up + $monA->succeed("ceph -s | grep 'mon: 1 daemons'"); + + # Start the ceph-mgr daemon, it has no deps and hardly any setup + $monA->mustSucceed( + "ceph auth get-or-create mgr.a mon 'allow profile mgr' osd 'allow *' mds 'allow *' > /var/lib/ceph/mgr/ceph-a/keyring", + "systemctl start ceph-mgr-a" + ); + $monA->waitForUnit("ceph-mgr-a"); + $monA->waitUntilSucceeds("ceph -s | grep 'quorum a'"); + $monA->waitUntilSucceeds("ceph -s | grep 'mgr: a(active,'"); + + # Send the admin keyring to the OSD machines + $osd0->mustSucceed("nc -vlkN 6800 > /etc/ceph/ceph.client.admin.keyring &"); + $osd1->mustSucceed("nc -vlkN 6800 > /etc/ceph/ceph.client.admin.keyring &"); + $osd0->waitForOpenPort("6800"); + $osd1->waitForOpenPort("6800"); + $monA->mustSucceed( + "nc 192.168.1.2 6800 < /etc/ceph/ceph.client.admin.keyring", + "nc 192.168.1.3 6800 < /etc/ceph/ceph.client.admin.keyring" + ); + + # Bootstrap both OSDs + $osd0->mustSucceed( + "mkfs.xfs /dev/vdb", + "mount /dev/vdb /var/lib/ceph/osd/ceph-0", + "ceph-authtool --create-keyring /var/lib/ceph/osd/ceph-0/keyring --name osd.0 --add-key AQBCEJNa3s8nHRAANvdsr93KqzBznuIWm2gOGg==", + "echo '{\"cephx_secret\": \"AQBCEJNa3s8nHRAANvdsr93KqzBznuIWm2gOGg==\"}' | ceph osd new 55ba2294-3e24-478f-bee0-9dca4c231dd9 -i -", + ); + $osd1->mustSucceed( + "mkfs.xfs /dev/vdb", + "mount /dev/vdb /var/lib/ceph/osd/ceph-1", + "ceph-authtool --create-keyring /var/lib/ceph/osd/ceph-1/keyring --name osd.1 --add-key AQBEEJNac00kExAAXEgy943BGyOpVH1LLlHafQ==", + "echo '{\"cephx_secret\": \"AQBEEJNac00kExAAXEgy943BGyOpVH1LLlHafQ==\"}' | ceph osd new 5e97a838-85b6-43b0-8950-cb56d554d1e5 -i -" + ); + + # Initialize the OSDs with regular filestore + $osd0->mustSucceed( + "ceph-osd -i 0 --mkfs --osd-uuid 55ba2294-3e24-478f-bee0-9dca4c231dd9", + "chown -R ceph:ceph /var/lib/ceph/osd", + "systemctl start ceph-osd-0", + ); + $osd1->mustSucceed( + "ceph-osd -i 1 --mkfs --osd-uuid 5e97a838-85b6-43b0-8950-cb56d554d1e5", + "chown -R ceph:ceph /var/lib/ceph/osd", + "systemctl start ceph-osd-1" + ); + $monA->waitUntilSucceeds("ceph osd stat | grep -e '2 osds: 2 up[^,]*, 2 in'"); + $monA->waitUntilSucceeds("ceph -s | grep 'mgr: a(active,'"); + $monA->waitUntilSucceeds("ceph -s | grep 'HEALTH_OK'"); + + $monA->mustSucceed( + "ceph osd pool create multi-node-test 100 100", + "ceph osd pool ls | grep 'multi-node-test'", + "ceph osd pool rename multi-node-test multi-node-other-test", + "ceph osd pool ls | grep 'multi-node-other-test'", + "ceph -s | grep '1 pools, 100 pgs'", + "ceph osd pool set multi-node-other-test size 2" + ); + $monA->waitUntilSucceeds("ceph -s | grep 'HEALTH_OK'"); + $monA->waitUntilSucceeds("ceph -s | grep '100 active+clean'"); + $monA->mustFail( + "ceph osd pool ls | grep 'multi-node-test'", + "ceph osd pool delete multi-node-other-test multi-node-other-test --yes-i-really-really-mean-it" + ); + + # As we disable the target in the config, we still want to test that it works as intended + $osd0->mustSucceed("systemctl stop ceph-osd-0"); + $osd1->mustSucceed("systemctl stop ceph-osd-1"); + $monA->mustSucceed( + "systemctl stop ceph-mgr-a", + "systemctl stop ceph-mon-a" + ); + + $monA->succeed("systemctl start ceph.target"); + $monA->waitForUnit("ceph-mon-a"); + $monA->waitForUnit("ceph-mgr-a"); + $osd0->succeed("systemctl start ceph.target"); + $osd0->waitForUnit("ceph-osd-0"); + $osd1->succeed("systemctl start ceph.target"); + $osd1->waitForUnit("ceph-osd-1"); + + $monA->succeed("ceph -s | grep 'mon: 1 daemons'"); + $monA->waitUntilSucceeds("ceph -s | grep 'quorum a'"); + $monA->waitUntilSucceeds("ceph osd stat | grep -e '2 osds: 2 up[^,]*, 2 in'"); + $monA->waitUntilSucceeds("ceph -s | grep 'mgr: a(active,'"); + $monA->waitUntilSucceeds("ceph -s | grep 'HEALTH_OK'"); + ''; +}) diff --git a/nixos/tests/ceph.nix b/nixos/tests/ceph-single-node.nix similarity index 100% rename from nixos/tests/ceph.nix rename to nixos/tests/ceph-single-node.nix From db0787c87aeecb9004fbab6323b222e98ecc1666 Mon Sep 17 00:00:00 2001 From: Daniel Kuehn Date: Sun, 27 Oct 2019 16:56:52 +0100 Subject: [PATCH 2/5] nixos/ceph: Reduce RAM allocation for the test machines and change the sharing of the admin keyring to the shared directory instead of netcat --- nixos/tests/ceph-multi-node.nix | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/nixos/tests/ceph-multi-node.nix b/nixos/tests/ceph-multi-node.nix index a42d2b87c4a..82cf5728e0c 100644 --- a/nixos/tests/ceph-multi-node.nix +++ b/nixos/tests/ceph-multi-node.nix @@ -12,7 +12,7 @@ let generateHost = { pkgs, cephConfig, networkConfig, ... }: { virtualisation = { - memorySize = 1536; + memorySize = 512; emptyDiskImages = [ 20480 ]; vlans = [ 1 ]; }; @@ -153,14 +153,9 @@ in { $monA->waitUntilSucceeds("ceph -s | grep 'mgr: a(active,'"); # Send the admin keyring to the OSD machines - $osd0->mustSucceed("nc -vlkN 6800 > /etc/ceph/ceph.client.admin.keyring &"); - $osd1->mustSucceed("nc -vlkN 6800 > /etc/ceph/ceph.client.admin.keyring &"); - $osd0->waitForOpenPort("6800"); - $osd1->waitForOpenPort("6800"); - $monA->mustSucceed( - "nc 192.168.1.2 6800 < /etc/ceph/ceph.client.admin.keyring", - "nc 192.168.1.3 6800 < /etc/ceph/ceph.client.admin.keyring" - ); + $monA->mustSucceed("cp /etc/ceph/ceph.client.admin.keyring /tmp/shared"); + $osd0->mustSucceed("cp /tmp/shared/ceph.client.admin.keyring /etc/ceph"); + $osd1->mustSucceed("cp /tmp/shared/ceph.client.admin.keyring /etc/ceph"); # Bootstrap both OSDs $osd0->mustSucceed( From 47604c7026d001f153701071629ec13c49548597 Mon Sep 17 00:00:00 2001 From: Daniel Kuehn Date: Tue, 29 Oct 2019 15:00:28 +0100 Subject: [PATCH 3/5] nixos/ceph: Rewrite test to take all important values from a single attrset --- nixos/tests/ceph-multi-node.nix | 289 +++++++++++++++++--------------- 1 file changed, 155 insertions(+), 134 deletions(-) diff --git a/nixos/tests/ceph-multi-node.nix b/nixos/tests/ceph-multi-node.nix index 82cf5728e0c..6698aac3f27 100644 --- a/nixos/tests/ceph-multi-node.nix +++ b/nixos/tests/ceph-multi-node.nix @@ -1,12 +1,31 @@ import ./make-test.nix ({pkgs, lib, ...}: let + cfg = { + clusterId = "066ae264-2a5d-4729-8001-6ad265f50b03"; + monA = { + name = "a"; + ip = "192.168.1.1"; + }; + osd0 = { + name = "0"; + ip = "192.168.1.2"; + key = "AQBCEJNa3s8nHRAANvdsr93KqzBznuIWm2gOGg=="; + uuid = "55ba2294-3e24-478f-bee0-9dca4c231dd9"; + }; + osd1 = { + name = "1"; + ip = "192.168.1.3"; + key = "AQBEEJNac00kExAAXEgy943BGyOpVH1LLlHafQ=="; + uuid = "5e97a838-85b6-43b0-8950-cb56d554d1e5"; + }; + }; generateCephConfig = { daemonConfig }: { enable = true; global = { - fsid = "066ae264-2a5d-4729-8001-6ad265f50b03"; - monInitialMembers = "a"; - monHost = "192.168.1.1"; + fsid = cfg.clusterId; + monHost = cfg.monA.ip; + monInitialMembers = cfg.monA.name; }; } // daemonConfig; @@ -38,7 +57,7 @@ let networkMonA = { dhcpcd.enable = false; interfaces.eth1.ipv4.addresses = pkgs.lib.mkOverride 0 [ - { address = "192.168.1.1"; prefixLength = 24; } + { address = cfg.monA.ip; prefixLength = 24; } ]; firewall = { allowedTCPPorts = [ 6789 3300 ]; @@ -48,18 +67,18 @@ let cephConfigMonA = generateCephConfig { daemonConfig = { mon = { enable = true; - daemons = [ "a" ]; + daemons = [ cfg.monA.name ]; }; mgr = { enable = true; - daemons = [ "a" ]; + daemons = [ cfg.monA.name ]; }; }; }; networkOsd0 = { dhcpcd.enable = false; interfaces.eth1.ipv4.addresses = pkgs.lib.mkOverride 0 [ - { address = "192.168.1.2"; prefixLength = 24; } + { address = cfg.osd0.ip; prefixLength = 24; } ]; firewall = { allowedTCPPortRanges = [ { from = 6800; to = 7300; } ]; @@ -68,14 +87,14 @@ let cephConfigOsd0 = generateCephConfig { daemonConfig = { osd = { enable = true; - daemons = [ "0" ]; + daemons = [ cfg.osd0.name ]; }; }; }; networkOsd1 = { dhcpcd.enable = false; interfaces.eth1.ipv4.addresses = pkgs.lib.mkOverride 0 [ - { address = "192.168.1.3"; prefixLength = 24; } + { address = cfg.osd1.ip; prefixLength = 24; } ]; firewall = { allowedTCPPortRanges = [ { from = 6800; to = 7300; } ]; @@ -84,9 +103,134 @@ let cephConfigOsd1 = generateCephConfig { daemonConfig = { osd = { enable = true; - daemons = [ "1" ]; + daemons = [ cfg.osd1.name ]; }; }; }; + + testscript = { ... }: '' + startAll; + + $monA->waitForUnit("network.target"); + $osd0->waitForUnit("network.target"); + $osd1->waitForUnit("network.target"); + + # Create the ceph-related directories + $monA->mustSucceed( + "mkdir -p /var/lib/ceph/mgr/ceph-${cfg.monA.name}", + "mkdir -p /var/lib/ceph/mon/ceph-${cfg.monA.name}", + "chown ceph:ceph -R /var/lib/ceph/", + "mkdir -p /etc/ceph", + "chown ceph:ceph -R /etc/ceph" + ); + $osd0->mustSucceed( + "mkdir -p /var/lib/ceph/osd/ceph-${cfg.osd0.name}", + "chown ceph:ceph -R /var/lib/ceph/", + "mkdir -p /etc/ceph", + "chown ceph:ceph -R /etc/ceph" + ); + $osd1->mustSucceed( + "mkdir -p /var/lib/ceph/osd/ceph-${cfg.osd1.name}", + "chown ceph:ceph -R /var/lib/ceph/", + "mkdir -p /etc/ceph", + "chown ceph:ceph -R /etc/ceph" + ); + + # Bootstrap ceph-mon daemon + $monA->mustSucceed( + "sudo -u ceph ceph-authtool --create-keyring /tmp/ceph.mon.keyring --gen-key -n mon. --cap mon 'allow *'", + "sudo -u ceph ceph-authtool --create-keyring /etc/ceph/ceph.client.admin.keyring --gen-key -n client.admin --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow *' --cap mgr 'allow *'", + "sudo -u ceph ceph-authtool /tmp/ceph.mon.keyring --import-keyring /etc/ceph/ceph.client.admin.keyring", + "monmaptool --create --add ${cfg.monA.name} ${cfg.monA.ip} --fsid ${cfg.clusterId} /tmp/monmap", + "sudo -u ceph ceph-mon --mkfs -i ${cfg.monA.name} --monmap /tmp/monmap --keyring /tmp/ceph.mon.keyring", + "sudo -u ceph touch /var/lib/ceph/mon/ceph-${cfg.monA.name}/done", + "systemctl start ceph-mon-${cfg.monA.name}" + ); + $monA->waitForUnit("ceph-mon-${cfg.monA.name}"); + $monA->mustSucceed("ceph mon enable-msgr2"); + + # Can't check ceph status until a mon is up + $monA->succeed("ceph -s | grep 'mon: 1 daemons'"); + + # Start the ceph-mgr daemon, it has no deps and hardly any setup + $monA->mustSucceed( + "ceph auth get-or-create mgr.${cfg.monA.name} mon 'allow profile mgr' osd 'allow *' mds 'allow *' > /var/lib/ceph/mgr/ceph-${cfg.monA.name}/keyring", + "systemctl start ceph-mgr-${cfg.monA.name}" + ); + $monA->waitForUnit("ceph-mgr-a"); + $monA->waitUntilSucceeds("ceph -s | grep 'quorum ${cfg.monA.name}'"); + $monA->waitUntilSucceeds("ceph -s | grep 'mgr: ${cfg.monA.name}(active,'"); + + # Send the admin keyring to the OSD machines + $monA->mustSucceed("cp /etc/ceph/ceph.client.admin.keyring /tmp/shared"); + $osd0->mustSucceed("cp /tmp/shared/ceph.client.admin.keyring /etc/ceph"); + $osd1->mustSucceed("cp /tmp/shared/ceph.client.admin.keyring /etc/ceph"); + + # Bootstrap both OSDs + $osd0->mustSucceed( + "mkfs.xfs /dev/vdb", + "mount /dev/vdb /var/lib/ceph/osd/ceph-${cfg.osd0.name}", + "ceph-authtool --create-keyring /var/lib/ceph/osd/ceph-${cfg.osd0.name}/keyring --name osd.${cfg.osd0.name} --add-key ${cfg.osd0.key}", + "echo '{\"cephx_secret\": \"${cfg.osd0.key}\"}' | ceph osd new ${cfg.osd0.uuid} -i -", + ); + $osd1->mustSucceed( + "mkfs.xfs /dev/vdb", + "mount /dev/vdb /var/lib/ceph/osd/ceph-${cfg.osd1.name}", + "ceph-authtool --create-keyring /var/lib/ceph/osd/ceph-${cfg.osd1.name}/keyring --name osd.${cfg.osd1.name} --add-key ${cfg.osd1.key}", + "echo '{\"cephx_secret\": \"${cfg.osd1.key}\"}' | ceph osd new ${cfg.osd1.uuid} -i -" + ); + + # Initialize the OSDs with regular filestore + $osd0->mustSucceed( + "ceph-osd -i ${cfg.osd0.name} --mkfs --osd-uuid ${cfg.osd0.uuid}", + "chown -R ceph:ceph /var/lib/ceph/osd", + "systemctl start ceph-osd-${cfg.osd0.name}", + ); + $osd1->mustSucceed( + "ceph-osd -i ${cfg.osd1.name} --mkfs --osd-uuid ${cfg.osd1.uuid}", + "chown -R ceph:ceph /var/lib/ceph/osd", + "systemctl start ceph-osd-${cfg.osd1.name}" + ); + $monA->waitUntilSucceeds("ceph osd stat | grep -e '2 osds: 2 up[^,]*, 2 in'"); + $monA->waitUntilSucceeds("ceph -s | grep 'mgr: ${cfg.monA.name}(active,'"); + $monA->waitUntilSucceeds("ceph -s | grep 'HEALTH_OK'"); + + $monA->mustSucceed( + "ceph osd pool create multi-node-test 100 100", + "ceph osd pool ls | grep 'multi-node-test'", + "ceph osd pool rename multi-node-test multi-node-other-test", + "ceph osd pool ls | grep 'multi-node-other-test'" + ); + $monA->waitUntilSucceeds("ceph -s | grep '1 pools, 100 pgs'"); + $monA->mustSucceed("ceph osd pool set multi-node-other-test size 2"); + $monA->waitUntilSucceeds("ceph -s | grep 'HEALTH_OK'"); + $monA->waitUntilSucceeds("ceph -s | grep '100 active+clean'"); + $monA->mustFail( + "ceph osd pool ls | grep 'multi-node-test'", + "ceph osd pool delete multi-node-other-test multi-node-other-test --yes-i-really-really-mean-it" + ); + + # As we disable the target in the config, we still want to test that it works as intended + $osd0->mustSucceed("systemctl stop ceph-osd-${cfg.osd0.name}"); + $osd1->mustSucceed("systemctl stop ceph-osd-${cfg.osd1.name}"); + $monA->mustSucceed( + "systemctl stop ceph-mgr-${cfg.monA.name}", + "systemctl stop ceph-mon-${cfg.monA.name}" + ); + + $monA->succeed("systemctl start ceph.target"); + $monA->waitForUnit("ceph-mon-${cfg.monA.name}"); + $monA->waitForUnit("ceph-mgr-${cfg.monA.name}"); + $osd0->succeed("systemctl start ceph.target"); + $osd0->waitForUnit("ceph-osd-${cfg.osd0.name}"); + $osd1->succeed("systemctl start ceph.target"); + $osd1->waitForUnit("ceph-osd-${cfg.osd1.name}"); + + $monA->succeed("ceph -s | grep 'mon: 1 daemons'"); + $monA->waitUntilSucceeds("ceph -s | grep 'quorum ${cfg.monA.name}'"); + $monA->waitUntilSucceeds("ceph osd stat | grep -e '2 osds: 2 up[^,]*, 2 in'"); + $monA->waitUntilSucceeds("ceph -s | grep 'mgr: ${cfg.monA.name}(active,'"); + $monA->waitUntilSucceeds("ceph -s | grep 'HEALTH_OK'"); + ''; in { name = "basic-multi-node-ceph-cluster"; meta = with pkgs.stdenv.lib.maintainers; { @@ -99,128 +243,5 @@ in { osd1 = generateHost { pkgs = pkgs; cephConfig = cephConfigOsd1; networkConfig = networkOsd1; }; }; - testScript = { ... }: '' - startAll; - - $monA->waitForUnit("network.target"); - $osd0->waitForUnit("network.target"); - $osd1->waitForUnit("network.target"); - - # Create the ceph-related directories - $monA->mustSucceed( - "mkdir -p /var/lib/ceph/mgr/ceph-a", - "mkdir -p /var/lib/ceph/mon/ceph-a", - "chown ceph:ceph -R /var/lib/ceph/", - "mkdir -p /etc/ceph", - "chown ceph:ceph -R /etc/ceph" - ); - $osd0->mustSucceed( - "mkdir -p /var/lib/ceph/osd/ceph-0", - "chown ceph:ceph -R /var/lib/ceph/", - "mkdir -p /etc/ceph", - "chown ceph:ceph -R /etc/ceph" - ); - $osd1->mustSucceed( - "mkdir -p /var/lib/ceph/osd/ceph-1", - "chown ceph:ceph -R /var/lib/ceph/", - "mkdir -p /etc/ceph", - "chown ceph:ceph -R /etc/ceph" - ); - - # Bootstrap ceph-mon daemon - $monA->mustSucceed( - "sudo -u ceph ceph-authtool --create-keyring /tmp/ceph.mon.keyring --gen-key -n mon. --cap mon 'allow *'", - "sudo -u ceph ceph-authtool --create-keyring /etc/ceph/ceph.client.admin.keyring --gen-key -n client.admin --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow *' --cap mgr 'allow *'", - "sudo -u ceph ceph-authtool /tmp/ceph.mon.keyring --import-keyring /etc/ceph/ceph.client.admin.keyring", - "monmaptool --create --add a 192.168.1.1 --fsid 066ae264-2a5d-4729-8001-6ad265f50b03 /tmp/monmap", - "sudo -u ceph ceph-mon --mkfs -i a --monmap /tmp/monmap --keyring /tmp/ceph.mon.keyring", - "sudo -u ceph touch /var/lib/ceph/mon/ceph-a/done", - "systemctl start ceph-mon-a" - ); - $monA->waitForUnit("ceph-mon-a"); - $monA->mustSucceed("ceph mon enable-msgr2"); - - # Can't check ceph status until a mon is up - $monA->succeed("ceph -s | grep 'mon: 1 daemons'"); - - # Start the ceph-mgr daemon, it has no deps and hardly any setup - $monA->mustSucceed( - "ceph auth get-or-create mgr.a mon 'allow profile mgr' osd 'allow *' mds 'allow *' > /var/lib/ceph/mgr/ceph-a/keyring", - "systemctl start ceph-mgr-a" - ); - $monA->waitForUnit("ceph-mgr-a"); - $monA->waitUntilSucceeds("ceph -s | grep 'quorum a'"); - $monA->waitUntilSucceeds("ceph -s | grep 'mgr: a(active,'"); - - # Send the admin keyring to the OSD machines - $monA->mustSucceed("cp /etc/ceph/ceph.client.admin.keyring /tmp/shared"); - $osd0->mustSucceed("cp /tmp/shared/ceph.client.admin.keyring /etc/ceph"); - $osd1->mustSucceed("cp /tmp/shared/ceph.client.admin.keyring /etc/ceph"); - - # Bootstrap both OSDs - $osd0->mustSucceed( - "mkfs.xfs /dev/vdb", - "mount /dev/vdb /var/lib/ceph/osd/ceph-0", - "ceph-authtool --create-keyring /var/lib/ceph/osd/ceph-0/keyring --name osd.0 --add-key AQBCEJNa3s8nHRAANvdsr93KqzBznuIWm2gOGg==", - "echo '{\"cephx_secret\": \"AQBCEJNa3s8nHRAANvdsr93KqzBznuIWm2gOGg==\"}' | ceph osd new 55ba2294-3e24-478f-bee0-9dca4c231dd9 -i -", - ); - $osd1->mustSucceed( - "mkfs.xfs /dev/vdb", - "mount /dev/vdb /var/lib/ceph/osd/ceph-1", - "ceph-authtool --create-keyring /var/lib/ceph/osd/ceph-1/keyring --name osd.1 --add-key AQBEEJNac00kExAAXEgy943BGyOpVH1LLlHafQ==", - "echo '{\"cephx_secret\": \"AQBEEJNac00kExAAXEgy943BGyOpVH1LLlHafQ==\"}' | ceph osd new 5e97a838-85b6-43b0-8950-cb56d554d1e5 -i -" - ); - - # Initialize the OSDs with regular filestore - $osd0->mustSucceed( - "ceph-osd -i 0 --mkfs --osd-uuid 55ba2294-3e24-478f-bee0-9dca4c231dd9", - "chown -R ceph:ceph /var/lib/ceph/osd", - "systemctl start ceph-osd-0", - ); - $osd1->mustSucceed( - "ceph-osd -i 1 --mkfs --osd-uuid 5e97a838-85b6-43b0-8950-cb56d554d1e5", - "chown -R ceph:ceph /var/lib/ceph/osd", - "systemctl start ceph-osd-1" - ); - $monA->waitUntilSucceeds("ceph osd stat | grep -e '2 osds: 2 up[^,]*, 2 in'"); - $monA->waitUntilSucceeds("ceph -s | grep 'mgr: a(active,'"); - $monA->waitUntilSucceeds("ceph -s | grep 'HEALTH_OK'"); - - $monA->mustSucceed( - "ceph osd pool create multi-node-test 100 100", - "ceph osd pool ls | grep 'multi-node-test'", - "ceph osd pool rename multi-node-test multi-node-other-test", - "ceph osd pool ls | grep 'multi-node-other-test'", - "ceph -s | grep '1 pools, 100 pgs'", - "ceph osd pool set multi-node-other-test size 2" - ); - $monA->waitUntilSucceeds("ceph -s | grep 'HEALTH_OK'"); - $monA->waitUntilSucceeds("ceph -s | grep '100 active+clean'"); - $monA->mustFail( - "ceph osd pool ls | grep 'multi-node-test'", - "ceph osd pool delete multi-node-other-test multi-node-other-test --yes-i-really-really-mean-it" - ); - - # As we disable the target in the config, we still want to test that it works as intended - $osd0->mustSucceed("systemctl stop ceph-osd-0"); - $osd1->mustSucceed("systemctl stop ceph-osd-1"); - $monA->mustSucceed( - "systemctl stop ceph-mgr-a", - "systemctl stop ceph-mon-a" - ); - - $monA->succeed("systemctl start ceph.target"); - $monA->waitForUnit("ceph-mon-a"); - $monA->waitForUnit("ceph-mgr-a"); - $osd0->succeed("systemctl start ceph.target"); - $osd0->waitForUnit("ceph-osd-0"); - $osd1->succeed("systemctl start ceph.target"); - $osd1->waitForUnit("ceph-osd-1"); - - $monA->succeed("ceph -s | grep 'mon: 1 daemons'"); - $monA->waitUntilSucceeds("ceph -s | grep 'quorum a'"); - $monA->waitUntilSucceeds("ceph osd stat | grep -e '2 osds: 2 up[^,]*, 2 in'"); - $monA->waitUntilSucceeds("ceph -s | grep 'mgr: a(active,'"); - $monA->waitUntilSucceeds("ceph -s | grep 'HEALTH_OK'"); - ''; + testScript = testscript; }) From 5fbf0cf5ce17402beece5c836c5fe9ee20b09edd Mon Sep 17 00:00:00 2001 From: Daniel Kuehn Date: Fri, 1 Nov 2019 13:12:18 +0100 Subject: [PATCH 4/5] nixos/ceph: Rename old ceph test and add new multi-node test to all-tests.nix --- nixos/tests/all-tests.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 694376b9d36..1107ca1f5a6 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -39,7 +39,8 @@ in caddy = handleTest ./caddy.nix {}; cadvisor = handleTestOn ["x86_64-linux"] ./cadvisor.nix {}; cassandra = handleTest ./cassandra.nix {}; - ceph = handleTestOn ["x86_64-linux"] ./ceph.nix {}; + ceph-single-node = handleTestOn ["x86_64-linux"] ./ceph-single-node.nix {}; + ceph-multi-node = handleTestOn ["x86_64-linux"] ./ceph-multi-node.nix {}; certmgr = handleTest ./certmgr.nix {}; cfssl = handleTestOn ["x86_64-linux"] ./cfssl.nix {}; chromium = (handleTestOn ["x86_64-linux"] ./chromium.nix {}).stable or {}; From 6ac9d1fbdcccdc744dd9a8b63b36ff2d56eac44e Mon Sep 17 00:00:00 2001 From: Daniel Kuehn Date: Fri, 1 Nov 2019 21:48:01 +0100 Subject: [PATCH 5/5] nixos/ceph: Rewrite old single-node test with new framework --- nixos/tests/ceph-single-node.nix | 268 +++++++++++++++++-------------- 1 file changed, 150 insertions(+), 118 deletions(-) diff --git a/nixos/tests/ceph-single-node.nix b/nixos/tests/ceph-single-node.nix index 57120ff978f..10b77cff5a3 100644 --- a/nixos/tests/ceph-single-node.nix +++ b/nixos/tests/ceph-single-node.nix @@ -1,161 +1,193 @@ -import ./make-test.nix ({pkgs, lib, ...}: { - name = "All-in-one-basic-ceph-cluster"; - meta = with pkgs.stdenv.lib.maintainers; { - maintainers = [ johanot lejonet ]; - }; +import ./make-test.nix ({pkgs, lib, ...}: - nodes = { - aio = { pkgs, ... }: { - virtualisation = { - memorySize = 1536; - emptyDiskImages = [ 20480 20480 ]; - vlans = [ 1 ]; - }; - - networking = { - useDHCP = false; - interfaces.eth1.ipv4.addresses = pkgs.lib.mkOverride 0 [ - { address = "192.168.1.1"; prefixLength = 24; } - ]; - }; - - environment.systemPackages = with pkgs; [ - bash - sudo - ceph - xfsprogs - ]; - - boot.kernelModules = [ "xfs" ]; - - services.ceph.enable = true; - services.ceph.global = { - fsid = "066ae264-2a5d-4729-8001-6ad265f50b03"; - monInitialMembers = "aio"; - monHost = "192.168.1.1"; - }; - - services.ceph.mon = { - enable = true; - daemons = [ "aio" ]; - }; - - services.ceph.mgr = { - enable = true; - daemons = [ "aio" ]; - }; - - services.ceph.osd = { - enable = true; - daemons = [ "0" "1" ]; - }; - - # So that we don't have to battle systemd when bootstraping - systemd.targets.ceph.wantedBy = lib.mkForce []; +let + cfg = { + clusterId = "066ae264-2a5d-4729-8001-6ad265f50b03"; + monA = { + name = "a"; + ip = "192.168.1.1"; + }; + osd0 = { + name = "0"; + key = "AQBCEJNa3s8nHRAANvdsr93KqzBznuIWm2gOGg=="; + uuid = "55ba2294-3e24-478f-bee0-9dca4c231dd9"; + }; + osd1 = { + name = "1"; + key = "AQBEEJNac00kExAAXEgy943BGyOpVH1LLlHafQ=="; + uuid = "5e97a838-85b6-43b0-8950-cb56d554d1e5"; }; }; + generateCephConfig = { daemonConfig }: { + enable = true; + global = { + fsid = cfg.clusterId; + monHost = cfg.monA.ip; + monInitialMembers = cfg.monA.name; + }; + } // daemonConfig; - testScript = { ... }: '' + generateHost = { pkgs, cephConfig, networkConfig, ... }: { + virtualisation = { + memorySize = 512; + emptyDiskImages = [ 20480 20480 ]; + vlans = [ 1 ]; + }; + + networking = networkConfig; + + environment.systemPackages = with pkgs; [ + bash + sudo + ceph + xfsprogs + ]; + + boot.kernelModules = [ "xfs" ]; + + services.ceph = cephConfig; + + # So that we don't have to battle systemd when bootstraping + systemd.targets.ceph.wantedBy = lib.mkForce []; + }; + + networkMonA = { + dhcpcd.enable = false; + interfaces.eth1.ipv4.addresses = pkgs.lib.mkOverride 0 [ + { address = cfg.monA.ip; prefixLength = 24; } + ]; + }; + cephConfigMonA = generateCephConfig { daemonConfig = { + mon = { + enable = true; + daemons = [ cfg.monA.name ]; + }; + mgr = { + enable = true; + daemons = [ cfg.monA.name ]; + }; + osd = { + enable = true; + daemons = [ cfg.osd0.name cfg.osd1.name ]; + }; + }; }; + + testscript = { ... }: '' startAll; - $aio->waitForUnit("network.target"); + $monA->waitForUnit("network.target"); # Create the ceph-related directories - $aio->mustSucceed( - "mkdir -p /var/lib/ceph/mgr/ceph-aio", - "mkdir -p /var/lib/ceph/mon/ceph-aio", - "mkdir -p /var/lib/ceph/osd/ceph-{0,1}", - "chown ceph:ceph -R /var/lib/ceph/", + $monA->mustSucceed( + "mkdir -p /var/lib/ceph/mgr/ceph-${cfg.monA.name}", + "mkdir -p /var/lib/ceph/mon/ceph-${cfg.monA.name}", + "mkdir -p /var/lib/ceph/osd/ceph-${cfg.osd0.name}", + "mkdir -p /var/lib/ceph/osd/ceph-${cfg.osd1.name}", "mkdir -p /etc/ceph", - "chown ceph:ceph -R /etc/ceph" + "chown ceph:ceph -R /etc/ceph", + "chown ceph:ceph -R /var/lib/ceph/", ); # Bootstrap ceph-mon daemon - $aio->mustSucceed( + $monA->mustSucceed( "sudo -u ceph ceph-authtool --create-keyring /tmp/ceph.mon.keyring --gen-key -n mon. --cap mon 'allow *'", "sudo -u ceph ceph-authtool --create-keyring /etc/ceph/ceph.client.admin.keyring --gen-key -n client.admin --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow *' --cap mgr 'allow *'", "sudo -u ceph ceph-authtool /tmp/ceph.mon.keyring --import-keyring /etc/ceph/ceph.client.admin.keyring", - "monmaptool --create --add aio 192.168.1.1 --fsid 066ae264-2a5d-4729-8001-6ad265f50b03 /tmp/monmap", - "sudo -u ceph ceph-mon --mkfs -i aio --monmap /tmp/monmap --keyring /tmp/ceph.mon.keyring", - "sudo -u ceph touch /var/lib/ceph/mon/ceph-aio/done", - "systemctl start ceph-mon-aio" + "monmaptool --create --add ${cfg.monA.name} ${cfg.monA.ip} --fsid ${cfg.clusterId} /tmp/monmap", + "sudo -u ceph ceph-mon --mkfs -i ${cfg.monA.name} --monmap /tmp/monmap --keyring /tmp/ceph.mon.keyring", + "sudo -u ceph touch /var/lib/ceph/mon/ceph-${cfg.monA.name}/done", + "systemctl start ceph-mon-${cfg.monA.name}" ); - $aio->waitForUnit("ceph-mon-aio"); - $aio->mustSucceed("ceph mon enable-msgr2"); + $monA->waitForUnit("ceph-mon-${cfg.monA.name}"); + $monA->mustSucceed("ceph mon enable-msgr2"); # Can't check ceph status until a mon is up - $aio->succeed("ceph -s | grep 'mon: 1 daemons'"); + $monA->succeed("ceph -s | grep 'mon: 1 daemons'"); # Start the ceph-mgr daemon, it has no deps and hardly any setup - $aio->mustSucceed( - "ceph auth get-or-create mgr.aio mon 'allow profile mgr' osd 'allow *' mds 'allow *' > /var/lib/ceph/mgr/ceph-aio/keyring", - "systemctl start ceph-mgr-aio" + $monA->mustSucceed( + "ceph auth get-or-create mgr.${cfg.monA.name} mon 'allow profile mgr' osd 'allow *' mds 'allow *' > /var/lib/ceph/mgr/ceph-${cfg.monA.name}/keyring", + "systemctl start ceph-mgr-${cfg.monA.name}" ); - $aio->waitForUnit("ceph-mgr-aio"); - $aio->waitUntilSucceeds("ceph -s | grep 'quorum aio'"); - $aio->waitUntilSucceeds("ceph -s | grep 'mgr: aio(active,'"); + $monA->waitForUnit("ceph-mgr-a"); + $monA->waitUntilSucceeds("ceph -s | grep 'quorum ${cfg.monA.name}'"); + $monA->waitUntilSucceeds("ceph -s | grep 'mgr: ${cfg.monA.name}(active,'"); # Bootstrap both OSDs - $aio->mustSucceed( + $monA->mustSucceed( "mkfs.xfs /dev/vdb", "mkfs.xfs /dev/vdc", - "mount /dev/vdb /var/lib/ceph/osd/ceph-0", - "mount /dev/vdc /var/lib/ceph/osd/ceph-1", - "ceph-authtool --create-keyring /var/lib/ceph/osd/ceph-0/keyring --name osd.0 --add-key AQBCEJNa3s8nHRAANvdsr93KqzBznuIWm2gOGg==", - "ceph-authtool --create-keyring /var/lib/ceph/osd/ceph-1/keyring --name osd.1 --add-key AQBEEJNac00kExAAXEgy943BGyOpVH1LLlHafQ==", - "echo '{\"cephx_secret\": \"AQBCEJNa3s8nHRAANvdsr93KqzBznuIWm2gOGg==\"}' | ceph osd new 55ba2294-3e24-478f-bee0-9dca4c231dd9 -i -", - "echo '{\"cephx_secret\": \"AQBEEJNac00kExAAXEgy943BGyOpVH1LLlHafQ==\"}' | ceph osd new 5e97a838-85b6-43b0-8950-cb56d554d1e5 -i -" + "mount /dev/vdb /var/lib/ceph/osd/ceph-${cfg.osd0.name}", + "mount /dev/vdc /var/lib/ceph/osd/ceph-${cfg.osd1.name}", + "ceph-authtool --create-keyring /var/lib/ceph/osd/ceph-${cfg.osd0.name}/keyring --name osd.${cfg.osd0.name} --add-key ${cfg.osd0.key}", + "ceph-authtool --create-keyring /var/lib/ceph/osd/ceph-${cfg.osd1.name}/keyring --name osd.${cfg.osd1.name} --add-key ${cfg.osd1.key}", + "echo '{\"cephx_secret\": \"${cfg.osd0.key}\"}' | ceph osd new ${cfg.osd0.uuid} -i -", + "echo '{\"cephx_secret\": \"${cfg.osd1.key}\"}' | ceph osd new ${cfg.osd1.uuid} -i -" ); # Initialize the OSDs with regular filestore - $aio->mustSucceed( - "ceph-osd -i 0 --mkfs --osd-uuid 55ba2294-3e24-478f-bee0-9dca4c231dd9", - "ceph-osd -i 1 --mkfs --osd-uuid 5e97a838-85b6-43b0-8950-cb56d554d1e5", + $monA->mustSucceed( + "ceph-osd -i ${cfg.osd0.name} --mkfs --osd-uuid ${cfg.osd0.uuid}", + "ceph-osd -i ${cfg.osd1.name} --mkfs --osd-uuid ${cfg.osd1.uuid}", "chown -R ceph:ceph /var/lib/ceph/osd", - "systemctl start ceph-osd-0", - "systemctl start ceph-osd-1" + "systemctl start ceph-osd-${cfg.osd0.name}", + "systemctl start ceph-osd-${cfg.osd1.name}" ); + $monA->waitUntilSucceeds("ceph osd stat | grep -e '2 osds: 2 up[^,]*, 2 in'"); + $monA->waitUntilSucceeds("ceph -s | grep 'mgr: ${cfg.monA.name}(active,'"); + $monA->waitUntilSucceeds("ceph -s | grep 'HEALTH_OK'"); - $aio->waitUntilSucceeds("ceph osd stat | grep -e '2 osds: 2 up[^,]*, 2 in'"); - $aio->waitUntilSucceeds("ceph -s | grep 'mgr: aio(active,'"); - $aio->waitUntilSucceeds("ceph -s | grep 'HEALTH_OK'"); - - $aio->mustSucceed( - "ceph osd pool create aio-test 100 100", - "ceph osd pool ls | grep 'aio-test'", - "ceph osd pool rename aio-test aio-other-test", - "ceph osd pool ls | grep 'aio-other-test'", - "ceph -s | grep '1 pools, 100 pgs'", + $monA->mustSucceed( + "ceph osd pool create single-node-test 100 100", + "ceph osd pool ls | grep 'single-node-test'", + "ceph osd pool rename single-node-test single-node-other-test", + "ceph osd pool ls | grep 'single-node-other-test'" + ); + $monA->waitUntilSucceeds("ceph -s | grep '1 pools, 100 pgs'"); + $monA->mustSucceed( "ceph osd getcrushmap -o crush", "crushtool -d crush -o decrushed", "sed 's/step chooseleaf firstn 0 type host/step chooseleaf firstn 0 type osd/' decrushed > modcrush", "crushtool -c modcrush -o recrushed", "ceph osd setcrushmap -i recrushed", - "ceph osd pool set aio-other-test size 2" + "ceph osd pool set single-node-other-test size 2" ); - $aio->waitUntilSucceeds("ceph -s | grep 'HEALTH_OK'"); - $aio->waitUntilSucceeds("ceph -s | grep '100 active+clean'"); - $aio->mustFail( - "ceph osd pool ls | grep 'aio-test'", - "ceph osd pool delete aio-other-test aio-other-test --yes-i-really-really-mean-it" + $monA->waitUntilSucceeds("ceph -s | grep 'HEALTH_OK'"); + $monA->waitUntilSucceeds("ceph -s | grep '100 active+clean'"); + $monA->mustFail( + "ceph osd pool ls | grep 'multi-node-test'", + "ceph osd pool delete single-node-other-test single-node-other-test --yes-i-really-really-mean-it" ); # As we disable the target in the config, we still want to test that it works as intended - $aio->mustSucceed( - "systemctl stop ceph-osd-0", - "systemctl stop ceph-osd-1", - "systemctl stop ceph-mgr-aio", - "systemctl stop ceph-mon-aio" + $monA->mustSucceed( + "systemctl stop ceph-osd-${cfg.osd0.name}", + "systemctl stop ceph-osd-${cfg.osd1.name}", + "systemctl stop ceph-mgr-${cfg.monA.name}", + "systemctl stop ceph-mon-${cfg.monA.name}" ); - $aio->succeed("systemctl start ceph.target"); - $aio->waitForUnit("ceph-mon-aio"); - $aio->waitForUnit("ceph-mgr-aio"); - $aio->waitForUnit("ceph-osd-0"); - $aio->waitForUnit("ceph-osd-1"); - $aio->succeed("ceph -s | grep 'mon: 1 daemons'"); - $aio->waitUntilSucceeds("ceph -s | grep 'quorum aio'"); - $aio->waitUntilSucceeds("ceph osd stat | grep -e '2 osds: 2 up[^,]*, 2 in'"); - $aio->waitUntilSucceeds("ceph -s | grep 'mgr: aio(active,'"); - $aio->waitUntilSucceeds("ceph -s | grep 'HEALTH_OK'"); + + $monA->succeed("systemctl start ceph.target"); + $monA->waitForUnit("ceph-mon-${cfg.monA.name}"); + $monA->waitForUnit("ceph-mgr-${cfg.monA.name}"); + $monA->waitForUnit("ceph-osd-${cfg.osd0.name}"); + $monA->waitForUnit("ceph-osd-${cfg.osd1.name}"); + + $monA->succeed("ceph -s | grep 'mon: 1 daemons'"); + $monA->waitUntilSucceeds("ceph -s | grep 'quorum ${cfg.monA.name}'"); + $monA->waitUntilSucceeds("ceph osd stat | grep -e '2 osds: 2 up[^,]*, 2 in'"); + $monA->waitUntilSucceeds("ceph -s | grep 'mgr: ${cfg.monA.name}(active,'"); + $monA->waitUntilSucceeds("ceph -s | grep 'HEALTH_OK'"); ''; +in { + name = "basic-single-node-ceph-cluster"; + meta = with pkgs.stdenv.lib.maintainers; { + maintainers = [ lejonet johanot ]; + }; + + nodes = { + monA = generateHost { pkgs = pkgs; cephConfig = cephConfigMonA; networkConfig = networkMonA; }; + }; + + testScript = testscript; })