Bug 1944678

Summary: Whereabouts IPAM CNI duplicate IP addresses assigned to pods
Product: OpenShift Container Platform Reporter: Douglas Smith <dosmith>
Component: NetworkingAssignee: Douglas Smith <dosmith>
Networking sub component: multus QA Contact: Weibin Liang <weliang>
Status: CLOSED ERRATA Docs Contact:
Severity: urgent    
Priority: high CC: xingli
Version: 4.8   
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
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.
Story Points: ---
Clone Of:
: 1944680 (view as bug list) Environment:
Last Closed: 2021-07-27 22:56:34 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:
Bug Depends On:    
Bug Blocks: 1944680, 1944682    

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.