From f9bfd86bac8c3e6cf3232933e61e02f005f1e40f Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Tue, 11 Jul 2023 11:22:37 -0400 Subject: [PATCH] Raise error if no hosts were provisioned This provides a clearer message that provisioning failed to allocate the requested number of hosts. Signed-off-by: Rob Crittenden --- src/ipaperftest/core/plugin.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ipaperftest/core/plugin.py b/src/ipaperftest/core/plugin.py index f4133f1..a2dae02 100644 --- a/src/ipaperftest/core/plugin.py +++ b/src/ipaperftest/core/plugin.py @@ -245,6 +245,8 @@ def get_replica_parent(tree, child): replica_lines.extend(ipareplicas_group_lines) return replica_lines + if len(self.provider.hosts) == 0: + raise RuntimeError('No hosts were provisioned') replica_lines = (generate_replica_lines() if ctx.params["replicas"] > 0 else ["[ipareplicas]"])