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

[wip]: Add retry parameter to ovs-vsctl and ensure stale interfaces are removed #3784

Draft
wants to merge 22 commits into
base: master
Choose a base branch
from

Commits on Jul 20, 2023

  1. pkg: add OVS vswitchd database client

    Signed-off-by: Dan Williams <[email protected]>
    dcbw committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    11117c9 View commit details
    Browse the repository at this point in the history
  2. libovsdbops: add Update() and UpdateOps()

    Used when we absolutely do not want to create the object (like a bridge)
    if it doesn't exist, because that should be a hard error, but just want
    to update it. Mostly to make sure testcases do the right thing, but we
    never actually want to create 'br-int' either, so it works for both
    testcases and real code.
    
    Signed-off-by: Dan Williams <[email protected]>
    dcbw committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    dc862a1 View commit details
    Browse the repository at this point in the history
  3. libovsdbops: add LookupOps()

    Complement to Lookup() for chained operations.
    
    Signed-off-by: Dan Williams <[email protected]>
    dcbw committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    85b4942 View commit details
    Browse the repository at this point in the history
  4. libovsdbops: add vswitchdb helper functions

    Signed-off-by: Dan Williams <[email protected]>
    dcbw committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    b08d9c0 View commit details
    Browse the repository at this point in the history
  5. cni/node: use libovsdbops for pod setup/destroy operations

    Signed-off-by: Dan Williams <[email protected]>
    dcbw committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    6a0b7ca View commit details
    Browse the repository at this point in the history
  6. cni: clean up and consolidate shim operation setup

    cmdAdd/cmdDel use similar setup code; consolidate it. Also make
    cmdAdd use the same error logging mechanism as cmdDel does.
    
    Signed-off-by: Dan Williams <[email protected]>
    dcbw committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    192d241 View commit details
    Browse the repository at this point in the history

Commits on Jul 23, 2023

  1. Fix missing addLogicalPortToNetworkForNAD error

    Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
    jcaamano authored and rchicoli committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    ce0c491 View commit details
    Browse the repository at this point in the history
  2. Cache network ID in IC handler

    Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
    jcaamano authored and rchicoli committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    045939a View commit details
    Browse the repository at this point in the history
  3. Move Multinetpol record event implementation to base handler

    This is handled the same for all networks so it makes sense for it to be
    at the base handler
    
    Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
    jcaamano authored and rchicoli committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    1e694fe View commit details
    Browse the repository at this point in the history
  4. Rename base layer2 event handler

    We will introduce a specific layer2 event handler and the current name
    for the base layer 2 event handler (shared between layer2 and localnet
    controllers) would collide, so rename it.
    
    Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
    jcaamano authored and rchicoli committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    949ae21 View commit details
    Browse the repository at this point in the history
  5. Move Start/Stop entry points to the specific layer2 controllers

    Instead of having sommon Start/Stop entry points in the base layer2
    controller, let the layer2 and localnet controllers have their own so
    that they are in full control on how they start or stop.
    
    Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
    jcaamano authored and rchicoli committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    16ea81a View commit details
    Browse the repository at this point in the history
  6. Handle node events in layer2 controller

    Layer2 controller needs to be aware the node's zones so it needs to
    handle node events thorugh its own event handler.
    
    Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
    jcaamano authored and rchicoli committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    c54381a View commit details
    Browse the repository at this point in the history
  7. Move zoneICHandler to base network controller

    Currently in use by the default & layer 3 network controllers, the
    zoneICHandler will also be used by the layer2 network controller in
    sections of the code that are shared accross all controllers.
    
    Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
    jcaamano authored and rchicoli committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    4f80e77 View commit details
    Browse the repository at this point in the history
  8. Fetch network ID from any node in zone IC handler

    All network IDs are annotated to all nodes and the layer2 network
    controller will need it in context of no particular node.
    
    Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
    jcaamano authored and rchicoli committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    48de614 View commit details
    Browse the repository at this point in the history
  9. Add IC support to layer2 network controller

    There are three aspects worth highlighting:
    
    * Support is achieved through specific configuration of the logical
      switch and logical ports that the layer2 network controller was
      already owner of. As such, the IC handler does provide this specific
      configuration but does not add, delete or clean up those entries which
      is still done by the network controller.
    
    * The base layer 2 controller does no longer handle local or remote pod
      events in different code flows. This commit brings them together as
      the only difference between them is whether they create the remote
      port (layer2) or not (localnet). I did try different things but this
      was the easiest way forward at this time by at least an order
      of magnitude amount of effort.
    
    * This commit also brings together layer3 and layer2 pod synchronization
      as there were not that many differences between them.
    
    Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
    jcaamano authored and rchicoli committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    42c0964 View commit details
    Browse the repository at this point in the history
  10. Enable layer2 interconnect support

    Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
    jcaamano authored and rchicoli committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    76b1f1c View commit details
    Browse the repository at this point in the history
  11. Enable layer2 interconnect e2e tests

    Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
    jcaamano authored and rchicoli committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    a6f2082 View commit details
    Browse the repository at this point in the history
  12. Replace child stop channels with cancelable contexts

    Commit 5d6b136 added child stop channels to stop the network policy
    handlers independently from the network controller when the policy is
    deleted while also stopping them if the network controller is stopped.
    
    Unfortunately when both things happen at the same time, one of those
    events will end up attempting to close a closed channel which will panic.
    
    Introduce a CancelableContext utility that will wrap a cancelable context
    that can be chained to achieve the same effect.
    
    Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
    jcaamano authored and rchicoli committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    b4fe61a View commit details
    Browse the repository at this point in the history
  13. Add secondary network namespace address set UTs

    Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
    jcaamano authored and rchicoli committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    409a403 View commit details
    Browse the repository at this point in the history
  14. Remove node check for syncing cloud private ip config

    This would remove node name comparison between cloud private ip config
    and egress ip status as this is not valid in the case of egress ip
    failover to another node during upgrade or reboot scenario.
    
    Signed-off-by: Periyasamy Palanisamy <[email protected]>
    pperiyasamy authored and rchicoli committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    f3fc1af View commit details
    Browse the repository at this point in the history
  15. kubevirtl: Replace node only at migration tests

    After live migrating a VM the original node can be shutdown and a new
    one can appear taking over the node subnet. There were some unit tets
    for that but they exercise this part for non live migration scenarios
    creating a race condition between cleanup and addLogicalPort.
    
    This change run that part of the tests only for live-migration
    scenarios.
    
    Signed-off-by: Enrique Llorente <[email protected]>
    qinqon authored and rchicoli committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    df31560 View commit details
    Browse the repository at this point in the history
  16. ConfigureOVS: Ensure stale interfaces matching the iface-id are remov…

    …ed before creating a new pod networking
    
    Do not try to configure the OVS, if the interface matching the iface-id cannot be garbage-collected.
    Otherwise pods might enter the CrashLoopBackOff state, because the related ct-zone disappears from the bridge interface.
    
    Signed-off-by: Rafael Chicoli <[email protected]>
    rchicoli committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    904d4f7 View commit details
    Browse the repository at this point in the history