Actions
Bug #16838
closedTechnique with non ascii characters breaks migration from 5.0 to 6.0
Status:
Released
Priority:
N/A
Assignee:
Category:
Web - Technique editor
Target version:
Pull Request:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
Checked
Regression:
Description
The error manifests itself by:
- no technique anymore in the technique editor,
- error in /var/log/rudder/webapp/....stderr.log
:
[2020-02-28 14:37:57+0100] ERROR bootchecks - An error occured while updating ncf techniques: Failure getting techniques from ncf api: code 500: { "error": [ { "details": "Cause: 'ascii' codec can't decode byte 0xc3 in position 6883: ordinal not in range(128)\nTraceback (most recent call last):\n File \"/usr/share/ncf/api/ncf_api_flask_app/views.py\", line 118, in get_techniques\n techniques = ncf.get_all_techniques_metadata(True,migration)\n File \"/usr/share/ncf/tools/ncf.py\", line 443, in get_all_techniques_metadata\n method_calls = parse_technique_methods(file, methods)\n File \"/usr/share/ncf/tools/ncf.py\", line 322, in parse_technique_methods\n out = check_output([CFENGINE_PATH, \"-pjson\", \"-f\", technique_file], env=env)\n File \"/usr/share/ncf/tools/ncf.py\", line 80, in check_output\n output, error = process.communicate()\n File \"/usr/lib/python3.5/subprocess.py\", line 801, in communicate\n stdout, stderr = self._communicate(input, endtime, timeout)\n File \"/usr/lib/python3.5/subprocess.py\", line 1485, in _communicate\n self.stdout.encoding)\n File \"/usr/lib/python3.5/subprocess.py\", line 705, in _translate_newlines\n data = data.decode(encoding)\nUnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 6883: ordinal not in range(128)\n", "message": "Unknown internal error during techniques fetching" } ] }
Workaround:
- edit /usr/share/ncf/tools/ncf.py
line 79 and 80 with the patch in pull request,
- service apache2 restart
- touch /opt/rudder/etc/force_ncf_technique_update
- service rudder-jetty restart
Actions