From 4c12d10a248d44c14cda43f500db8b5b41c96628 Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Tue, 19 Jan 2021 16:38:20 +0000 Subject: [PATCH] [FT] Add lrp port binding wait event failure message In case a lrp port binding event fails, report the lrp ID to help the debugging process. Change-Id: Ib53d39b317aae36bbb746d260442b7a132355425 Related-Bug: #1912369 --- neutron/tests/functional/services/ovn_l3/test_plugin.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/neutron/tests/functional/services/ovn_l3/test_plugin.py b/neutron/tests/functional/services/ovn_l3/test_plugin.py index ebcd87996c2..523aaf7f51e 100644 --- a/neutron/tests/functional/services/ovn_l3/test_plugin.py +++ b/neutron/tests/functional/services/ovn_l3/test_plugin.py @@ -402,7 +402,8 @@ class TestRouter(base.TestOVNFunctionalBase): # Set chassis on chassisredirect port in Port_Binding table logical_port = 'cr-lrp-%s' % gw_port_id - self.assertTrue(self.cr_lrp_pb_event.wait(logical_port)) + self.assertTrue(self.cr_lrp_pb_event.wait(logical_port), + msg='lrp %s failed to bind' % logical_port) self.sb_api.lsp_bind(logical_port, self.chassis1, may_exist=True).execute(check_error=True) @@ -493,7 +494,8 @@ class TestRouter(base.TestOVNFunctionalBase): router = self._create_router('router%d' % i, gw_info=gw_info) gw_port_id = router.get('gw_port_id') logical_port = 'cr-lrp-%s' % gw_port_id - self.assertTrue(self.cr_lrp_pb_event.wait(logical_port)) + self.assertTrue(self.cr_lrp_pb_event.wait(logical_port), + msg='lrp %s failed to bind' % logical_port) self.sb_api.lsp_bind(logical_port, chassis4, may_exist=True).execute(check_error=True) self.l3_plugin.schedule_unhosted_gateways() @@ -541,7 +543,8 @@ class TestRouter(base.TestOVNFunctionalBase): router = self._create_router('router', gw_info=gw_info) gw_port_id = router.get('gw_port_id') logical_port = 'cr-lrp-%s' % gw_port_id - self.assertTrue(self.cr_lrp_pb_event.wait(logical_port)) + self.assertTrue(self.cr_lrp_pb_event.wait(logical_port), + msg='lrp %s failed to bind' % logical_port) self.sb_api.lsp_bind(logical_port, chassis_list[0], may_exist=True).execute(check_error=True)