Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1406338

Summary: Sometime pod ip is disappeared after assign
Product: OpenShift Container Platform Reporter: DeShuai Ma <dma>
Component: NetworkingAssignee: Dan Winship <danw>
Status: CLOSED DUPLICATE QA Contact: Meng Bo <bmeng>
Severity: low Docs Contact:
Priority: low    
Version: 3.4.0CC: aos-bugs, atragler, bbennett, dma, mleitner, sukulkar, wmeng
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-23 12:40:40 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:
Embargoed:

Description DeShuai Ma 2016-12-20 10:06:34 UTC
Description of problem:
Create some pods then get pod status, one of the pod's ip is <none>.

Version-Release number of selected component (if applicable):
openshift v3.4.0.38
kubernetes v1.4.0+776c994
etcd 3.1.0-rc.0

How reproducible:
60%

Steps to Reproduce:
1. Create pod then get pod
[root@openshift-134 ~]# cat test.sh 
#!/bin/bash
oc create -f https://raw.githubusercontent.com/mdshuai/testfile-openshift/master/k8s/terminatedpods/secret-volume.yaml -n dma
for i in `seq 1 1 50`; do
  sleep 1
  oc get po -n dma -o wide
done
[root@openshift-134 ~]# ./test.sh 
secret "secret-1" created
secret "secret-2" created
pod "hello-pod-1" created
pod "hello-pod-2" created
NAME          READY     STATUS              RESTARTS   AGE       IP        NODE
hello-pod-1   0/1       ContainerCreating   0          13s       <none>    node1
hello-pod-2   0/1       ContainerCreating   0          13s       <none>    node1
NAME          READY     STATUS      RESTARTS   AGE       IP            NODE
hello-pod-1   0/1       Completed   0          14s       10.128.0.17   node1
hello-pod-2   0/1       Error       0          14s       10.128.0.16   node1
NAME          READY     STATUS      RESTARTS   AGE       IP            NODE
hello-pod-1   0/1       Completed   0          15s       10.128.0.17   node1
hello-pod-2   0/1       Error       0          15s       <none>        node1
NAME          READY     STATUS      RESTARTS   AGE       IP            NODE
hello-pod-1   0/1       Completed   0          17s       10.128.0.17   node1
hello-pod-2   0/1       Error       0          17s       <none>        node1

Actual results:


Expected results:


Additional info:

Comment 1 Ben Bennett 2016-12-21 14:27:59 UTC
I don't see anything wrong here.  The <none>s are for ContainerCreating or Error states.  If you have more information indicating that there was a networking problem, please let me know and provide the logs.

Thanks!

Comment 2 DeShuai Ma 2016-12-22 07:33:02 UTC
The issue is when get po by `-o wide`, most pod which status is complete or failed, they all can display the ip info. But it doesn't has ip info in my case.
It's easy to reproduce use the template I paste in above.

Case #1
I try again in the same env use same template and same step., sometime the completed pod has the ip but sometime doesn't.
#In namespace dma1, 'hello-pod-1' has ipinfo
[root@gpei-public-master-etcd-zone1-1 ~]# oc get po -n dma1 -o wide
NAME          READY     STATUS      RESTARTS   AGE       IP          NODE
hello-pod-1   0/1       Completed   0          10m       10.2.6.15   gpei-public-node-zone1-primary-1
hello-pod-2   0/1       Error       0          10m       <none>      gpei-public-node-zone2-primary-1
#In namespace dma2, 'hello-pod-1' has no ipinfo
[root@gpei-public-master-etcd-zone1-1 ~]# oc get po -n dma2 -o wide
NAME          READY     STATUS      RESTARTS   AGE       IP        NODE
hello-pod-1   0/1       Completed   0          4m        <none>    gpei-public-node-zone1-primary-1
hello-pod-2   0/1       Error       0          4m        <none>    gpei-public-node-zone2-primary-1

Case #2
If I add sleep some sec before the container exit directly, wait pod become complete/Error, then get pod they have can display ip info.
[root@gpei-public-master-etcd-zone1-1 ~]# oc get po -n dma6 -o wide
NAME          READY     STATUS      RESTARTS   AGE       IP           NODE
hello-pod-1   0/1       Completed   0          2m        10.2.6.20    gpei-public-node-zone1-primary-1
hello-pod-2   0/1       Error       0          2m        10.2.10.83   gpei-public-node-zone2-primary-1

Summary: There is maybe some sync consistent issue if container exit quickly.

Comment 3 DeShuai Ma 2016-12-22 08:18:44 UTC
Test on upstream, same issue. Create upstream issue: https://github.com/kubernetes/kubernetes/issues/39138

Comment 4 DeShuai Ma 2016-12-23 03:10:31 UTC
Same with upstream issue: https://github.com/kubernetes/kubernetes/issues/39113

Comment 5 Ben Bennett 2017-01-27 16:50:40 UTC
The problem appears to be that the CNI plugin takes longer to respond and if the pod terminates quickly enough the IP address may not be written in.

Comment 6 Ben Bennett 2017-06-23 12:40:40 UTC

*** This bug has been marked as a duplicate of bug 1449373 ***