Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing registry & dns resolution conflict in 3.11 #166

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

srinivasraja54
Copy link

@srinivasraja54 srinivasraja54 commented Aug 9, 2019

Either origin registry is not resolved or all external domains like github.com are not resolved by openshift resources like pods.
/etc/resolv.conf is updated automatically by origin with some search entries, which makes pods doesnt able to resolve the external domain names like github,google etc. which often causes the deployment failures.

To fix that we need to add nameserver IPaddress to /etc/resolv.conf and comment search entries and make it readonly. so Origin cannot update it during restart. This makes Origin not able to resolve docker-registry.default.svc and deployments will fail. So we need to add docker-registry.default.svc and its cluster IP to /etc/hosts.

after the edits,

/etc/resolv.conf should look like
[root@master ~]# cat /etc/resolv.conf
#nameserver updated by /etc/NetworkManager/dispatcher.d/99-origin-dns.sh
#Generated by NetworkManager
#search cluster.local 192.168.1.8.nip.io
nameserver 192.168.1.8

/etc/hosts should look like

[root@master ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.8 test01.osdemo.com master.192.168.1.8.nip.io console console.master.192.168.1.8.nip.io
172.30.202.99 docker-registry.default.svc

This way, pods can resolve both docker registry and external domains and deployments work after install

Either origin registry is not resolved or all external domains like github.com are not resolved by openshift resources like pods.
 /etc/resolv.conf is updated automatically by origin with some search entries, which makes pods doesnt able to resolve the external domain names like github,google etc. which often causes the deployment failures. 

To fix that we need to add nameserver IPaddress to /etc/resolv.conf and comment search entries and make it readonly. so Origin cannot update it during restart. This makes Origin not able to resolve docker-registry.default.svc and deployments will fail. So we need to add docker-registry.default.svc and its cluster IP to /etc/hosts.

after the edits, 

/etc/resolv.conf should look like
[root@master ~]# cat /etc/resolv.conf
# nameserver updated by /etc/NetworkManager/dispatcher.d/99-origin-dns.sh
# Generated by NetworkManager
#search cluster.local 192.168.1.8.nip.io
nameserver 192.168.1.8

/etc/hosts should look like

[root@master ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.8 test01.osdemo.com master.192.168.1.8.nip.io console console.master.192.168.1.8.nip.io
172.30.202.99 docker-registry.default.svc


This way, pods can resolve both docker registry and external domains and deployments work after install
@srinivasraja54 srinivasraja54 changed the title fixing registry & dns resolution conflict in 3.9 fixing registry & dns resolution conflict in 3.11 Aug 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant