Bug 1541625 - installation failed when enable proxy and openshift_portal_net
Summary: installation failed when enable proxy and openshift_portal_net
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.9.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ---
: 3.9.0
Assignee: Fabian von Feilitzsch
QA Contact: Johnny Liu
URL:
Whiteboard:
Depends On:
Blocks: 1511870
TreeView+ depends on / blocked
 
Reported: 2018-02-03 14:20 UTC by Johnny Liu
Modified: 2018-03-16 16:56 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2018-03-16 16:56:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Johnny Liu 2018-02-03 14:20:32 UTC
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

Comment 1 Fabian von Feilitzsch 2018-02-07 19:07:50 UTC
https://github.com/openshift/openshift-ansible/pull/7055

Comment 2 openshift-github-bot 2018-02-08 21:54:20 UTC
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

Comment 3 Scott Dodson 2018-02-12 18:50:33 UTC
Fix is in openshift-ansible-3.9.0-0.42.0

Comment 4 Johnny Liu 2018-02-13 08:21:23 UTC
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


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