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 3131from oslo_log import log
3232from oslo_utils import timeutils
3333from oslo_utils import uuidutils
34+ from ovsdbapp .backend .ovs_idl import idlutils
3435
3536from neutron .agent .linux import utils
3637from neutron .api import extensions as exts
@@ -473,6 +474,13 @@ def append_cms_options(ext_ids, value):
473474 def del_fake_chassis (self , chassis , if_exists = True ):
474475 self .sb_api .chassis_del (
475476 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):
12151215 # then Chassis_Private.chassis = []; both metadata and controller
12161216 # agents will still be present in the agent list.
12171217 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 ,))
12191220 self .sb_api .idl .notify_handler .watch_event (agent_event )
12201221 self .sb_api .chassis_del (self .chassis ).execute (check_error = True )
12211222 self .assertTrue (agent_event .wait ())
You can’t perform that action at this time.
0 commit comments