Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1999649

Summary: MetalLB: Only one type of IP address can be assigned to service on dual stack cluster from a address pool that have both IPv4 and IPv6 addresses defined
Product: OpenShift Container Platform Reporter: Arti Sood <asood>
Component: NetworkingAssignee: Mohamed Mahmoud <mmahmoud>
Networking sub component: Metal LB QA Contact: Arti Sood <asood>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: unspecified    
Version: 4.9   
Target Milestone: ---   
Target Release: 4.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-10 16:06:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Arti Sood 2021-08-31 13:46:05 UTC
Description of problem:
MetalLB on dual stack cluster can assign IP address to LoadBalancer service type from either address pool of IPv4 addresses or IPv6 addresses. If an addresspool has both types of addresses, the service gets stuck at 'Pending address' state when one type of IP address is used up.
 

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

How reproducible:
Always

Steps to Reproduce:
1. Install MetalLB operator on dual stack cluster on baremetal
2. Configure address pool with range of IPv6 and IPv4 addresses.
 example 

    - fd2e:6f44:5dd8::6d - fd2e:6f44:5dd8::6d
    - fd2e:6f44:5dd8::91 - fd2e:6f44:5dd8::91
    - 192.168.123.126 - 192.168.123.126
    - 192.168.123.146 - 192.168.123.146

3. Create a service with following YAML that can be assigned either of the address.

apiVersion: apps/v1
kind: ReplicaSet
metadata:
  name: hello-world
  labels:
    app: hello-world
spec:
  selector:
    matchLabels:
      app: hello-world
  replicas: 10
  template:
    metadata:
      labels:
        app: hello-world
    spec:
      containers:
      - name: hello-world
        image: gcr.io/google-samples/node-hello:1.0
        imagePullPolicy: Always
        ports:
        - containerPort: 8080
          protocol: TCP
 
---
apiVersion: v1
kind: Service
metadata:
  name: hello-world
spec:
  ipFamilyPolicy: RequireDualStack
  ipFamilies:
  - IPv6
  - IPv4
  selector:
    app: hello-world
  ports:
  - port: 80
    targetPort: 8080
    protocol: TCP
  type: LoadBalancer

Actual results:

Once all the addresses of first type are used up second type cannot be assigned.

Expected results:
Both types should be assigned to the service from the address pool.

Additional info:

Work around:- Create two different address pool - IPv4 address pool and IPv6 address pool so that service can be created with both type of addresses.

LoadBalancer service can have either IPv4 or IPv6 address not both.
https://github.com/kubernetes/enhancements/pull/1992#issuecomment-825905432

Comment 8 errata-xmlrpc 2022-03-10 16:06:30 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.10.3 security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:0056