Bug 1754682

Summary: DHCP mode failed when configuring it in multus CNI IPAM
Product: OpenShift Container Platform Reporter: Weibin Liang <weliang>
Component: NetworkingAssignee: Feng Pan <fpan>
Networking sub component: openshift-sdn QA Contact: zhaozhanqi <zzhao>
Status: CLOSED ERRATA Docs Contact:
Severity: urgent    
Priority: unspecified CC: anusaxen, bbennett, danw, dcbw, dosmith, tohayash
Version: 4.3.0Keywords: Regression, TestBlocker
Target Milestone: ---   
Target Release: 4.3.0   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1754686 (view as bug list) Environment:
Last Closed: 2020-01-23 11:06:54 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: 1754686    

Description Weibin Liang 2019-09-23 21:43:29 UTC
Description of problem:
Can not create pod when configuring DHCP mode in multus macvlan type

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

How reproducible:

Steps to Reproduce:
1. Install and enable external DHCP server
2. Create project and net-attach-def
oc new-project test1
oc edit networks.operator.openshift.io -o yaml
  - name: macvlan-ipam-static
      namespace: test1
        type: dhcp
      master: ens5
      mode: bridge
    type: SimpleMacvlan
3. Create a pod
cat pod1.yaml 
apiVersion: v1
kind: Pod
  name: pod1
    k8s.v1.cni.cncf.io/networks: macvlan-ipam-static
  - name: pod1
    command: ["/bin/bash", "-c", "sleep 2000000000000"]
    image: dougbtv/centos-network

oc create -f pod1.yaml

Actual results:
[root@dhcp-41-193 FILE]# oc get pods
pod1   0/1     ContainerCreating   0          16m

[root@dhcp-41-193 FILE]# oc describe pod pod1
  Type     Reason                  Age                 From                     Message
  ----     ------                  ----                ----                     -------
  Normal   Scheduled               16m                 default-scheduler        Successfully assigned test1/pod1 to ip-10-0-61-249
  Warning  FailedCreatePodSandBox  16m                 kubelet, ip-10-0-61-249  Failed create pod sandbox: rpc error: code = Unknown desc = failed to create pod network sandbox k8s_pod1_test1_705aacf6-de48-11e9-8f2b-02a758168282_0(94adcd6f27f216f1daee848abbb4874efa149549bb5d5a658911c5994642ead5): Multus: Err adding pod to network "macvlan-ipam-static": Multus: error in invoke Delegate add - "macvlan": error dialing DHCP daemon: dial unix /run/cni/dhcp.sock: connect: no such file or directory

Expected results:
Pod is running and secondary interface get ip address

Additional info:

Comment 1 Anurag saxena 2019-09-23 21:53:26 UTC
This is seen on both vSphere and Baremetal impacting all dhcp IPAM usecases.

Comment 2 Anurag saxena 2019-09-23 22:29:50 UTC
This is regression as well as new feature. So the dhcp ipam was introduced in 4.0-4.1 but managing it via CNO was introduced in 4.2. No matter you do it via CNO or manually via net-attach-def, its causing pod creation fail

Comment 3 Tomofumi Hayashi 2019-10-01 14:01:00 UTC
Fix PR: https://github.com/openshift/cluster-network-operator/pull/324

Comment 6 Weibin Liang 2019-10-04 18:07:38 UTC
Verified it on v4.3.0-0.ci-2019-10-04-083724.

Will re-test it when the v4.3 nightly image ready on https://openshift-release.svc.ci.openshift.org/

Comment 7 Weibin Liang 2019-10-09 18:24:14 UTC
Verified it on 4.3.0-0.ci-2019-10-09-120159

Comment 9 errata-xmlrpc 2020-01-23 11:06:54 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, and where to find the updated
files, follow the link below.

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