Bug 1859885
| Summary: | IndexError from kubernetes plugin when parsing nodes [rhel-7.9.z] | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Miroslav Hradílek <mhradile> | |
| Component: | sos | Assignee: | Jan Jansky <jjansky> | |
| Status: | CLOSED ERRATA | QA Contact: | Maros Kopec <makopec> | |
| Severity: | low | Docs Contact: | ||
| Priority: | medium | |||
| Version: | 7.8 | CC: | agk, bmr, fkrska, jhunsaker, jreznik, plambri, pmoravec, sbradley | |
| Target Milestone: | rc | Keywords: | ZStream | |
| Target Release: | 7.9 | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | sos-3.9-5.el7_9.2 | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1859888 (view as bug list) | Environment: | ||
| Last Closed: | 2021-02-02 11:59:00 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1859888 | |||
|
Description
Miroslav Hradílek
2020-07-23 09:21:06 UTC
The problem arises (only) when "kubectl get nodes" returns a line without non-whitsespace characters, i.e. when it returns either empty line, or a line with whitespace only. After a discussion with a containers guy: - normal output of "kubectl get nodes" does not contain such lines - that command output can contain such line when: - a config (file or option) is malformed - the command is unable to contact apiserver Both ways mean in 99% that all other kubectl commands will fail the same way. So the harm of not collecting their output (due to the sosreport plugin traceback) is small. So assessing the severity: - the bug can happen only when something else is broken (definitely not common, though sosreport is rather called in these situations, right?) - impact of the bug is quite small - one plugin will skip collecting failed commands outputs "only" I.e. I would not mark it as a blocker bug, though it is worth considering for a z-stream. Jake, as you know both sos and kubectl, am I right with the assessment? The problem arises (only) when "kubectl get nodes" returns a line without non-whitsespace characters, i.e. when it returns either empty line, or a line with whitespace only. After a discussion with a containers guy: - normal output of "kubectl get nodes" does not contain such lines - that command output can contain such line when: - a config (file or option) is malformed - the command is unable to contact apiserver (the wrong option used was also the cause of similar https://bugzilla.redhat.com/show_bug.cgi?id=1635035 , but that wont happen now, right?) Both ways mean in 99% that all other kubectl commands will fail the same way. So the harm of not collecting their output (due to the sosreport plugin traceback) is small. So assessing the severity: - the bug can happen only when something else is broken (definitely not common, though sosreport is rather called in these situations, right?) - impact of the bug is quite small - one plugin will skip collecting failed commands outputs "only" I.e. I would not mark it as a blocker bug, though it is worth considering for a z-stream. Jake, as you know both sos and kubectl, am I right with the assessment? > Jake, as you know both sos and kubectl, am I right with the assessment?
Right, in normal operation the `kubectl get nodes` command should never contain empty lines or whitespace only. That being said, even in the cases where a config file is malformed or the apiserver is unavailable - the command should exit non-zero, which would cause us to not parse the output at all.
So my understanding is that this might happen only when: - kubectl returns 0 response code (otherwise sosreport ignores its output), AND - the output contains empty or blank lines / the output would have to change That is improbable. Just to make the sos code robustness, I raised https://github.com/sosreport/sos/pull/2162 , but severity of this BZ is low for me. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (sos bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2021:0333 |