File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed
plugins/ml2/drivers/ovn/mech_driver Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 31
31
from oslo_log import log
32
32
from oslo_utils import timeutils
33
33
from oslo_utils import uuidutils
34
+ from ovsdbapp .backend .ovs_idl import idlutils
34
35
35
36
from neutron .agent .linux import utils
36
37
from neutron .api import extensions as exts
@@ -473,6 +474,13 @@ def append_cms_options(ext_ids, value):
473
474
def del_fake_chassis (self , chassis , if_exists = True ):
474
475
self .sb_api .chassis_del (
475
476
chassis , if_exists = if_exists ).execute (check_error = True )
476
- if self .sb_api .is_table_present ('Chassis_Private' ):
477
- self .sb_api .db_destroy (
478
- 'Chassis_Private' , chassis ).execute (check_error = True )
477
+ try :
478
+ if self .sb_api .is_table_present ('Chassis_Private' ):
479
+ self .sb_api .db_destroy (
480
+ 'Chassis_Private' , chassis ).execute (check_error = True )
481
+ except idlutils .RowNotFound :
482
+ # NOTE(ykarel ): ovsdbapp >= 2.2.2 handles Chassis_Private
483
+ # record delete with chassis
484
+ # try/except can be dropped when neutron requirements.txt
485
+ # include ovsdbapp>=2.2.2
486
+ pass
Original file line number Diff line number Diff line change @@ -1215,7 +1215,8 @@ def test_agent_list(self):
1215
1215
# then Chassis_Private.chassis = []; both metadata and controller
1216
1216
# agents will still be present in the agent list.
1217
1217
agent_event = AgentWaitEvent (self .mech_driver , [self .chassis ],
1218
- events = (event .RowEvent .ROW_UPDATE ,))
1218
+ events = (event .RowEvent .ROW_UPDATE ,
1219
+ event .RowEvent .ROW_DELETE ,))
1219
1220
self .sb_api .idl .notify_handler .watch_event (agent_event )
1220
1221
self .sb_api .chassis_del (self .chassis ).execute (check_error = True )
1221
1222
self .assertTrue (agent_event .wait ())
You can’t perform that action at this time.
0 commit comments