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

[release-4.13] Already assigned IP address is removed from a service on editing the ip address pool.

XMLWordPrintable

    • No
    • 1
    • OCP VE Sprint 232, OCP VE Sprint 233, OCP VE Sprint 234
    • 3
    • Proposed
    • False
    • Hide

      None

      Show
      None
    • NA
    • Release Note Not Required

      Description of problem:

      An already assigned IP address to service is removed if the IP address pool is edited to tie to a namespace.

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

      4.13

      How reproducible:

      Once in 2 times

      Steps to Reproduce:

       oc version
      Client Version: 4.12.0-0.nightly-2022-07-25-055755
      Kustomize Version: v4.5.4
      Server Version: 4.13.0-0.nightly-2023-02-15-202607
      Kubernetes Version: v1.26.0+c729678
      
      oc get csv -n metallb-system
      NAME                                    DISPLAY            VERSION               REPLACES                                PHASE
      metallb-operator.v4.13.0-202302080355   MetalLB Operator   4.13.0-202302080355   metallb-operator.v4.13.0-202302061816   Succeeded
      
      
      1. Created two ip addresspools with YAML below:-
      ----
      apiVersion: metallb.io/v1beta1
      kind: IPAddressPool
      metadata:
        name: ip-addresspool-l3a
        labels:
          zone: east
        namespace: metallb-system
      spec:
        addresses:
          - 10.10.10.1-10.10.10.10
        autoAssign: true
        avoidBuggyIPs: true
        serviceAllocation:
          priority: 50
          serviceSelectors:
            - matchLabels:
                environ: test
      ----
      apiVersion: metallb.io/v1beta1
      kind: IPAddressPool
      metadata:
        name: ip-addresspool-l3b
        labels:
          zone: east
        namespace: metallb-system
      spec:
        addresses:
          - 10.10.10.11-10.10.10.20
        autoAssign: true
        avoidBuggyIPs: true
        serviceAllocation:
          priority: 40
          serviceSelectors:
            - matchLabels:
                environ: dev
      
      oc get ipaddresspool -n metallb-system
      NAME                 AUTO ASSIGN   AVOID BUGGY IPS   ADDRESSES
      ip-addresspool-l3a   true          true              ["10.10.10.1-10.10.10.10"]
      ip-addresspool-l3b   true          true              ["10.10.10.11-10.10.10.20"]
      
      
      
      2. Create a project test and created two services with different labels to see both assigned IP addresses from appropriate pools.
       oc get svc
      NAME           TYPE           CLUSTER-IP       EXTERNAL-IP   PORT(S)          AGE
      hello-idle     LoadBalancer   172.30.240.226   10.10.10.1    8000:31465/TCP   31s
      hello-idle-1   LoadBalancer   172.30.168.160   10.10.10.11   8000:32299/TCP   4s
      
      
      3. Create another project test1 and edit address pool ip-addresspool-l3a to add namespaces: test and ip-addresspool-l3b namespaces: dev.
      4. Create a service with label environ=dev in namespace test1 .
      oc get svc
      NAME         TYPE           CLUSTER-IP      EXTERNAL-IP   PORT(S)          AGE
      hello-idle   LoadBalancer   172.30.16.176   10.10.10.11   8000:31172/TCP   36m
      

      Actual results:

      The newly created service in ns test1 get assigned IP address that was assigned to service 1 in ns test  oc get svc -n test
      NAME           TYPE           CLUSTER-IP       EXTERNAL-IP   PORT(S)          AGE
      hello-idle     LoadBalancer   172.30.240.226   10.10.10.1    8000:31465/TCP   53m
      hello-idle-1   LoadBalancer   172.30.168.160   <pending>     8000:32299/TCP   53m
        

      Expected results:

      The IP address from a service should not get unassigned.

      Additional info:

      oc describe svc hello-idle-1 -n test
      Name:                     hello-idle-1
      Namespace:                test
      Labels:                   environ=dev
      Annotations:              <none>
      Selector:                 name=hello-idle
      Type:                     LoadBalancer
      IP Family Policy:         SingleStack
      IP Families:              IPv4
      IP:                       172.30.168.160
      IPs:                      172.30.168.160
      Port:                     <unset>  8000/TCP
      TargetPort:               8080/TCP
      NodePort:                 <unset>  32299/TCP
      Endpoints:                10.128.2.39:8080,10.131.0.43:8080
      Session Affinity:         None
      External Traffic Policy:  Cluster
      Events:
        Type     Reason            Age                From                Message
        ----     ------            ----               ----                -------
        Normal   IPAllocated       51m                metallb-controller  Assigned IP ["10.10.10.11"]
        Normal   nodeAssigned      40m (x3 over 51m)  metallb-speaker     announcing from node "worker-00.asood-2161.qe.devcluster.openshift.com" with protocol "bgp"
        Normal   nodeAssigned      40m (x3 over 51m)  metallb-speaker     announcing from node "worker-01.asood-2161.qe.devcluster.openshift.com" with protocol "bgp"
        Warning  AllocationFailed  40m (x3 over 40m)  metallb-controller  Failed to allocate IP for "test/hello-idle-1": no available IPs
      

            pepalani@redhat.com Periyasamy Palanisamy
            rhn-support-asood Arti Sood
            Arti Sood Arti Sood
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: