Description of problem: I'm installing OpenShift 3.11 on top of OpenStack 13(Queens). There is a Bug[0] for the version 3.9(and also 3.11) from OpenShift that breaks the installation process from OpenShift when running the prerequisites.yml playbook. The error from previous Bug was that the return from a test curl command return two IPs from a node, but on my environment returns just one of them and the split function committed here[1] gives an error because there is nothing to split[2](just 1 value, nothing to split). This was released into this ERRATA[3]. Error: fatal: [node1]: FAILED! => {"changed": false, "module_stderr": "Shared connection to node1 closed.\r\n", "module_stdout": "KeyError('ansible_os_family',)\r\nTraceback (most recent call last):\r\n File \"/tmp/an sible_g059wU/ansible_module_openshift_facts.py\", line 1300, in <module>\r\n main()\r\n File \"/tmp/ansible_g059wU/ansible_module_openshift_facts.py\", line 1287, in main\r\n additive_facts_to_overwrite)\ r\n File \"/tmp/ansible_g059wU/ansible_module_openshift_facts.py\", line 1039, in __init__\r\n additive_facts_to_overwrite)\r\n File \"/tmp/ansible_g059wU/ansible_module_openshift_facts.py\", line 1061, in generate_facts\r\n provider_facts = self.init_provider_facts()\r\n File \"/tmp/ansible_g059wU/ansible_module_openshift_facts.py\", line 1194, in init_provider_facts\r\n provider_info.get('metadata')\r\n File \"/tmp/ansible_g059wU/ansible_module_openshift_facts.py\", line 345, in normalize_provider_facts\r\n facts = normalize_openstack_facts(metadata, facts)\r\n File \"/tmp/ansible_g059wU/ansible_module_open shift_facts.py\", line 315, in normalize_openstack_facts\r\n facts['network'][f_var] = metadata['ec2_compat'][ip_var].split(',')[0]\r\nAttributeError: 'list' object has no attribute 'split'\r\n", "msg": "MODU LE FAILURE", "rc": 1} 0 - https://bugzilla.redhat.com/show_bug.cgi?id=1648832 1 - https://github.com/openshift/openshift-ansible/pull/10670/commits/dfb95684ef5f636f0595e311e0c5169ee5c1ec92 [2] - Command: curl http://169.254.169.254/latest/meta-data/local-ipv4 [3] - https://access.redhat.com/errata/RHBA-2019:0024 Version-Release number of selected component (if applicable): - OpenStack 13 - OpenShift 3.11 - ansible 2.6.12 - For more, e.g. sosreports I can upload here too. How reproducible: Steps to Reproduce: 1. Install openshift-ansible package on a bastion on top of OpenStack 2. Run prerequisites.yml playbook 3. It stops with the error above on 'Gathering Cluster Facts' Actual results: fatal: [node1]: FAILED! => {"changed": false, "module_stderr": "Shared connection to node1 closed.\r\n", "module_stdout": "KeyError('ansible_os_family',)\r\nTraceback (most recent call last):\r\n File \"/tmp/an sible_g059wU/ansible_module_openshift_facts.py\", line 1300, in <module>\r\n main()\r\n File \"/tmp/ansible_g059wU/ansible_module_openshift_facts.py\", line 1287, in main\r\n additive_facts_to_overwrite)\ r\n File \"/tmp/ansible_g059wU/ansible_module_openshift_facts.py\", line 1039, in __init__\r\n additive_facts_to_overwrite)\r\n File \"/tmp/ansible_g059wU/ansible_module_openshift_facts.py\", line 1061, in generate_facts\r\n provider_facts = self.init_provider_facts()\r\n File \"/tmp/ansible_g059wU/ansible_module_openshift_facts.py\", line 1194, in init_provider_facts\r\n provider_info.get('metadata')\r\n File \"/tmp/ansible_g059wU/ansible_module_openshift_facts.py\", line 345, in normalize_provider_facts\r\n facts = normalize_openstack_facts(metadata, facts)\r\n File \"/tmp/ansible_g059wU/ansible_module_open shift_facts.py\", line 315, in normalize_openstack_facts\r\n facts['network'][f_var] = metadata['ec2_compat'][ip_var].split(',')[0]\r\nAttributeError: 'list' object has no attribute 'split'\r\n", "msg": "MODU LE FAILURE", "rc": 1} Expected results: - To run without errors Additional info:
Workaround til now: - Open /usr/share/ansible/openshift-ansible/roles/openshift_facts/library/openshift_facts.py - Go for the line 340. - Undo the changes made on this PR[0]. Pay attention to the identation, python is really 'sensible' with that. - Run the playbook again [0] - https://github.com/openshift/openshift-ansible/pull/10670/commits/dfb95684ef5f636f0595e311e0c5169ee5c1ec92
Hi Gabriel! Does your build contain this fix for the issue? https://github.com/openshift/openshift-ansible/pull/10974 I believe it solved similar issues
Hi Tzu-Mainn it looks similar to https://github.com/openshift/openshift-ansible/pull/10670/commits/dfb95684ef5f636f0595e311e0c5169ee5c1ec92 when I revert the changes. Could you explain to me the difference between both? Thanks! All the best! Gabriel
Sure; the cases I've seen of this so far are: a) a single comma separated string b) an empty list The initial PR handled a), but made b) a fail condition; the subsequent PR handles b).
Seem like a dup with BZ#1667270
Duplicate, closing *** This bug has been marked as a duplicate of bug 1667270 ***