Fix Octavia round robin traffic test error
The Octavia resources require additional time besides having its resources to reach ACTIVE provisioning status. This patch adds ShellCommandFailed to the list of exceptions we ignore for some time after provisioning Octavia resources. Change-Id: Id5e83c927f2d65386b62ed1caa343a651db7f163
This commit is contained in:
parent
58961bedb9
commit
0441b85491
|
@ -69,6 +69,8 @@ def check_members_balanced(ip_address: str,
|
|||
if ex.exit_status == 28:
|
||||
raise octavia.TrafficTimeoutError(
|
||||
reason=str(ex.stderr)) from ex
|
||||
else:
|
||||
raise ex
|
||||
|
||||
replies[content] += 1
|
||||
|
||||
|
|
|
@ -77,6 +77,9 @@ class OctaviaBasicTrafficScenarioTest(testtools.TestCase):
|
|||
|
||||
@pytest.mark.flaky(reruns=3)
|
||||
def test_round_robin_traffic(self):
|
||||
|
||||
# For 30 seconds we ignore specific exceptions as we know that Octavia
|
||||
# resources are being provisioned
|
||||
for attempt in tobiko.retry(timeout=30.):
|
||||
try:
|
||||
octavia.check_members_balanced(
|
||||
|
@ -89,7 +92,10 @@ class OctaviaBasicTrafficScenarioTest(testtools.TestCase):
|
|||
break
|
||||
|
||||
except (octavia.RoundRobinException,
|
||||
octavia.TrafficTimeoutError) as e:
|
||||
octavia.TrafficTimeoutError,
|
||||
sh.ShellCommandFailed) as e:
|
||||
LOG.debug(f"Traffic couldn't reach for the #{attempt.count} "
|
||||
f"time, because of the next exception: {e}")
|
||||
if attempt.is_last:
|
||||
raise e
|
||||
|
||||
|
|
Loading…
Reference in New Issue