[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: OpenShift-v3 Beta3 -- BYO ansible playbook failure (hostname lookup ?)



On 04/05/15 11:54 +0200, Florian Daniel Otel wrote:
Hello all,

I'm trying to set up an OpenShift-v3 Beta3 environment consisting of 3
hosts -- 1 master + 2nodes, as follows (trimmed output of
"/etc/ansible/hosts"):

# host group for masters
[masters]
master1.nuage-vpc253.internal


# host group for nodes
[nodes]
node1.nuage-vpc253.internal
node2.nuage-vpc253.internal

<snip>
My problem: When on "master1" node I try to run the BYO Ansible playbook
(as per this GitHub repo -- https://github.com/detiber/openshift-ansible),
as follows:

ansible-playbook -vvvv ./openshift-ansible/playbooks/byo/config.yml

The playbook results in an error:

<snip>

failed: [master1.nuage-vpc253.internal] => {"failed": true, "parsed": false}
Traceback (most recent call last):
 File
"/root/.ansible/tmp/ansible-tmp-1430732251.8-74072282264480/openshift_facts",
line 4981, in <module>
   main()
 File
"/root/.ansible/tmp/ansible-tmp-1430732251.8-74072282264480/openshift_facts",
line 461, in main
   openshift_facts = OpenShiftFacts(role, fact_file, local_facts)
 File
"/root/.ansible/tmp/ansible-tmp-1430732251.8-74072282264480/openshift_facts",
line 36, in __init__
   self.facts = self.generate_facts(local_facts)
 File
"/root/.ansible/tmp/ansible-tmp-1430732251.8-74072282264480/openshift_facts",
line 44, in generate_facts
   facts = self.apply_provider_facts(defaults, provider_facts, roles)
 File
"/root/.ansible/tmp/ansible-tmp-1430732251.8-74072282264480/openshift_facts",
line 142, in apply_provider_facts
   facts['common'][h_var] =
self.choose_hostname([provider_facts['network'].get(h_var)],
facts['common'][ip_var])
 File
"/root/.ansible/tmp/ansible-tmp-1430732251.8-74072282264480/openshift_facts",
line 164, in choose_hostname
   ips = [ i for i in hostnames if i is not None and
re.match(r'\A\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\Z', i) ]
 File "/usr/lib64/python2.7/re.py", line 137, in match
   return _compile(pattern, flags).match(string)
TypeError: expected string or buffera

<snip>

Now, if I'm reading that correctly, there's due to an error parsing the
hostname (?). Again, here's the output on said host.

You are correct that it is an error in parsing a hostname, though the hostname I believe it is trying to parse is the AWS public hostname from the metadata (I'm assuming the VPC you are using is configured to not issue public hostnames).

I started working on a fix for this here:
https://github.com/openshift/openshift-ansible/pull/199

I'll pick back up on it this afternoon (as time permits) and verify that it does what it should do with different combinations of VPC configurations for hostnames and ip addresses.

One other thing to note is that if you are going to access your environment from outside of the VPC, then you will also need to provide the openshift_public_hostname setting for the hosts (as described here: https://github.com/openshift/training/blob/master/beta-3-setup.md#generic-cloud-install) especially if using the generated self-signed certificates.

--
Jason DeTiberus


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]