Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-23425

[release-4.12] MetalLB controller doesn't preserve internal state after reboot

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Undefined Undefined
    • 4.12.z
    • 4.12.0
    • Networking / Metal LB
    • None
    • No
    • CNF Network Sprint 245, CNF Network Sprint 246
    • 2
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • Hide
      Cause: When metallb's controller restarts while having an IP assigned and unassigned LB services.
      Consequence: It starts with an empty internal state and thus can move an already assigned IP to a different LB service and break workloads.
      Fix: Modify metallb's controller to process the services which already have an IP assigned first.
      Show
      Cause: When metallb's controller restarts while having an IP assigned and unassigned LB services. Consequence: It starts with an empty internal state and thus can move an already assigned IP to a different LB service and break workloads. Fix: Modify metallb's controller to process the services which already have an IP assigned first.
    • Bug Fix
    • Done

      Description of problem:

      Regarding Metallb external IP allocation:
      When a service of type LB gets allocated a specific IP (via the metallb.universe.tf/loadBalancerIPs annotation), and there are other LB services in the cluster, and metallb's controller restarts,
      it will assign the specific IP to a different service.
      Thus the request for specific IP fails.

      Steps to Reproduce:

      1. Deploy latest metallb.
      2. Apply the following yamls:
      apiVersion: metallb.io/v1beta1
      kind: IPAddressPool
      metadata:
        name: ipaddresspool
        namespace: metallb-system
      spec:
        addresses:
        - 192.168.144.1/32
      ---
      apiVersion: v1
      kind: Service
      metadata:
        annotations:
          metallb.universe.tf/loadBalancerIPs: 192.168.144.1
        name: nginx
        namespace: default
      spec:
        ports:
        - nodePort: 32725
          port: 80
          protocol: TCP
          targetPort: 80
        type: LoadBalancer
      ---
      apiVersion: v1
      kind: Service
      metadata:
        name: nginx1
        namespace: default
      spec:
        ports:
        - nodePort: 32726
          port: 80
          protocol: TCP
          targetPort: 80
        type: LoadBalancer
      ---
      apiVersion: v1
      kind: Service
      metadata:
        name: nginx2
        namespace: default
      spec:
        ports:
        - nodePort: 32727
          port: 80
          protocol: TCP
          targetPort: 80
        type: LoadBalancer
      3. See that the "nginx" service is assigned the address 192.168.144.1
      4. Delete the controller pod. (may need to repeat more than once)
      5. See that the address got assigned to a different service, leaving "nginx" pending. 

      Actual results:

      The address 192.168.144.1 is assigned to a different service, and service "nginx" external-ip moved to pending.

      Expected results:

      The address 192.168.144.1 remains as the external ip of service "nginx"

      Additional info:

      Upstream issue: https://github.com/metallb/metallb/issues/1984

              lnoy@redhat.com Lior Noy (Inactive)
              lnoy@redhat.com Lior Noy (Inactive)
              Arti Sood Arti Sood
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: