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

MetalLB controller doesn't preserve internal state after reboot

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Undefined Undefined
    • None
    • 4.15
    • Networking / Metal LB
    • None
    • No
    • CNF Network Sprint 242
    • 1
    • False
    • Hide

      None

      Show
      None

      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.

      Version-Release number of selected component (if applicable):

      4.15/latest

      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: