Debian: collect kube-memory reports a stacktrace
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Fix Released
|
Low
|
Gustavo Lyra Pereira |
Bug Description
Brief Description
-----------------
running collect on a debian STX system will create a kube-memory.info file that contains a stacktrace.
It runs the utility kube-memory
The code is in https:/
The tool should report the correct data and not the stacktrace.
Severity
--------
Minor
Steps to Reproduce
------------------
Setup a system (AIO)
sudo kube-memory
Expected Behavior
------------------
Should show the kube-memory results
Actual Behavior
----------------
Shows a stacktrace
Reproducibility
---------------
100%
System Configuration
-------
AIO-SX
Branch/Pull Time/Commit
-------
Dec 14, 2022
Last Pass
---------
Centos. (Based on the stacktrace, this likely has never worked in python3, which is what we run on Debian)
Timestamp/Logs
--------------
2022-12-14 16:23:21,477 131875 ERROR kube_memory: exception: TypeError("a bytes-like object is required, not 'str'")
Traceback (most recent call last):
File "/usr/lib/
ret = gather_
File "/usr/lib/
pt_groups = gather_
File "/usr/lib/
for line in output_
TypeError: a bytes-like object is required, not 'str'
Test Activity
-------------
Feature Testing
Workaround
----------
None
tags: | added: stx.monitor |
Changed in starlingx: | |
assignee: | nobody → Gustavo Lyra Pereira (gustavolyrap) |
Changed in starlingx: | |
importance: | Undecided → Low |
tags: | added: stx.8.0 |
Note: we have seen this type of issue elsewhere, and the fix is to add 'decode' to the data that we read. /review. opendev. org/c/starlingx /oidc-auth- armada- app/+/846174/ 4/oidc- auth-tools/ oidcauthtools/ oidcauthtools/ oidc_auth. py
example
https:/
So changing the pipe_output method should be good enough
example /github. com/starlingx/ monitoring/ blob/f79dcc176f 7c7c405731426bc 242b3cfe48e1055 /kube-memory/ kube-memory/ kube_memory/ kube_memory. py#L184
https:/
changing: -1].communicate ()[0] -1].communicate ()[0].decode( )
return last_popen[
to:
return last_popen[