From c2bc120b591ea7c10e3e7c88edb8b92818ce381f Mon Sep 17 00:00:00 2001 From: Eduardo Olivares Date: Mon, 7 Apr 2025 18:12:01 +0200 Subject: [PATCH] Always run background snat ping test from VM When the check_or_start_background_vm_ping function is called with an ssh_client, it means the background ping test has to be executed from a VM instance, not from a pod, regardless of the run_background_services_in_pod value. Change-Id: Ie4dbc7f3799d42ab2016f29ccbc01afe38791a97 --- tobiko/tripleo/_topology.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tobiko/tripleo/_topology.py b/tobiko/tripleo/_topology.py index 30c884d58..4522481a3 100644 --- a/tobiko/tripleo/_topology.py +++ b/tobiko/tripleo/_topology.py @@ -190,14 +190,19 @@ class TripleoTopology(rhosp.RhospTopology): "name: '%s'", node.name) return subgroups - def check_or_start_background_vm_ping(self, server_ip): - if CONF.tobiko.tripleo.run_background_services_in_pod: + def check_or_start_background_vm_ping( + self, + server_ip: typing.Union[str, netaddr.IPAddress], + ssh_client: ssh.SSHClientType = None): + if (not ssh_client and + CONF.tobiko.tripleo.run_background_services_in_pod): # this fails if `oc` (openshift client) is not available # so, if `run_background_services_in_pod` is true, make sure # `oc` is available _openshift.check_or_start_tobiko_ping_command(server_ip) else: - tripleo_nova.check_or_start_background_vm_ping(server_ip) + tripleo_nova.check_or_start_background_vm_ping( + server_ip, ssh_client=ssh_client) def check_or_start_background_iperf_connection( self,