fixing registry & dns resolution conflict in 3.11 #166
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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