Repository navigation
Unmarshalling fails in log stream (read_namespaced_pod_log) obtained via watch #983
Description
Activity
- addedkind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.
on Oct 14, 2019 /assign
I think I have found another problem with reading log message streams: empty lines.
If I do something like
echo -e "\n"in a POD, the code above errors with:File "myscript.py", line X, in some_func for msg in w.stream(k_api.read_namespaced_pod_log, name="mypod", namespace="mynamespace"): File "<VENV-PATH>/local/lib/python2.7/site-packages/kubernetes/watch/watch.py", line 144, in stream for line in iter_resp_lines(resp): File "<VENV-PATH>/local/lib/python2.7/site-packages/kubernetes/watch/watch.py", line 48, in iter_resp_lines for seg in resp.read_chunked(decode_content=False): File "<VENV-PATH>/local/lib/python2.7/site-packages/urllib3/response.py", line 731, in read_chunked "Response is not chunked. " urllib3.exceptions.ResponseNotChunked: Response is not chunked. Header 'transfer-encoding: chunked' is missing.Should I open a separate issue, or does it make sense to fix that in one go?
Issues go stale after 90d of inactivity.
Mark the issue as fresh with/remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.If this issue is safe to close now please do so with
/close.Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale- addedlifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.Denotes an issue or PR has remained open with no activity and has become stale.
on Jan 14, 2020 /remove-lifecycle staleThe issue still exists and is pretty big showstopper in using the streaming API.
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with/remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.If this issue is safe to close now please do so with
/close.Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten- addedlifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.Denotes an issue or PR that has aged beyond stale and will be auto-closed.and removedlifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.Denotes an issue or PR has remained open with no activity and has become stale.
on Feb 13, 2020 /remove-lifecycle rotten
- removedlifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.Denotes an issue or PR that has aged beyond stale and will be auto-closed.
on Feb 13, 2020 @bluenote10 I do not think bot recognized your command because of backticks.
/unassign
@jiahuif has a reproduce and WIP fix in kubernetes-client/python-base#174
- added a commit that references this issue
on Oct 7, 2022 - added a commit that references this issue
on Apr 1, 2024 - added a commit that references this issue
on Feb 4, 2026
What happened (please include outputs or screenshots):
I'm using the following code to monitor log outputs of a pod:
This works in general. However if the process running in the pod prints a line that consists of a plain integer (e.g.
echo 42), the message unmarshalling crashes:What you expected to happen:
It should not crash depending on the line content.
How to reproduce it (as minimally and precisely as possible):
echo 42in a pod.Anything else we need to know?:
read_namespaced_pod_logworks even if lines contain pure integeres.Environment:
kubectl version):