rht-labs / labs-ci-cd

👻UNMAINTAINED - A collection of Red Hat Open Innovation Labs CI/CD components
Apache License 2.0
101 stars 70 forks source link

Dependency on 8.8.8.8 #196

Closed bit4man closed 6 years ago

bit4man commented 6 years ago

When using the run.sh as described, the master node must be resolvable on 8.8.8.8 - if the host name used is only locally resolvable by a non-public DNS zone, the provisioning will fail.

sherl0cks commented 6 years ago

Where you logged in with oc first? Run.sh is just a couple levels of redirection to oc which should be doing all the network connectivity stuff to the cluster

bit4man commented 6 years ago

To the instance that I want to install on. Not sure what the point of the 8.8.8.8 is,but you get a failure where it's trying to resolve the API entry (master) using 8.8.8.8:

TASK [openshift-applier/roles/openshift-applier : Create OpenShift objects based on template with params for 'projectrequest : ci-cd'] ** fatal: [projects-and-policies]: FAILED! => {"changed": true, "cmd": "oc process --local -f https://raw.githubusercontent.com/redhat-cop/cluster-lifecycle/v3.9.0/files/projectrequest/template.yml --param-file=/tmp/src/params/projectrequests/ci-cd | oc create -f - ", "delta": "0:00:01.311313", "end": "2018-06-20 00:51:09.078042", "failed_when_result": true, "msg": "non-zero return code", "rc": 1, "start": "2018-06-20 00:51:07.766729", "stderr": "Unable to connect to the server: dial tcp: lookup ose39-master1.rhdemo.net on 8.8.8.8:53: no such host", "stderr_lines": ["Unable to connect to the server: dial tcp: lookup ose39-master1.rhdemo.net on 8.8.8.8:53: no such host"], "stdout": "", "stdout_lines": []}

The above address resolves on the localhost provided :53 server. It's NOT a public server.

bit4man commented 6 years ago

Note, the local /etc/resolv.conf where the install is done from contains one line: nameserver 127.0.0.1

bit4man commented 6 years ago

A small correction - while the DNS server that responds is a local DNS server, this dnsmasq instance is only listening to a virtual network address - localhost is not one of them. So a direct resolve only works when run from within the VM. The hosts are all in the /etc/hosts file which dnsmasq translates into dns entries - but from the host itself, that isn't happening.

Not sure where the 8.8.8.8 comes from - not using that here. But I can get past this issue by ensuring I run "run.sh" from a host that can use dns to resolve the master address.

sherl0cks commented 6 years ago

huh - so this is not an issue with labs ci/cd but an issue with one of our dependencies, https://github.com/redhat-cop/openshift-applier. I have opened an issue there and closed this one. https://github.com/redhat-cop/openshift-applier/issues/27

oybed commented 6 years ago

This is not an openshift-applier issue as it's just a wrapper for oc process, oc create and oc apply.

oybed commented 6 years ago

Some more info/suggestions here: https://github.com/redhat-cop/openshift-applier/issues/27#issuecomment-404034177