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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-4.7] Bug 1976242: Update existing policy ACLs on start #650

Conversation

jcaamano
Copy link
Contributor

@jcaamano jcaamano commented Aug 9, 2021

This is a backport cherry-pick of 1ec2bcb && 642c37c

Adds the following improvements namespace address set handling of
network policies:

1) Adds processExistingItems to the namespace selector handlers so that
   all namespace address sets are accounted for from the get go.
2) Setups the namespace selector handlers before the initial
   creation/update of the corresponding ACL.
   Handler Add function will be noop for existing items, as these are
   not adding any new address set compared to those added
   previously by 1. This avoids adding address sets to the ACL match
   gradually in several updates.
   A single op after these handlers are setup will set the ACL in its
   final form accounting for all the existing namespace address sets
   that need to be considered at that time.
3) Updates existing allow ACLS on startup, fixing or realigning these ACLs to
   its desired form be it due to lost events during downtime or changes
   from one ovn-k8s version to annother, like for example updating pre-dual
   stack address sets to dual stack address sets in the ACL's match.
3) Updating an allow ACL no longer relies on finding by match. This
   could block us from being able to update an ACL if any namespace
   selector on a policy were to be modified during a period of k8s-ovn
   downtime.

Signed-off-by: Jaime Caamaño Ruiz <jcaamano@redhat.com>
(cherry picked from commit 9830624)
(cherry picked from commit 1ec2bcb)
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 9, 2021

@jcaamano: An error was encountered searching for bug 1976242 on the Bugzilla server at https://bugzilla.redhat.com. No known errors were detected, please see the full error message for details.

Full error message. could not unmarshal response body: invalid character '<' looking for beginning of value

Please contact an administrator to resolve this issue, then request a bug refresh with /bugzilla refresh.

In response to this:

[release-4.7] Bug 1976242: Update existing policy ACLs on start

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.

Cleans up address sets that are in old non dual stack format if there
is a corresponding address set in the new dual stack format. Done after
all resource handlers have sync'ed so that the clean up is performed
after ACLs are updated to reference the new dual stack address sets.

partially fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1962387

needs: "Update existing policy ACLs on start" a5c9f085

Signed-off-by: Jaime Caamaño Ruiz <jcaamano@redhat.com>
(cherry picked from commit 8a635a8)
(cherry picked from commit 642c37c)
@jcaamano jcaamano force-pushed the release-4.7-dual-stack-address-set branch from c572073 to bdd003d Compare August 9, 2021 15:22
@jcaamano
Copy link
Contributor Author

jcaamano commented Aug 9, 2021

/bugzilla refresh

@openshift-ci openshift-ci bot added bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Aug 9, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 9, 2021

@jcaamano: This pull request references Bugzilla bug 1976242, which is invalid:

  • expected dependent Bugzilla bug 1976241 to be in one of the following states: VERIFIED, RELEASE_PENDING, CLOSED (ERRATA), CLOSED (CURRENTRELEASE), but it is ON_QA instead
  • expected dependent Bugzilla bug 1962387 to target a release in 4.8.0, 4.8.z, but it targets "4.9.0" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/bugzilla refresh

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.

@jcaamano
Copy link
Contributor Author

/retest

1 similar comment
@jcaamano
Copy link
Contributor Author

/retest

@jcaamano
Copy link
Contributor Author

/bugzilla refresh

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 12, 2021

@jcaamano: This pull request references Bugzilla bug 1976242, which is invalid:

  • expected dependent Bugzilla bug 1976241 to be in one of the following states: VERIFIED, RELEASE_PENDING, CLOSED (ERRATA), CLOSED (CURRENTRELEASE), but it is ON_QA instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/bugzilla refresh

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.

@jcaamano
Copy link
Contributor Author

/bugzilla refresh

@openshift-ci openshift-ci bot added bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Aug 20, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 20, 2021

@jcaamano: This pull request references Bugzilla bug 1976242, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

6 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.z) matches configured target release for branch (4.7.z)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)
  • dependent bug Bugzilla bug 1976241 is in the state VERIFIED, which is one of the valid states (VERIFIED, RELEASE_PENDING, CLOSED (ERRATA), CLOSED (CURRENTRELEASE))
  • dependent Bugzilla bug 1976241 targets the "4.8.z" release, which is one of the valid target releases: 4.8.0, 4.8.z
  • bug has dependents

No GitHub users were found matching the public email listed for the QA contact in Bugzilla (anusaxen@redhat.com), skipping review request.

In response to this:

/bugzilla refresh

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.

@trozet
Copy link
Contributor

trozet commented Aug 20, 2021

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 20, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 20, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jcaamano, trozet

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 20, 2021
@jupierce jupierce added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Aug 27, 2021
@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

3 similar comments
@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 53bc319 into openshift:release-4.7 Aug 28, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 28, 2021

@jcaamano: All pull requests linked via external trackers have merged:

Bugzilla bug 1976242 has been moved to the MODIFIED state.

In response to this:

[release-4.7] Bug 1976242: Update existing policy ACLs on start

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants