diff options
| author | Ettore Simone <ettore.simone@gmail.com> | 2026-06-15 19:08:20 +0200 |
|---|---|---|
| committer | Bertrand Lanson <bertrand.lanson@infomaniak.com> | 2026-07-01 16:37:40 +0200 |
| commit | f1a3a131e6901d51c390f187740d752743eb0eb1 (patch) | |
| tree | 0bb0051ad9d9a684d49aef862f69174bc20a6deb /ansible | |
| parent | 75a9dcd132b0a5aab69bf234dd621c9035208174 (diff) | |
| download | kolla-ansible-f1a3a131e6901d51c390f187740d752743eb0eb1.tar.gz kolla-ansible-f1a3a131e6901d51c390f187740d752743eb0eb1.zip | |
UnicodeDecodeError in PodmanWorker.compare_config
During container config comparison, podman's Docker-compat exec API
inconsistently demultiplexes the 8-byte frame headers from the output
stream depending on podman version, leaving binary bytes in raw_output.
This will raise an "UnicodeDecodeError: 'utf-8' codec can't decode byte
0x?? in position 167: invalid start byte"
Closes-Bug: 2153943
Change-Id: Ida1c017f50b9a24b88f8962d304eb015fa357211
Signed-off-by: Ettore Simone <ettore.simone@gmail.com>
(cherry picked from commit c99f521356012d5bc42ab3c41a994b67657e86f0)
Diffstat (limited to 'ansible')
| -rw-r--r-- | ansible/module_utils/kolla_podman_worker.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ansible/module_utils/kolla_podman_worker.py b/ansible/module_utils/kolla_podman_worker.py index 66e5bba1b..0b9e25ef8 100644 --- a/ansible/module_utils/kolla_podman_worker.py +++ b/ansible/module_utils/kolla_podman_worker.py @@ -538,8 +538,12 @@ class PodmanWorker(ContainerWorker): if rc == 0: return False elif rc == 1: - self._config_diff = (raw_output.decode('utf-8') if - isinstance(raw_output, bytes) else raw_output) + try: + self._config_diff = (raw_output.decode('utf-8') if + isinstance(raw_output, bytes) else + raw_output) + except UnicodeDecodeError: + self._config_diff = 'container changed during config check' return True else: raise Exception('Failed to compare container configuration: ' |
