kolla_set_configs --check fails for non-unicode files

Bug #1913952 reported by Radosław Piliszek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla
Fix Released
Medium
Radosław Piliszek
Ussuri
Fix Released
Medium
Unassigned
Victoria
Fix Released
Medium
Unassigned
Wallaby
Fix Released
Medium
Radosław Piliszek

Bug Description

Non-unicode files (especially binary ones) might trigger Unicode decoding errors when trying to compare file contents.

Example failure:

'Traceback (most recent call last):\n File "/tmp/ansible_kolla_docker_payload_4lbmc5u7/ansible_kolla_docker_payload.zip/ansible/modules/kolla_docker.py", line 1176, in main\n File "/tmp/ansible_kolla_docker_payload_4lbmc5u7/ansible_kolla_docker_payload.zip/ansible/modules/kolla_docker.py", line 338, in compare_container\n File "/tmp/ansible_kolla_docker_payload_4lbmc5u7/ansible_kolla_docker_payload.zip/ansible/modules/kolla_docker.py", line 603, in compare_config\nException: Failed to compare container configuration: b\'INFO:__main__:Loading config file at /var/lib/kolla/config_files/config.json\\nINFO:__main__:Validating config file\\nERROR:__main__:Unexpected error:\\nTraceback (most recent call last):\\n File "/usr/local/bin/kolla_set_configs", line 424, in main\\n execute_config_check(config)\\n File "/usr/local/bin/kolla_set_configs", line 410, in execute_config_check\\n config_file.check()\\n File "/usr/local/bin/kolla_set_configs", line 231, in check\\n elif not self._cmp_file(source, dest):\\n File "/usr/local/bin/kolla_set_configs", line 168, in _cmp_file\\n if f1.read() != f2.read():\\n File "/usr/lib64/python3.6/codecs.py", line 321, in decode\\n (result, consumed) = self._buffer_decode(data, self.errors, final)\\nUnicodeDecodeError: \\\'utf-8\\\' codec can\\\'t decode byte 0xea in position 2: invalid continuation byte\\n\'\n'

description: updated
Revision history for this message
Radosław Piliszek (yoctozepto) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla 12.0.0.0rc1

This issue was fixed in the openstack/kolla 12.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla 10.3.0

This issue was fixed in the openstack/kolla 10.3.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla 11.1.0

This issue was fixed in the openstack/kolla 11.1.0 release.

no longer affects: kolla/train
Changed in kolla:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.