1 import ./make-test-python.nix (
9 virtualisation.emptyDiskImages = [ 1 ];
10 networking.firewall.allowedTCPPorts = [ drbdPort ];
34 address ${nodes.drbd1.networking.primaryIPAddress}:${toString drbdPort};
38 address ${nodes.drbd2.networking.primaryIPAddress}:${toString drbdPort};
47 meta = with pkgs.lib.maintainers; {
48 maintainers = [ ryantm astro birkb ];
51 nodes.drbd1 = drbdConfig;
52 nodes.drbd2 = drbdConfig;
54 testScript = { nodes }: ''
58 drbd1.wait_for_unit("network.target")
59 drbd2.wait_for_unit("network.target")
62 "drbdadm create-md r0",
64 "drbdadm primary r0 --force",
67 drbd2.succeed("drbdadm create-md r0", "drbdadm up r0")
70 "mkfs.ext4 /dev/drbd0",
72 "mount /dev/drbd0 /mnt/drbd",
73 "touch /mnt/drbd/hello",
75 "drbdadm secondary r0",
82 "mount /dev/drbd0 /mnt/drbd",