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

autoAssign=true present in ipaddresspool CR assigns the first available host IP from a network

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Normal Normal
    • None
    • 4.15
    • Documentation / CNF
    • None
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • 2
    • None
    • None
    • Hide
      23-06-2025: PR merged
      19-06-2025: PR https://github.com/openshift/openshift-docs/pull/94990 created and sent for review.
      Show
      23-06-2025: PR merged 19-06-2025: PR https://github.com/openshift/openshift-docs/pull/94990 created and sent for review.
    • None
    • None
    • None
    • T&PS 2025 #6
    • 1
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

      Once the ipaddresspool CR is configured within addresses section with a host from a large network, if the autoAssign=true is configured. The first available host IP from configured network is assigned to the LoadBalancer service and not the IP configured in the address. Please see the below example:
      
      - The ipaddresspool is configured with 10.xx.204.240/27 IP:
      
        kind: IPAddressPool
        metadata:
          name: addresspool-test
          namespace: metallb-system
        spec:
          addresses:
          - 10.xx.204.240/27
          autoAssign: true
          avoidBuggyIPs: true
      
      - The first assigned IP to the service is 10.xx.204.224 and not the 10.xx.204.240 as configured: 
      
      $ oc get svc
      NAME        TYPE           CLUSTER-IP       EXTERNAL-IP     PORT(S)        AGE
      test-conn   LoadBalancer   xxxxxx   10.xx.204.224  <--- 80:31127/TCP   8m37s
      
      
      I can see the following issues with this configuration:
      
      - The assigned IP could not be the desired by the administrator and it could cause issues in the network. Normally, the first available host IP from a network is the gateway. In this case, we could have issues as the LoadBalancer IP is overlapping with the default gateway from the network
      - The configuration should not be allowed as this is not one the network mask address from the configured address. Or the autoassign should assign the first available IP after the configured network address (10.xx.204.241/27)
      - In this example, the network mask range was assigned to the loadbalancer IP. We should review if this is desired or not as well. 
      - If this wont be resolved by code, we should add one note in the documentation. While the ipaddresspool is configured, we could add any block to not allowed any configuration different than the network mask from configured network.

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

          4.15

      How reproducible:

          Easily

      Steps to Reproduce:

          1.
          2.
          3.
          

      Actual results:

          

      Expected results:

          

      Additional info:

          

              rhn-support-kquinn Kevin Quinn
              rhn-support-bgomes Bruno Gomes
              None
              None
              Arti Sood Arti Sood
              None
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: