Skip to content

Commit

Permalink
Merge pull request #167 from igsilya/tmp-may-exist
Browse files Browse the repository at this point in the history
ovn-tester: Fix exceptions while adding LBs after leadership transfer.
  • Loading branch information
dceara authored May 31, 2023
2 parents 8ba9789 + 5ddb26c commit 978f284
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ovn-tester/ovn_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -669,22 +669,22 @@ def lb_clear_vips(self, lb):
def lb_add_to_routers(self, lb, routers):
with self.idl.transaction(check_error=True) as txn:
for r in routers:
txn.add(self.idl.lr_lb_add(r, lb.uuid))
txn.add(self.idl.lr_lb_add(r, lb.uuid, may_exist=True))

def lb_add_to_switches(self, lb, switches):
with self.idl.transaction(check_error=True) as txn:
for s in switches:
txn.add(self.idl.ls_lb_add(s, lb.uuid))
txn.add(self.idl.ls_lb_add(s, lb.uuid, may_exist=True))

def lb_remove_from_routers(self, lb, routers):
with self.idl.transaction(check_error=True) as txn:
for r in routers:
txn.add(self.idl.lr_lb_del(r, lb.uuid))
txn.add(self.idl.lr_lb_del(r, lb.uuid, if_exists=True))

def lb_remove_from_switches(self, lb, switches):
with self.idl.transaction(check_error=True) as txn:
for s in switches:
txn.add(self.idl.ls_lb_del(s, lb.uuid))
txn.add(self.idl.ls_lb_del(s, lb.uuid, if_exists=True))

def sync(self, wait="hv", timeout=DEFAULT_CTL_TIMEOUT):
with self.idl.transaction(
Expand Down

0 comments on commit 978f284

Please sign in to comment.