openshift-ansible: Could not resolve host: github.com; Unknown error

Description

Using Origin BYO playbook, I am getting this issue when trying to start a new build that clones a repo:

Cloning "https://github.com/sozercan/nodejs-ex.git" ...
--
  | error: build error: fatal: unable to access 'https://github.com/sozercan/nodejs-ex.git/': Could not resolve host: github.com; Unknown error

Looks like same issue as this: https://github.com/openshift/origin/issues/10139

Version

Please put the following version information in the code block indicated below.

ansible 2.3.1.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/sozercan/openshift-ansible/library/']
  python version = 2.7.5 (default, Nov  6 2016, 00:28:07) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)]

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 17 (1 by maintainers)

Most upvoted comments

Any updates on this? I have the exact same issue on an oc cluster up on CentOS 7

@felipecruz91 @narasimhamurthyk3 I have found a fix (working on CentOS, should also work on ubuntu)

Shutdown the cluster with: oc cluster down Edit the file: openshift.local.clusterup/node/node-config.yml and set dnsIP: "" to 8.8.8.8 Edit the file openshift.local.clusterup/kubedns/resolv.conf and add

nameserver 8.8.8.8
nameserver 8.8.4.4

Also make sure you have the DNS options inside the docker config file

Edit /etc/docker/daemon.json and add "dns": ["8.8.8.8", "8.8.4.4"]

Then start your cluster with oc cluster up and now it should work fine.

@felipecruz91 @narasimhamurthyk3 I have found a fix (working on CentOS, should also work on ubuntu)

Shutdown the cluster with: oc cluster down Edit the file: openshift.local.clusterup/node/node-config.yml and set dnsIP: "" to 8.8.8.8 Edit the file openshift.local.clusterup/kubedns/resolv.conf and add

nameserver 8.8.8.8
nameserver 8.8.4.4

Also make sure you have the DNS options inside the docker config file

Edit /etc/docker/daemon.json and add "dns": ["8.8.8.8", "8.8.4.4"]

Then start your cluster with oc cluster up and now it should work fine.

It worked for me! Thanks! 🙌