Description of problem: When trying to run /usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cluster/upgrades/v3_5/upgrade.yml it fail with the following error message TASK [Check for invalid namespaces and SDN errors] ***************************** fatal: [osemaster1.somedomain.org]: FAILED! => { "changed": false, "failed": true, "module_stderr": "Shared connection to osemaster1.somedomain.org closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n File \"/tmp/ansible_7h8xiP/ansible_module_oc_objectvalidator.py\", line 1420, in <module>\r\n main()\r\n File \"/tmp/ansible_7h8xiP/ansible_module_oc_objectvalidator.py\", line 1413, in main\r\n rval = OCObjectValidator.run_ansible(module.params)\r\n File \"/tmp/ansible_7h8xiP/ansible_module_oc_objectvalidator.py\", line 1375, in run_ansible\r\n success, rval, invalid = objectvalidator.get_invalid(resource, invalid_filter)\r\n File \"/tmp/ansible_7h8xiP/ansible_module_oc_objectvalidator.py\", line 1324, in get_invalid\r\n rval = self._get(kind)\r\n File \"/tmp/ansible_7h8xiP/ansible_module_oc_objectvalidator.py\", line 853, in _get\r\n rval = self.openshift_cmd(cmd, output=True)\r\n File \"/tmp/ansible_7h8xiP/ansible_module_oc_objectvalidator.py\", line 979, in openshift_cmd\r\n returncode, stdout, stderr = self._run(cmds, input_data)\r\n File \"/tmp/ansible_7h8xiP/ansible_module_oc_objectvalidator.py\", line 954, in _run\r\n return proc.returncode, stdout.decode(), stderr.decode()\r\nUnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 13263: ordinal not in range(128)\r\n" } Version-Release number of selected component (if applicable): atomic-openshift-utils-3.5.53-1.git.0.8ade9f2.el7.noarch ansible-2.2.1.0-2.el7.noarch How reproducible: If I run "ansible-playbook -i /etc/ansible/hosts /usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cluster/upgrades/v3_5/upgrade.yml" it fails every time. Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Do you have unicode characters in your inventory file? This can be caused by unicode characters and in some cases the unicode characters are unintentionally added while using some editors. An example for checking for unicode characters: $ grep --color='auto' -P -n "[\x80-\xFF]" <inventory_file>
If unicode characters are required, we can backport this fix in master: https://github.com/openshift/openshift-ansible/pull/3808
No there are no unicode characters that I can find. Attached is a copy of my inventory file
Created attachment 1273614 [details] inventory file
From: Traceback (most recent call last): File \"/tmp/ansible_7h8xiP/ansible_module_oc_objectvalidator.py\", line 1420, in <module> main() File \"/tmp/ansible_7h8xiP/ansible_module_oc_objectvalidator.py\", line 1413, in main rval = OCObjectValidator.run_ansible(module.params) File \"/tmp/ansible_7h8xiP/ansible_module_oc_objectvalidator.py\", line 1375, in run_ansible success, rval, invalid = objectvalidator.get_invalid(resource, invalid_filter) File \"/tmp/ansible_7h8xiP/ansible_module_oc_objectvalidator.py\", line 1324, in get_invalid rval = self._get(kind) File \"/tmp/ansible_7h8xiP/ansible_module_oc_objectvalidator.py\", line 853, in _get rval = self.openshift_cmd(cmd, output=True) File \"/tmp/ansible_7h8xiP/ansible_module_oc_objectvalidator.py\", line 979, in openshift_cmd returncode, stdout, stderr = self._run(cmds, input_data) File \"/tmp/ansible_7h8xiP/ansible_module_oc_objectvalidator.py\", line 954, in _run return proc.returncode, stdout.decode(), stderr.decode() UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 13263: ordinal not in range(128) The `decode` calls in `return proc.returncode, stdout.decode(), stderr.decode()` need to be updated to either work correctly with unicode or (worst case) throw away the data.
Proposed: https://github.com/openshift/openshift-ansible/pull/4098
Version: atomic-openshift-utils-3.5.68-1.git.0.1d3158b.el7.noarch Steps: 1. install ocp3.4 # openshift version openshift v3.4.1.18 kubernetes v1.4.0+776c994 etcd 3.1.0-rc.0 2. new-project test with non ascii character in description # oc describe project test Name: test Namespace: <none> Created: About an hour ago Labels: <none> Annotations: openshift.io/description=中文 openshift.io/display-name= openshift.io/requester=system:admin openshift.io/sa.scc.mcs=s0:c8,c7 openshift.io/sa.scc.supplemental-groups=1000070000/10000 openshift.io/sa.scc.uid-range=1000070000/10000 Display Name: <none> Description: 中文 Status: Active Node Selector: <none> Quota: <none> Resource limits: <none> 3. run upgrade playbook Result: Upgrade succeed. # openshift version openshift v3.5.5.8 kubernetes v1.5.2+43a9be4 etcd 3.1.0 Change bug's status to verify.
*** Bug 1446471 has been marked as a duplicate of this bug. ***
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. https://access.redhat.com/errata/RHSA-2017:1244