Bug 1340411 - cannot resolve ip of pod inside the container
Summary: cannot resolve ip of pod inside the container
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 3.2.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Andy Goldstein
QA Contact: DeShuai Ma
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-27 10:48 UTC by Wang Haoran
Modified: 2016-06-14 06:39 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-14 06:39:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
master.config (4.18 KB, text/plain)
2016-05-27 10:48 UTC, Wang Haoran
no flags Details

Description Wang Haoran 2016-05-27 10:48:50 UTC
Created attachment 1162418 [details]
master.config

Description of problem:

Failed to resolve ip of pod inside of the container
Version-Release number of selected component (if applicable):
openshift v3.2.0.44
kubernetes v1.2.0-36-g4a3f9c5
etcd 2.2.5


How reproducible:
always

Steps to Reproduce:
1.create a pod
$oc create -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/networking/pod-for-ping.json
2.login to the pod and ping the router pod name
$oc rsh <pod>
$ping <router_pod>
3.check the /etc/reslove.conf
 oc rsh <pod> cat /etc/resolve.conf

Actual results:
step 2 :failed to resolve
step 3 :resolve.conf did not include the skydns ip
/ $ cat /etc/resolv.conf 
search haowang.svc.cluster.local svc.cluster.local cluster.local c.openshift-gce-devel.internal. google.internal.
nameserver 10.240.0.21
nameserver 10.240.0.21
nameserver #
nameserver updated
nameserver by
nameserver /etc/NetworkManager/dispatcher.d/99-origin-dns.sh
options ndots:5


Expected results:
step2 should success to resolve the router pod ip
step2 should contain the internal skydns ip
[root@qe-kayang-auto-master-1 ~]# oc get service -n default
NAME              CLUSTER-IP       EXTERNAL-IP   PORT(S)                   AGE
docker-registry   172.30.199.161   <none>        5000/TCP                  1d
kubernetes        172.30.0.1       <none>        443/TCP,53/UDP,53/TCP     1d
router            172.30.85.77     <none>        80/TCP,443/TCP,1936/TCP   1d

Additional info:

Comment 1 Wang Haoran 2016-06-14 03:30:41 UTC
change components to k8s ,as skydns is part of k8s, and update the priority to high , this bug block all the service that need to resolve through the service name and pod name. like : mongodb cluster ,and mysql cluster , psql cluster will failed startup .

Comment 2 Wang Haoran 2016-06-14 06:39:45 UTC
will close this , seems the resolve logic change to :
container->node ip -> dnsmasq -> kubernetes service ip

also as docs said , pod dnsname have a format like 1-2-3-4.default.pod.cluster.local


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