Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

libovsdb: ignore not found error when listing objects with a filter #2900

Merged
merged 1 commit into from Jun 7, 2023

Conversation

zhangzujian
Copy link
Member

@zhangzujian zhangzujian commented Jun 5, 2023

What type of this PR

  • Bug fixes

Which issue(s) this PR fixes:

Fixes #(issue-number)

WHAT

馃 Generated by Copilot at 63b99a0

Improved error handling and client usage in ovn-nb-logical_router_policy.go, ovn-nb-logical_router_route.go, and ovn-nb-nat.go. The changes make the code more robust and consistent when querying OVN database objects.

馃 Generated by Copilot at 63b99a0

No more errors, no more lies
We filter out the missing ones
With libovsdb we defy
The ovn-nb database of doom

HOW

馃 Generated by Copilot at 63b99a0

  • Add errors and client packages to import statements in ovn-nb-logical_router_policy.go, ovn-nb-logical_router_route.go, and ovn-nb-nat.go to handle client.ErrNotFound error and interact with OVN database (link, link, link)
  • Skip non-existent logical router policies, routes, and NATs in listLogicalRouterPoliciesByFilter, listLogicalRouterStaticRoutesByFilter, and listLogicalRouterNatByFilter functions by checking for client.ErrNotFound error and continuing the loop (link, link, link)

@zhangzujian zhangzujian added the bug Something isn't working label Jun 5, 2023
@zhangzujian zhangzujian marked this pull request as ready for review June 5, 2023 08:24
@zhangzujian zhangzujian merged commit d61a2ad into kubeovn:master Jun 7, 2023
53 of 58 checks passed
@zhangzujian zhangzujian deleted the libovsdb branch June 7, 2023 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants