Rename config option run_background_ping_in_pod

New name for this option is ``run_background_services_in_pod`` as it
will be used not only for the ``ping`` command but also for other
services like e.g. iperf3.

Related: #TOBIKO-128
Change-Id: Ifb70b261cf9c2ed5f0068685c6852372393f2646
This commit is contained in:
Slawek Kaplonski 2025-02-27 16:40:40 +01:00
parent 9a5978c811
commit ef3d773e9a
3 changed files with 19 additions and 8 deletions

View File

@ -0,0 +1,8 @@
---
deprecations:
- |
Config option ``run_background_ping_in_pod`` is deprecated. New option
``run_background_services_in_pod`` should be used instead. This option will
be related not only to the ``ping`` command, as it is now, but also to other
services, like e.g. ``iperf3`` for which support will be added in the
future.

View File

@ -109,13 +109,16 @@ TRIPLEO_OPTIONS = [
'different hostname prefixes', 'different hostname prefixes',
default={'ctrl': 'controller', 'cmp': 'compute'}), default={'ctrl': 'controller', 'cmp': 'compute'}),
cfg.BoolOpt('run_background_ping_in_pod', cfg.BoolOpt('run_background_services_in_pod',
deprecated_name='run_background_ping_in_pod',
default=False, default=False,
help='Wheter background ping should be run directly from ' help='Wheter background services, like e.g. ping or iperf3 '
'the undercloud node (default) or using POD on the OCP ' 'should be run directly from the undercloud node '
'cluster. The latter is is useful e.g. for the ' '(default) or using POD on the OCP cluster. '
'The latter is useful e.g. for the '
'data plane adoption jobs when background ping should ' 'data plane adoption jobs when background ping should '
'be run from the POD even before adoption.'), 'be run from the POD even before adoption but it '
'requires access to the OpenShift cluster API.'),
] ]

View File

@ -190,10 +190,10 @@ class TripleoTopology(rhosp.RhospTopology):
return subgroups return subgroups
def check_or_start_background_vm_ping(self, server_ip): def check_or_start_background_vm_ping(self, server_ip):
if CONF.tobiko.tripleo.run_background_ping_in_pod: if CONF.tobiko.tripleo.run_background_services_in_pod:
# this fails if `oc` (openshift client) is not available # this fails if `oc` (openshift client) is not available
# so, if `run_background_ping_in_pod` is true, make sure `oc` is # so, if `run_background_services_in_pod` is true, make sure
# available # `oc` is available
_openshift.check_or_start_tobiko_ping_command(server_ip) _openshift.check_or_start_tobiko_ping_command(server_ip)
else: else:
tripleo_nova.check_or_start_background_vm_ping(server_ip) tripleo_nova.check_or_start_background_vm_ping(server_ip)