Bug 1678472

Summary: Cluster DNS regression: openshift.default.svc does not resolve
Product: OpenShift Container Platform Reporter: Dan Mace <dmace>
Component: NetworkingAssignee: Dan Mace <dmace>
Networking sub component: router QA Contact: Hongan Li <hongli>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: aos-bugs
Version: 4.1.0   
Target Milestone: ---   
Target Release: 4.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: openshift.default.svc service does not exists, so DNS fails to resolve the service. Consequence: Breaks backward compatibility where the user expects to resolve openshift.default.svc Fix: Create external service openshift.default.svc that resolves to kubernetes.default.svc Result: openshift.default.svc service is resolved by DNS and it preserves backward compatibility.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-04 10:44:14 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 Dan Mace 2019-02-18 20:57:34 UTC
Description of problem:

The `openshift.default.svc` name should resolve through cluster DNS as a CNAME `kubernetes.default.svc` to maintain backwards compatibility with OpenShift 3.x.


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


How reproducible:

From a pod using defaults for DNS policy,

  $ nslookup openshift.default.svc


Actual results:

NXDOMAIN

Expected results:

Server:         172.30.0.10
Address:        172.30.0.10#53

openshift.default.svc.cluster.local     canonical name = kubernetes.default.svc.

Additional info:

This could be implemented with an ExternalName service in the `default` namespace pointing at `kubernetes.default.svc`.

Comment 2 Ravi Sankar 2019-03-14 05:08:58 UTC
Fixed by https://github.com/openshift/cluster-dns-operator/pull/84

Comment 4 Hongan Li 2019-03-22 06:23:34 UTC
will verify with next nightly build which contains the fix.

Comment 5 Hongan Li 2019-03-25 01:00:33 UTC
verified with 4.0.0-0.nightly-2019-03-23-222829 and issue has been fixed.

$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.0.0-0.nightly-2019-03-23-222829   True        False         19m     Cluster version is 4.0.0-0.nightly-2019-03-23-222829

$ oc get svc -n default
NAME         TYPE           CLUSTER-IP   EXTERNAL-IP                            PORT(S)   AGE
kubernetes   ClusterIP      172.30.0.1   <none>                                 443/TCP   36m
openshift    ExternalName   <none>       kubernetes.default.svc.cluster.local   <none>    34m

$ oc exec centos-pod -- nslookup openshift.default.svc
Server:		172.30.0.10
Address:	172.30.0.10#53

openshift.default.svc.cluster.local	canonical name = kubernetes.default.svc.cluster.local.
Name:	kubernetes.default.svc.cluster.local
Address: 172.30.0.1

Comment 8 errata-xmlrpc 2019-06-04 10:44:14 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.

https://access.redhat.com/errata/RHBA-2019:0758