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

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



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

All three nodes have valid entries in the DNS. 

For all of them the output of "hostname"  == output of "hostname -f" == the values above. 

Root ssh keys are propagated between all 3 hosts. 

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:


<master1.nuage-vpc253.internal> action="" protocol=tcp port=7001 name=former etcd peer port
<master1.nuage-vpc253.internal> ConnectTimeout=10 PasswordAuthentication=no KbdInteractiveAuthentication=no ControlPath=/root/.ansible/cp/ansible-ssh-%h-%p-%r PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey ControlMaster=auto Port=22 ControlPersist=60s
<master1.nuage-vpc253.internal>
<master1.nuage-vpc253.internal> ConnectTimeout=10 PasswordAuthentication=no 'LANG=C LC_CTYPE=C /usr/bin/python /root/.ansible/tmp/ansible-tmp-1430732251.5-44689583707976/os_firewall_manage_iptables; rm -rf /root/.ansible/tmp/ansible-tmp-1430732251.5-44689583707976/ >/dev/null 2>&1' KbdInteractiveAuthentication=no ControlPath=/root/.ansible/cp/ansible-ssh-%h-%p-%r PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey ControlMaster=auto Port=22 ControlPersist=60s
ok: [master1.nuage-vpc253.internal] => (item={'port': '7001/tcp', 'service': 'former etcd peer port'}) => {"changed": false, "item": {"port": "7001/tcp", "service": "former etcd peer port"}, "output": []}

TASK: [openshift_facts | Gather OpenShift facts] ******************************
<master1.nuage-vpc253.internal>
<master1.nuage-vpc253.internal>
<master1.nuage-vpc253.internal> ConnectTimeout=10 PasswordAuthentication=no KbdInteractiveAuthentication=no ControlPath=/root/.ansible/cp/ansible-ssh-%h-%p-%r PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey ControlMaster=auto Port=22 ControlPersist=60s
<master1.nuage-vpc253.internal>
<master1.nuage-vpc253.internal> ConnectTimeout=10 PasswordAuthentication=no 'LANG=C LC_CTYPE=C /usr/bin/python /root/.ansible/tmp/ansible-tmp-1430732251.8-74072282264480/openshift_facts; rm -rf /root/.ansible/tmp/ansible-tmp-1430732251.8-74072282264480/ >/dev/null 2>&1' KbdInteractiveAuthentication=no ControlPath=/root/.ansible/cp/ansible-ssh-%h-%p-%r PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey ControlMaster=auto Port=22 ControlPersist=60s
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 buffer
OpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 56: Applying options for *
debug1: auto-mux: Trying existing master
debug2: fd 3 setting O_NONBLOCK
debug2: mux_client_hello_exchange: master version 4
debug3: mux_client_forwards: request forwardings: 0 local, 0 remote
debug3: mux_client_request_session: entering
debug3: mux_client_request_alive: entering
debug3: mux_client_request_alive: done pid = 2084
debug3: mux_client_request_session: session request sent
debug1: mux_client_request_session: master session id: 2
debug3: mux_client_read_packet: read header failed: Broken pipe
debug2: Received exit status from master 0
Shared connection to master1.nuage-vpc253.internal closed.


FATAL: all hosts have already failed -- aborting

PLAY RECAP ********************************************************************
           to retry, use: --limit @/root/config.retry

localhost                  : ok=1    changed=0    unreachable=0    failed=0
master1.nuage-vpc253.internal : ok=14   changed=4    unreachable=0    failed=1


####

Sorry if GMail garbles the formatting  -- A more detail output with proper formatting is available here: https://gist.github.com/FlorianOtel/e48fbb0b7b017d05c7bb


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

[root master1 src]# hostname
master1.nuage-vpc253.internal
[root master1 src]#
[root master1 src]# hostname -f
master1.nuage-vpc253.internal 

As I mentioned, it has a valid DNS entry for the FQDN 

I can provide any further details if needed. 


Any ideas ? 

TIA for any help,

Florian





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