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.14] OCPBUGS-16267: Fix controller reboot bug #155

Commits on Nov 1, 2023

  1. Make ConditionStatus private

    Make the ConditionStatus function private
    as it's only being used internally by IsNetworkUnavailable
    
    Also switch the order of the functions making the exported
    one at the top.
    
    Signed-off-by: Lior Noy <lnoy@redhat.com>
    liornoy committed Nov 1, 2023
    Configuration menu
    Copy the full SHA
    96c3d1b View commit details
    Browse the repository at this point in the history
  2. Add e2etest for metallb controller restart

    * We add a test case where we create 4 services
    and assert that when the controller restarts, it keeps assigning
    the first two services the same IPs, and not removing/changing them.
    
    * Move functions "validateDesiredLB" and "getIngressIPs" to a different
    package, to be able to reuse in the l2tests.
    
    Signed-off-by: Lior Noy <lnoy@redhat.com>
    liornoy committed Nov 1, 2023
    Configuration menu
    Copy the full SHA
    6ec5dfa View commit details
    Browse the repository at this point in the history
  3. Make the controller preserve state on reboot

    This commit changes the behavior of the service reconciler
    to fix a bug that the controller de-assign an ip for a service
    after reboot.
    
    Make the service reconciler initially ignore the services,
    up until the first reprocessAll event finishes, where we sort
    and handle all of the services with assigned IP first.
    By doing so, we make the controller aware of the LB services with
    existing external IPs and sync the internal state.
    Only after we reprocessed all services once, and know what
    services are allocated and what ips are in use, return to
    work as normal.
    
    Add unit tests for the service controller
    
    Add unit test cases to cover the FirstCongifurtaion flag.
    Testcase 1: Testing the service reconcile with the flag set to true.
    Testcase 2: Testing the reprocessAll with the flag set to true:
    validate that the value is modifeid to false by the controller.
    
    Signed-off-by: liornoy <lnoy@redhat.com>
    liornoy committed Nov 1, 2023
    Configuration menu
    Copy the full SHA
    c60f711 View commit details
    Browse the repository at this point in the history