Fix fallback in dvr ingress test

The fallback mechanism in dvr ingress test was introduced
in [1] in order to allow the test to work properly on
environments where the host that is used as proxy host
does not have routing to neutron external network.
As appeared the ping check in this fallback mechanism
is working inconsistently on some environments in case
cirros image is used as default image.
This patch changes the problematic ping check to
check_connectivity function that does multiple retries
before raising an exception.

[1] https://review.opendev.org/c/x/whitebox-neutron-tempest-plugin/+/925475

Change-Id: I82a5095d31a7b9e96821a0985e1400814eda02b2
This commit is contained in:
Roman Safronov 2024-09-26 15:17:21 +03:00
parent 182582a0d5
commit ea8a27a475

View File

@ -30,7 +30,6 @@ from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest.lib import exceptions as lib_exceptions
from whitebox_neutron_tempest_plugin.common import constants as local_constants
from whitebox_neutron_tempest_plugin.common import utils as local_utils
@ -227,11 +226,12 @@ class OvnDvrTest(OvnDvrBase):
ssh_client = None
expected_routing_nodes = [self.compute]
try:
self.proxy_host_client.exec_command(
"ping -c 10 -W2 -s56 {}".format(
self.server['fip']['floating_ip_address']))
self.check_remote_connectivity(
self.proxy_host_client,
self.server['fip']['floating_ip_address'],
timeout=60)
ssh_client = self.proxy_host_client
except lib_exceptions.SSHExecCommandFailed:
except AssertionError:
# In case VM under test is not responding from the proxy host
# this means that there is a limitation of the environment and
# as a fallback scenario we create an additional VM