Bug 1944678 - Whereabouts IPAM CNI duplicate IP addresses assigned to pods
Summary: Whereabouts IPAM CNI duplicate IP addresses assigned to pods
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.8
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.8.0
Assignee: Douglas Smith
QA Contact: Weibin Liang
Depends On:
Blocks: 1944680 1944682
TreeView+ depends on / blocked
Reported: 2021-03-30 13:29 UTC by Douglas Smith
Modified: 2021-07-27 22:56 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: IP address not properly stored due to wrong variable type. Consequence: Duplicate IPs are assigned to pods. Fix: Use included code which properly sets a 16 byte sized variable.
Clone Of:
: 1944680 (view as bug list)
Last Closed: 2021-07-27 22:56:34 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 22:56:56 UTC

Description Douglas Smith 2021-03-30 13:29:25 UTC
Description of problem: Whereabouts will assign the same IP address to multiple pods.

How reproducible: Always.

Steps to Reproduce:

Create net-attach-def as so:

apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
  name: macvlan-conf
    k8s.v1.cni.cncf.io/resourceName: mellanox.com/mlnx_sriov_netdevice
  config: '{
  "type": "macvlan",
  "master": "change_to_ifname_on_your_hosts",
  "cniVersion": "0.3.1",
  "name": "macvlan-network",
  "ipam": {
    "type": "whereabouts",
    "range": "",
    "range_start": ""

Actual results: Duplicate IP address assigned 

Expected results: Unique IP address assigned to each pod.

Upstream issue: https://github.com/k8snetworkplumbingwg/whereabouts/issues/97

Comment 1 Douglas Smith 2021-03-30 13:30:27 UTC
A fix has been merged in master for 4.8 @ https://github.com/openshift/whereabouts-cni/pull/51

Comment 2 Weibin Liang 2021-03-31 17:49:41 UTC
Tested and verified in 4.8.0-0.nightly-2021-03-31-034951.
No duplicate IP assigned to the pods.

Comment 3 Xingbin Li 2021-05-27 08:45:31 UTC
Hello team,

Do we have a plan to backport this patch to the OCP 4.7 or the earlier version?

Comment 6 errata-xmlrpc 2021-07-27 22:56:34 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.8.2 bug fix and 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.


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