Bug 1667270 - openshift-ansible fails on openstack without floating IPs
Summary: openshift-ansible fails on openstack without floating IPs
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.11.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 3.11.z
Assignee: Tzu-Mainn Chen
QA Contact: Weihua Meng
: 1671342 (view as bug list)
Depends On:
Blocks: 1676614 1676617
TreeView+ depends on / blocked
Reported: 2019-01-17 21:59 UTC by Aleksandar Kostadinov
Modified: 2019-10-22 11:54 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
A type error in the OpenStack code prevented installation on nodes without floating IPs. That error has been corrected.
Clone Of:
: 1676614 1676617 (view as bug list)
Last Closed: 2019-02-20 14:11:02 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:0326 0 None None None 2019-02-20 14:11:07 UTC

Description Aleksandar Kostadinov 2019-01-17 21:59:53 UTC
Description of problem:
Trying to install on OpenStack on machines without floating IPs fails.

Steps to Reproduce:
1. create OpenStack machines without floating IPs
2. setup inventory file
3. run openshift-ansible

Actual results:

> fatal: [vm-10-0-76-105.example.com]: FAILED! => {"changed": false, "module_stderr": "KeyError('ansible_os_family',)\nTraceback (most recent call last):\n  File \"/tmp/ansible_3Qqndl/ansible_module_openshift_facts.py\", line 1300, in <module>\n    main()\n  File \"/tmp/ansible_3Qqndl/ansible_module_openshift_facts.py\", line 1287, in main\n    additive_facts_to_overwrite)\n  File \"/tmp/ansible_3Qqndl/ansible_module_openshift_facts.py\", line 1039, in __init__\n    additive_facts_to_overwrite)\n  File \"/tmp/ansible_3Qqndl/ansible_module_openshift_facts.py\", line 1061, in generate_facts\n    provider_facts = self.init_provider_facts()\n  File \"/tmp/ansible_3Qqndl/ansible_module_openshift_facts.py\", line 1194, in init_provider_facts\n    provider_info.get('metadata')\n  File \"/tmp/ansible_3Qqndl/ansible_module_openshift_facts.py\", line 345, in normalize_provider_facts\n    facts = normalize_openstack_facts(metadata, facts)\n  File \"/tmp/ansible_3Qqndl/ansible_module_openshift_facts.py\", line 310, in normalize_openstack_facts\n    if socket.gethostbyname(metadata['ec2_compat'][h_var]) == metadata['ec2_compat'][ip_var].split(',')[0]:\nAttributeError: 'list' object has no attribute 'split'\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 1}

Expected results:
Installation succeed. 

Additional info:

Analysis shows that installer always expects some value for floating IP to run `split` over it but there is no such value for machines without floating IPs.

The reason for lack of floating IP can be that OpenStack is setup with public routed networks to begin with (e.g. provider network). Or user wants to install without direct internet access to nodes.

Comment 2 Vadim Rutkovsky 2019-01-18 13:40:35 UTC
Should be fixed in  https://github.com/openshift/openshift-ansible/pull/10974
Fix is available in openshift-ansible-3.11.70-1

Comment 3 Aleksandar Kostadinov 2019-01-19 15:56:38 UTC
Installed this successfully by the pointers you gave me yesterday, thank you! I believe issue is fixed in code.

Do we know when a new official build will be done?

P.S. wrote a short blog post [1] about installing with unreleased openshift-ansible source code. Any corrections to my instructions are welcome.

[1] https://rboci.blogspot.com/2019/01/install-okd-311-with-source-version-of.html

Comment 4 Aleksandar Kostadinov 2019-01-21 21:19:34 UTC
3.10 and 3.9 are also affected. I had some difficulties testing earlier version but will do later. Shall I create separate issues?

Comment 5 Tzu-Mainn Chen 2019-01-21 21:30:36 UTC
The 3.9 version of this fix is already merged. The 3.10 version is waiting on PR tests to pass: https://github.com/openshift/openshift-ansible/pull/11013

Comment 6 Tzu-Mainn Chen 2019-01-22 01:43:08 UTC
3.10 version merged now.

Comment 16 errata-xmlrpc 2019-02-20 14:11:02 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Comment 17 Eric Duen 2019-10-22 11:54:21 UTC
*** Bug 1671342 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.