Allow to run background north-south iperf test from pod
When run_background_services_in_pod is enabled and discovered topology is tripleo, tobiko should run background north-south iperf tests from a Pod. This is important for adoption: the background iperf test starts running from a pod on tripleo environment and, after adoption is executed, the pod keeps on running and tobiko can check the results. NOTE: the background east-west iperf tests should always run from a VM instances and an ssh_client is provided for that. Change-Id: Idc189de93189cf2ae5091e46e5310b3ebc8473ae
This commit is contained in:
parent
24f4629e22
commit
96e4901eb5
@ -28,6 +28,7 @@ from tobiko.openstack import topology
|
||||
from tobiko.podified import _openshift
|
||||
from tobiko import rhosp
|
||||
from tobiko.shell import files
|
||||
from tobiko.shell import iperf3
|
||||
from tobiko.shell import sh
|
||||
from tobiko.shell import ssh
|
||||
from tobiko.tripleo import _overcloud
|
||||
@ -206,21 +207,28 @@ class TripleoTopology(rhosp.RhospTopology):
|
||||
ssh_client: ssh.SSHClientType = None,
|
||||
iperf3_server_ssh_client: ssh.SSHClientType = None):
|
||||
|
||||
kwargs = {
|
||||
'port': port,
|
||||
'protocol': protocol,
|
||||
'ssh_client': ssh_client,
|
||||
'iperf3_server_ssh_client': iperf3_server_ssh_client,
|
||||
}
|
||||
|
||||
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_iperf_command(server_ip)
|
||||
LOG.debug("Running iperf3 client in the POD is not "
|
||||
"implemented yet")
|
||||
kwargs['address'] = server_ip
|
||||
kwargs['check_function'] = iperf3.check_iperf3_client_results
|
||||
kwargs['start_function'] = _openshift.start_iperf3
|
||||
kwargs['liveness_function'] = _openshift.iperf3_pod_alive
|
||||
kwargs['stop_function'] = _openshift.stop_iperf3_client
|
||||
sh.check_or_start_external_process(**kwargs)
|
||||
else:
|
||||
tripleo_nova.check_or_start_background_iperf_connection(
|
||||
server_ip=server_ip,
|
||||
port=port,
|
||||
protocol=protocol,
|
||||
ssh_client=ssh_client,
|
||||
iperf3_server_ssh_client=iperf3_server_ssh_client)
|
||||
kwargs['server_ip'] = server_ip
|
||||
tripleo_nova.check_or_start_background_iperf_connection(**kwargs)
|
||||
|
||||
|
||||
class TripleoTopologyNode(rhosp.RhospNode):
|
||||
|
Loading…
x
Reference in New Issue
Block a user