redhat-cop / openshift-applier

Used to apply OpenShift objects to an OpenShift Cluster
Apache License 2.0
102 stars 62 forks source link

Dependency on 8.8.8.8 #27

Closed sherl0cks closed 6 years ago

sherl0cks commented 6 years ago

This is a copy of https://github.com/rht-labs/labs-ci-cd/issues/196.

@bit4man

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 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.

oybed commented 6 years ago

The openshift-applier isn't involved with this aspect. This is strictly just calling oc process and oc create. Any issues related to this is beyond the openshift-appliers area of responsibility and is on the hosting systems configuration or operational environment.

Closing out this ticket as not-applicable.