Bug 1836405 - Multus whereabouts assign network address to the pod
Summary: Multus whereabouts assign network address to the pod
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.6
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.5.z
Assignee: Douglas Smith
QA Contact: Weibin Liang
URL:
Whiteboard:
Depends On:
Blocks: 1854504 1856783
TreeView+ depends on / blocked
 
Reported: 2020-05-15 19:57 UTC by Weibin Liang
Modified: 2024-03-25 15:56 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1854504 1856783 (view as bug list)
Environment:
Last Closed: 2020-10-27 16:00:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift whereabouts-cni pull 12 0 None closed Bug 1836405: Updates for excluding network address 2021-01-14 13:29:14 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:00:08 UTC

Description Weibin Liang 2020-05-15 19:57:42 UTC
Description of problem:
For whereabouts DHCP testing, if setup "range": "192.168.21.100/30" in yaml file,  then 192.168.22.100/30 is network address, 192.168.22.101/30 to 192.168.22.102/30 are host addresses, 192.168.22.103/30 is broadcast address, the pod should only get 192.168.22.101 and 192.168.22.102, but right now one pod can get network address 192.168.22.100

Version-Release number of selected component (if applicable):
4.5.0-0.nightly-2020-05-15-123950

How reproducible:
Always

Steps to Reproduce:
1. oc create -f https://raw.githubusercontent.com/weliang1/Openshift_Networking/master/Features/multus/whereabouts-macvlan.yaml
2. Create 4 pods to absorbing above net-attach-def
[weliang@weliang networking]$ oc get pods
NAME                              READY   STATUS              RESTARTS   AGE
macvlan-bridge-whereabouts-pod1   1/1     Running             0          40s
macvlan-bridge-whereabouts-pod2   1/1     Running             0          25s
macvlan-bridge-whereabouts-pod3   1/1     Running             0          20s
macvlan-bridge-whereabouts-pod4   0/1     ContainerCreating   0          15s
[weliang@weliang networking]$ oc exec macvlan-bridge-whereabouts-pod1 -- ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
3: eth0@if62: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 8951 qdisc noqueue state UP group default 
    link/ether 0a:58:0a:80:00:39 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 10.128.0.57/23 brd 10.128.1.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::4c2:75ff:fe51:189c/64 scope link 
       valid_lft forever preferred_lft forever
4: net1@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc noqueue state UP group default 
    link/ether 82:4e:a0:d4:4c:1a brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 192.168.22.100/30 brd 192.168.22.103 scope global net1
       valid_lft forever preferred_lft forever
    inet6 fe80::804e:a0ff:fed4:4c1a/64 scope link 
       valid_lft forever preferred_lft forever
[weliang@weliang networking]$ oc exec macvlan-bridge-whereabouts-pod2 -- ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
3: eth0@if63: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 8951 qdisc noqueue state UP group default 
    link/ether 0a:58:0a:80:00:3a brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 10.128.0.58/23 brd 10.128.1.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::f4eb:abff:fe94:1db8/64 scope link 
       valid_lft forever preferred_lft forever
4: net1@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc noqueue state UP group default 
    link/ether ae:61:98:3b:da:a5 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 192.168.22.101/30 brd 192.168.22.103 scope global net1
       valid_lft forever preferred_lft forever
    inet6 fe80::ac61:98ff:fe3b:daa5/64 scope link 
       valid_lft forever preferred_lft forever
[weliang@weliang networking]$ oc exec macvlan-bridge-whereabouts-pod3 -- ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
3: eth0@if64: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 8951 qdisc noqueue state UP group default 
    link/ether 0a:58:0a:80:00:3b brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 10.128.0.59/23 brd 10.128.1.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::f455:d4ff:fea1:4857/64 scope link 
       valid_lft forever preferred_lft forever
4: net1@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc noqueue state UP group default 
    link/ether 52:44:d4:4f:ef:56 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 192.168.22.102/30 brd 192.168.22.103 scope global net1
       valid_lft forever preferred_lft forever
    inet6 fe80::5044:d4ff:fe4f:ef56/64 scope link 
       valid_lft forever preferred_lft forever
[weliang@weliang networking]$ 
[weliang@weliang networking]$ 
[weliang@weliang networking]$ oc get net-attach-def
NAME                         AGE
macvlan-bridge-whereabouts   86s
[weliang@weliang networking]$ oc get net-attach-def macvlan-bridge-whereabouts -o yaml
apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
  creationTimestamp: "2020-05-15T19:47:34Z"
  generation: 1
  managedFields:
  - apiVersion: k8s.cni.cncf.io/v1
    fieldsType: FieldsV1
    fieldsV1:
      f:spec:
        .: {}
        f:config: {}
    manager: oc
    operation: Update
    time: "2020-05-15T19:47:34Z"
  name: macvlan-bridge-whereabouts
  namespace: qi18r
  resourceVersion: "153560"
  selfLink: /apis/k8s.cni.cncf.io/v1/namespaces/qi18r/network-attachment-definitions/macvlan-bridge-whereabouts
  uid: eea85ce4-b021-4674-bb01-f31d0dbd9516
spec:
  config: '{ "cniVersion": "0.3.0", "type": "macvlan", "master": "ens3","mode": "bridge",
    "ipam": { "type": "whereabouts", "range": "192.168.22.100/30"} }'
[weliang@weliang networking]$ 

Actual results:
192.168.22.100 was assigned to macvlan-bridge-whereabouts-pod1

Expected results:
192.168.22.100 should not be assigned to any pod

Additional info:

Comment 4 Weibin Liang 2020-06-08 14:15:59 UTC
PR merged 5 days ago, but it is still not in the nightly image

Comment 5 Weibin Liang 2020-06-11 18:06:12 UTC
(In reply to Weibin Liang from comment #4)
> PR merged 5 days ago, but it is still not in the nightly image

QA still wait for the nightly image with PR fixing

Comment 6 Weibin Liang 2020-06-16 14:20:12 UTC
Tested and verified in 4.6.0-0.nightly-2020-06-16-125323

Comment 7 Douglas Smith 2020-08-21 12:00:21 UTC
updating target release for bz bot.

Comment 16 errata-xmlrpc 2020-10-27 16:00:05 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 (OpenShift Container Platform 4.6 GA Images), 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/RHBA-2020:4196


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