Description of problem: Run a cluster install behind proxy, and set openshift_portal_net in inventory host file, "Set fact of no_proxy_internal_hostnames" task failed. Version-Release number of the following components: openshift-ansible-3.9.0-0.36.0.git.0.da68f13.el7.noarch How reproducible: Always Steps to Reproduce: 1. Setting the following options in inventory file. openshift_http_proxy=http://file.rdu.redhat.com:3128 openshift_https_proxy=http://file.rdu.redhat.com:3128 openshift_no_proxy="169.254.169.254,.lab.sjc.redhat.com" openshift_portal_net=172.31.0.0/16 2. Trigger a cluster install without direct internet access. 3. Actual results: TASK [Set fact of no_proxy_internal_hostnames] ********************************* Saturday 03 February 2018 10:53:51 +0000 (0:00:08.839) 0:00:23.866 ***** An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: decoding Unicode is not supported fatal: [aos-129.lab.sjc.redhat.com]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/tmp/ansible_J8xt_Z/ansible_module_openshift_facts.py\", line 1687, in <module>\n main()\n File \"/tmp/ansible_J8xt_Z/ansible_module_openshift_facts.py\", line 1674, in main\n additive_facts_to_overwrite)\n File \"/tmp/ansible_J8xt_Z/ansible_module_openshift_facts.py\", line 1339, in __init__\n additive_facts_to_overwrite)\n File \"/tmp/ansible_J8xt_Z/ansible_module_openshift_facts.py\", line 1384, in generate_facts\n facts = set_proxy_facts(facts)\n File \"/tmp/ansible_J8xt_Z/ansible_module_openshift_facts.py\", line 1151, in set_proxy_facts\n kube_svc_ip = str(ipaddress.ip_network(u(common['portal_net']))[1])\n File \"/tmp/ansible_J8xt_Z/ansible_modlib.zip/ansible/module_utils/six/__init__.py\", line 650, in u\nTypeError: decoding Unicode is not supported\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 1} An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: decoding Unicode is not supported fatal: [aos-136.lab.sjc.redhat.com]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/tmp/ansible_JVs7hJ/ansible_module_openshift_facts.py\", line 1687, in <module>\n main()\n File \"/tmp/ansible_JVs7hJ/ansible_module_openshift_facts.py\", line 1674, in main\n additive_facts_to_overwrite)\n File \"/tmp/ansible_JVs7hJ/ansible_module_openshift_facts.py\", line 1339, in __init__\n additive_facts_to_overwrite)\n File \"/tmp/ansible_JVs7hJ/ansible_module_openshift_facts.py\", line 1384, in generate_facts\n facts = set_proxy_facts(facts)\n File \"/tmp/ansible_JVs7hJ/ansible_module_openshift_facts.py\", line 1151, in set_proxy_facts\n kube_svc_ip = str(ipaddress.ip_network(u(common['portal_net']))[1])\n File \"/tmp/ansible_JVs7hJ/ansible_modlib.zip/ansible/module_utils/six/__init__.py\", line 650, in u\nTypeError: decoding Unicode is not supported\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 1} Expected results: installation is completed successfully. Additional info: Seem like this is introduced by https://github.com/openshift/openshift-ansible/pull/6215
https://github.com/openshift/openshift-ansible/pull/7055
Commits pushed to master at https://github.com/openshift/openshift-ansible https://github.com/openshift/openshift-ansible/commit/793b1d11f6e09e3ebfa4cb998cadddd88a52b006 Bug 1541625- properly cast provided ip address to unicode https://github.com/openshift/openshift-ansible/commit/f0f1188f622b7060112ebb59056da3d249b9f513 Merge pull request #7055 from fabianvf/bz1541625 Bug 1541625- properly cast provided ip address to unicode
Fix is in openshift-ansible-3.9.0-0.42.0
Verified this bug with openshift-ansible-3.9.0-0.42.0.git.0.1a9a61b.el7.noarch, and PASS. openshift_portal_net setting take effect, installation is finished, and sti build succeed behind proxy. # oc get svc NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE docker-registry ClusterIP 172.31.173.31 <none> 5000/TCP 20m kubernetes ClusterIP 172.31.0.1 <none> 443/TCP,53/UDP,53/TCP 30m registry-console ClusterIP 172.31.254.65 <none> 9000/TCP 19m router ClusterIP 172.31.5.68 <none> 80/TCP,443/TCP,1936/TCP 20m