Description of problem: Currently ansible script always set node's dnsIP to IP of the 1st master. But in the following scenarios, such setting is not correct. e.g: 1. User already set openshift_master_embedded_dns=False, then dnsIP should be empty. 2. User have an external DNS, then dnsIP should be pointed to the external DNS. 3. User set up a multiple master env, when failover happened, the DNS service embedded in master service running on the 1st master will be transferred to the 2nd master, but dnsIP is still pointing to the IP of the 1st master, it is incorrect. So the best resolution, allow user to configure it in ansible hosts file, and it is better show such option in in inventory/byo/hosts.example, and give some instruction about it. Now we are releasing v3.0.1.0, seen from user's angle, this option will bring more convenience for user. Otherwise, user have to edit master(s)/node(s) config yaml file manually one by one after installation. Version-Release number of selected component (if applicable): https://github.com/openshift/openshift-ansible.git -b master How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Can't this just be set by setting openshift_ip on the host.
(In reply to Scott Dodson from comment #1) > Can't this just be set by setting openshift_ip on the host. Nevermind, this suggestion isn't valid.
https://github.com/openshift/openshift-ansible/pull/393
Available for testing here as well: https://ootest-leanhardt.rhcloud.com/
Manually merge PR#393 into master branch, re-test it, found #3 is fixed, but issue #1 and #2 is not fixed, so assign back.
Andrew, this falls in line with the HA work you are already doing. In addition, I think we should go ahead and just remove the ability to disable the embedded dns server.
This PR adds 'openshift_dns_ip' to inventory variables as a way to override node dnsIP. https://github.com/openshift/openshift-ansible/pull/1012
Re-test this bug with PR#1012, most of part are fixed, but still have some issue for pre 3.1 product. For 3.1: 1. When openshift_dns_ip is not set in ansible host file, no "dnsIP" is set in node-config.yaml, while in user's pod, it is using kubernetes service ip as the first nameserver. # grep dnsIP /etc/origin/node/node-config.yaml <empty> $ oc rsh simple-openshift-sinatra-sti-1-xy08p bash-4.2$ cat /etc/resolv.conf nameserver 172.30.0.1 nameserver 10.66.xx.xx search jialiu.svc.cluster.local svc.cluster.local cluster.local cluster.local. lab.eng.nay.redhat.com options ndots:5 2. When openshift_dns_ip is set in ansible host file (e.g: openshift_dns_ip=172.30.0.2), "dnsIP" is set in node-config.yaml, and in user's pod, it is using this user specified "dnsIP" as the first nameserver. # grep dnsIP /etc/origin/node/node-config.yaml dnsIP: 172.30.0.2 $ oc rsh docker-registry-1-12hh7 bash-4.2$ cat /etc/resolv.conf nameserver 172.30.0.2 nameserver 10.66.xx.xx search default.svc.cluster.local svc.cluster.local cluster.local cluster.local. lab.eng.nay.redhat.com options ndots:5 For pre 3.1 (E.g: 3.0.2 release version - openshift-3.0.2.0-0.git.38.7576bc5.el7ose.x86_64): 3. When openshift_dns_ip is not set in ansible host file, no "dnsIP" is set in node-config.yaml, while in user's pod, openshift did not use the first master ip as the first nameserver. # grep dnsIP /etc/openshift/node/node-config.yaml $ oc rsh docker-registry-1-q634f bash-4.2$ cat /etc/resolv.conf nameserver 10.66.xx.xx ---> the first master is not set as resolver, here the ip is node's DNS resolver. search default.svc.cluster.local svc.cluster.local cluster.local openstacklocal lab.eng.nay.redhat.com options ndots:5 Scenarios #3 will cause dns resolve failure, according to comments in PR#1012 - first master ip pre 3.1, its behavior is wrong.
About pacemaker installation check, installation is blocked by BZ#1288481
Verified this but with openshift-ansible-roles-3.0.20-1.git.0.3703f1b.el7aos.noarch, and PASS. scenarios #3, atomic-openshift-utils from puddle + 3.0.z install, PASS # grep dnsIP /etc/openshift/node/node-config.yaml dnsIP: 192.168.0.32 192.168.0.32 is the 1st master IP. $ oc rsh docker-registry-1-2gmqi bash-4.2$ cat /etc/resolv.conf nameserver 192.168.0.32 nameserver xx.xx.xx.xx search default.svc.cluster.local svc.cluster.local cluster.local openstacklocal options ndots:5 bash-4.2$ curl docker-registry.default.svc.cluster.local:5000 404 page not found
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-2015:2667