OCPBUGS-11453: [release-4.10] Batch potentially big transaction on egress firewall ACLs migration#1641
Conversation
|
@npinaeva: No Bugzilla bug is referenced in the title of this pull request. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
@npinaeva: This pull request references Jira Issue OCPBUGS-11453, which is valid. The bug has been moved to the POST state. 6 validation(s) were run on this bug
Requesting review from QA contact: The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/retest-required |
|
@npinaeva any reason to skip the batch test? |
because the tests were written for int, and now Batch only works for ACLs, so it would require re-writing the whole test. So I though I can cheat and say we know the function works based on the tests in the previous versions :P |
|
The batching & tests could be []interface{} based instead and retain some of its generic nature? |
Yeah I considered this option, but that would require copying the slice twice to convert types back and forth, so I thought we would just copy the Batch function for other types in the future if needed. |
|
I see. The other only thing I can think of is a batch function that gives you the indexes of the array you need to work with: Then we can just test batch. |
The default transaction timeout is 10 seconds, it can be reached when we delete all egress firewall acls during migration to port groups from switches. Signed-off-by: Nadia Pinaeva <npinaeva@redhat.com> (cherry picked from commit 1896e16) (cherry picked from commit 7fb527e) (cherry picked from commit 88ecd8b) Conflicts: go-controller/pkg/ovn/egressfirewall.go - egressFirewallACLPriorityKey is not used in 4.11, because logging for egress firewall is not implemented (cherry picked from commit 5a64c5b) Conflicts: go-controller/pkg/ovn/egressfirewall.go Update Batch to be typed, since generics are not availbale in go 1.17 Update Batch tests to use ACLs instead of ints. Use RemoveACLsFromAllSwitches instead of RemoveACLsFromLogicalSwitchesWithPredicate, use nbdb.ACL instead of *nbdb.ACL
stale acls. Signed-off-by: Nadia Pinaeva <npinaeva@redhat.com> (cherry picked from commit 81acdc2) (cherry picked from commit 34eb562) Conflict; egressfirewall.go - update apimachinery.sets to the previous version (cherry picked from commit 0bc8f14) (cherry picked from commit dc46aa9) Conflicts: go-controller/pkg/ovn/egressfirewall.go had to move the fix to libovsdbops/switch
I didn't want to introduce any new logic (which switching to indexes will require), I prefer to stay as close to the initial implementation as possible when it comes to backporting. So the most straightforward way for now I would say it to just make Batch type pre-defined. I updated the tests, since it is not that many changes I believe, lmk what you think |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jcaamano, npinaeva The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/label qe-approved |
|
/retest-required |
|
@npinaeva: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
@npinaeva: Jira Issue OCPBUGS-11453: All pull requests linked via external trackers have merged: Jira Issue OCPBUGS-11453 has been moved to the MODIFIED state. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
Fix included in accepted release 4.10.0-0.nightly-2023-04-21-212037 |
|
[ART PR BUILD NOTIFIER] This PR has been included in build ose-ovn-kubernetes-container-v4.10.0-202305011254.p0.g7215581.assembly.stream for distgit ose-ovn-kubernetes. |
Backport of #1629
Had to make some changes, this one requires a proper review