File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
plugins/ml2/drivers/ovn/mech_driver Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 28
28
from oslo_log import log
29
29
from oslo_utils import timeutils
30
30
from oslo_utils import uuidutils
31
+ from ovsdbapp .backend .ovs_idl import idlutils
31
32
32
33
from neutron .agent .linux import utils
33
34
from neutron .api import extensions as exts
@@ -443,5 +444,12 @@ def append_cms_options(ext_ids, value):
443
444
def del_fake_chassis (self , chassis , if_exists = True ):
444
445
self .sb_api .chassis_del (
445
446
chassis , if_exists = if_exists ).execute (check_error = True )
446
- self .sb_api .db_destroy (
447
- 'Chassis_Private' , chassis ).execute (check_error = True )
447
+ try :
448
+ self .sb_api .db_destroy (
449
+ 'Chassis_Private' , chassis ).execute (check_error = True )
450
+ except idlutils .RowNotFound :
451
+ # NOTE(ykarel ): ovsdbapp >= 2.6.1 handles Chassis_Private
452
+ # record delete with chassis
453
+ # try/except can be dropped when neutron requirements.txt
454
+ # include ovsdbapp>=2.6.1
455
+ pass
Original file line number Diff line number Diff line change @@ -1234,7 +1234,8 @@ def test_agent_list(self):
1234
1234
# then Chassis_Private.chassis = []; both metadata and controller
1235
1235
# agents will still be present in the agent list.
1236
1236
agent_event = AgentWaitEvent (self .mech_driver , [self .chassis ],
1237
- events = (event .RowEvent .ROW_UPDATE ,))
1237
+ events = (event .RowEvent .ROW_UPDATE ,
1238
+ event .RowEvent .ROW_DELETE ,))
1238
1239
self .sb_api .idl .notify_handler .watch_event (agent_event )
1239
1240
self .sb_api .chassis_del (self .chassis ).execute (check_error = True )
1240
1241
self .assertTrue (agent_event .wait ())
You can’t perform that action at this time.
0 commit comments