[pve-devel] [PATCH ha-manager 11/15] test: ha tester: add test cases for strict negative colocation rules

Fiona Ebner f.ebner at proxmox.com
Mon Apr 28 15:44:38 CEST 2025


Am 25.03.25 um 16:12 schrieb Daniel Kral:
> Add test cases for strict negative colocation rules, i.e. where services
> must be kept on separate nodes. These verify the behavior of the
> services in strict negative colocation rules in case of a failover of
> the node of one or more of these services in the following scenarios:
> 
> - 2 neg. colocated services in a 3 node cluster; 1 node failing
> - 3 neg. colocated services in a 5 node cluster; 1 node failing
> - 3 neg. colocated services in a 5 node cluster; 2 nodes failing
> - 2 neg. colocated services in a 3 node cluster; 1 node failing, but the
>   recovery node cannot start the service
> - Pair of 2 neg. colocated services (with one common service in both) in
>   a 3 node cluster; 1 node failing
> 
> Signed-off-by: Daniel Kral <d.kral at proxmox.com>

Reviewed-by: Fiona Ebner <f.ebner at proxmox.com>

Two very minor nits and a typo below:

> diff --git a/src/test/test-colocation-strict-separate2/README b/src/test/test-colocation-strict-separate2/README
> new file mode 100644
> index 0000000..f494d2b
> --- /dev/null
> +++ b/src/test/test-colocation-strict-separate2/README
> @@ -0,0 +1,15 @@
> +Test whether a strict negative colocation rule among three services makes one
> +of the services migrate to a different node than the other services in case of
> +a failover of the service's previously assigned node.
> +
> +The test scenario is:
> +- vm:101, vm:102, and vm:103 must be kept separate
> +- vm:101, vm:102, and vm:103 are on node3, node4, and node5 respectively
> +- node1 and node2 have each both higher service counts than node3, node4 and
> +  node5 to test the rule is applied even though the scheduler would prefer the
> +  less utilizied nodes node3, node4, or node5

s/utilizied/utilized/

Nit: I'd not list node5 in that sentence, because its service count is
not relevant as the failing node.

> diff --git a/src/test/test-colocation-strict-separate3/README b/src/test/test-colocation-strict-separate3/README
> new file mode 100644
> index 0000000..44d88ef
> --- /dev/null
> +++ b/src/test/test-colocation-strict-separate3/README
> @@ -0,0 +1,16 @@
> +Test whether a strict negative colocation rule among three services makes two
> +of the services migrate to two different recovery nodes than the node of the
> +third service in case of a failover of their two previously assigned nodes.
> +
> +The test scenario is:
> +- vm:101, vm:102, and vm:103 must be kept separate
> +- vm:101, vm:102, and vm:103 are respectively on node3, node4, and node5
> +- node1 and node2 have both higher service counts than node3, node4 and node5
> +  to test the colocation rule is enforced even though the utilization would
> +  prefer the other node3, node4, and node5

Nit: I'd not list node4 and node5 in that sentence, because their
service counts are not relevant since they fail.




More information about the pve-devel mailing list