Bug 1999649 - 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
Summary: MetalLB: Only one type of IP address can be assigned to service on dual stack...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.9
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.10.0
Assignee: Mohamed Mahmoud
QA Contact: Arti Sood
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-08-31 13:46 UTC by Arti Sood
Modified: 2022-03-10 16:06 UTC (History)
0 users

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-10 16:06:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github metallb metallb pull 1065 0 None open Refactor Metallb svc controller and speaker to support dual-stack 2021-11-24 13:46:10 UTC
Github openshift metallb pull 13 0 None Merged Sync with upstream MetalLB 2021-12-01 13:48:14 UTC
Red Hat Product Errata RHSA-2022:0056 0 None None None 2022-03-10 16:06:50 UTC

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


Note You need to log in before you can comment on or make changes to this bug.