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

Bug 1758232: NetworkPolicy performance fixes [4.2] #45

Commits on Sep 24, 2019

  1. Configuration menu
    Copy the full SHA
    cbd3c3b View commit details
    Browse the repository at this point in the history
  2. networkpolicy: minor fixups

    Remove a error message that was only there to help people upgrading
    *incorrectly* from 3.5 or earlier.
    
    Fix variable name in selectNamespaces
    
    Fix a comment "file" -> "function".
    
    We need to validate port.Protocol even though validation also checks
    it, because in theory we could be out of sync with upstream.
    
    We don't need a FIXME for named ports because there's a bug open about
    it.
    
    We don't need to validate that ports are in range because that got
    fixed upstream a long time ago.
    danwinship committed Sep 24, 2019
    Configuration menu
    Copy the full SHA
    e1206d8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    64bda44 View commit details
    Browse the repository at this point in the history

Commits on Oct 1, 2019

  1. Merge NetworkPolicy Namespace/NetNamespace tracking

    The previous code was not entirely correct in the event that Namespace
    and NetNamespace events got processed out of order. Fix that by
    tracking the events in a more unified way. (This is also needed for
    the upcoming cache rewrite.)
    
    Also, get rid of some unnecessary cache flushes:
    
      - We don't need to flush the cache on a Namespace update where the
        labels didn't change.
    
      - We only need to flush the cache on either AddNamespace or
        AddNetNamespace, whichever comes last.
    
      - We don't need to flush the cache (or regenerate OVS flows) on
        DeleteNamespace or DeleteNetNamespace, because the extra entries
        are harmless until the name/VNID is reused, and the cache will be
        flushed if that happens.
    
    Add a new subtest to confirm that we handle Namespace deletion
    correctly.
    danwinship committed Oct 1, 2019
    Configuration menu
    Copy the full SHA
    e6cd5fe View commit details
    Browse the repository at this point in the history
  2. Improve NetworkPolicy cache

    Rather than flushing the entire cache every time a Namespace is added,
    just add or remove cache entries as needed for the new Namespace.
    
    To ensure that the cache doesn't grow without bounds, flush the cache
    entry for a particular LabelSelector if *any* policy including that
    LabelSelector is deleted.
    
    Add tests for the new behavior.
    danwinship committed Oct 1, 2019
    Configuration menu
    Copy the full SHA
    7609771 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1b64205 View commit details
    Browse the repository at this point in the history