-
-
Notifications
You must be signed in to change notification settings - Fork 655
Labels
Milestone
Description
Describe the bug
When cobbler status is executed and binary files are inside /var/log/cobbler, a UnicodeDecodeError is thrown:
Unexpected remote error, check the server side logs for further info
<class 'UnicodeDecodeError'>:'utf-8' codec can't decode byte 0xfd in position 0: invalid start byte
This is due to logging mechanisms which compress and rotate older logfiles.
Steps to reproduce
- touch /var/log/cobbler/install.log-2099999
- xz /var/log/cobbler/install.log-2099999
- cobbler status
Expected behavior
There should be no exception.
Cobbler version
Cobbler 3.3.3
source: ?, ?
build time: Thu Jul 21 12:00:00 2022
Operating system
SUSE Linux Enterprise Desktop 15 SP5
Cobbler log
[Thread-36] 2025-03-25T16:05:46 - INFO | Exception occurred: <class 'UnicodeDecodeError'>
[Thread-36] 2025-03-25T16:05:46 - INFO | Exception value: 'utf-8' codec can't decode byte 0xfd in position 0: invalid start byte
[Thread-36] 2025-03-25T16:05:46 - INFO | Exception Info:
File "/usr/lib/python3.6/site-packages/cobbler/remote.py", line 3753, in _dispatch
return method_handle(*params)
File "/usr/lib/python3.6/site-packages/cobbler/remote.py", line 3319, in get_status
return self.api.status(mode=mode)
File "/usr/lib/python3.6/site-packages/cobbler/api.py", line 1657, in status
return statusifier.run()
File "/usr/lib/python3.6/site-packages/cobbler/actions/status.py", line 192, in run
self.scan_logfiles()
File "/usr/lib/python3.6/site-packages/cobbler/actions/status.py", line 78, in scan_logfiles
data = fd.read()
File "/usr/lib64/python3.6/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Todo