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

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

Thanks Jason, 

Not sure what "public hostname" you are referring to since this setup is completely isolated / self-contained: 

I have a set up a  DNS server on the same VPC subnet. It acts as zone master for my internal domain (in my case "nuage-vpc253.internal") + forwarder. This is a fourth host, in addition to my (intended...) 1x master + 2 x nodes.  

The entries in my "nuage-vpc253.internal" zone  for my nodes are the VPC / subnet-local IP addresses.  

(yes, these are DHCP addresses from the VPC subnet. And yes, I know that's wrong .. :)) .  However, they seem to persist throughout the instance lifetime and this setup is simply intended as a test environment, isolated from any outside use) 

I verified that both "hostname -s" and "hostname -f" return the correct entries, and both resolve nicely to internal IP addresses from that DNS server. This is  from any other host in the VCP  (All hosts in my VPC have their "/etc/resolv.conf" pointing to the internal DNS server instead of AWS provided DNS  -- hence all internal names resolve correctly) 

LMK if there is any additional information you need.

One last question: 

Is  there any issue with trying to deploy that from one of the nodes in the setup itself (i.e. "master1" node) ? Should I use another "jumpstart" host -- i.e. a fourth host, in addition to my 1 x master + 2 x nodes  ? 

Thanks for trying to help,



On Mon, May 4, 2015 at 6:33 PM, Jason DeTiberus <jdetiber redhat com> wrote:
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

# host group for masters

# host group for nodes

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:


failed: [master1.nuage-vpc253.internal] => {"failed": true, "parsed": false}
Traceback (most recent call last):
line 4981, in <module>
line 461, in main
   openshift_facts = OpenShiftFacts(role, fact_file, local_facts)
line 36, in __init__
   self.facts = self.generate_facts(local_facts)
line 44, in generate_facts
   facts = self.apply_provider_facts(defaults, provider_facts, roles)
line 142, in apply_provider_facts
   facts['common'][h_var] =
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


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:

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]