Bug 2116602
| Summary: | [cee/sd][RFE]sosreport is not capturing ceph Orchestrator CLI outputs. | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Geo Jose <gjose> |
| Component: | sos | Assignee: | Jose Castillo <jcastillo> |
| Status: | CLOSED ERRATA | QA Contact: | Daniel Záležák <dzalezak> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 8.6 | CC: | agk, bmr, cww, dzalezak, jcastillo, jjansky, mhradile, milverma, plambri, pmoravec, sbradley, theute, torkil |
| Target Milestone: | rc | Keywords: | FutureFeature, OtherQA, Triaged |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2023-05-31 18:49:38 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: | |||
|
Description
Geo Jose
2022-08-09 02:29:11 UTC
Hello, ceph plugin has been split into several ones, in https://github.com/sosreport/sos/issues/1945 / https://github.com/sosreport/sos/commit/13ce81156970034375e3a6985a7c147e281486f3 . What new plugin should collect the above commands outputs, please? See their list in https://github.com/sosreport/sos/tree/main/sos/report/plugins . To the "collect only on v.5 or newer" - as 1) the command is harmless (to the system) on older ceph versions, 2) it will take some time to deliver this into RHEL downstream (8.9/9.3 ?) when <5 versions will be less installed, 3) adding a version check "just" to stop preventing "subcommand not known" cmdoutputs, I suggest dont restrict the commands executions to "version 5+" condition. Does this sound acceptable? There is no ceph plugin in upstream (in any version where this BZ will be implemented). There are plugins: - ceph_ansible, by default enabled by presence of ceph-ansible package - ceph_common, enabled by either ceph-(mon|rgw|osd).* container present - ceph_mds, enabled by presence of a /var/lib/ceph/mds/*/* file - ceph_mgr, enabled by presence of a /var/lib/ceph/mgr/*/* file - ceph_mon, enabled by presence of a /var/lib/ceph/mon/*/* file - ceph_osd, enabled by presence of a /var/lib/ceph/osd/*/* file - ceph_rgw, enabled by presence of a /var/lib/ceph/radosgw/*/* file Anyway, I realized all the commands *are* already collected in upstream sos, in ceph_mgr plugin: https://github.com/sosreport/sos/blob/main/sos/report/plugins/ceph_mgr.py#L40-L46 (without the "--format json-pretty" option - is that sufficient?) All that is already available in a RHEL8.8 candidate build https://people.redhat.com/pmoravec/sos-4.4-1/ - let try that ;-) About the "on RHCS 4, write a specific command output instead of a default error one" - we dont "spoof" commands outputs like that. We either collect a command output (or a file) or not (based on any logic, if required), and we obfuscate secrets. But replacing a valid command output by some artificial text, that would be confusing. E.g. when one notices a warning or error, (s)he searches for that string in either source (KCS, source code of the program). Finding no hit there would be confusing. Anyway, the "Error EINVAL: invalid command" suggests the user that the (sub)command is invalid..? Just to clarify / double-confirm: it is preferred to collect the ceph commands with "--format json-pretty" argument, which is supported in every ceph release, right? I.e. patch like:
--- a/sos/report/plugins/ceph_mgr.py
+++ b/sos/report/plugins/ceph_mgr.py
@@ -37,13 +37,13 @@ class CephMGR(Plugin, RedHatPlugin, UbuntuPlugin):
# more commands to be added later
self.add_cmd_output([
"ceph balancer status",
- "ceph orch host ls",
- "ceph orch device ls",
- "ceph orch ls --export",
- "ceph orch ps",
- "ceph orch status --detail",
- "ceph orch upgrade status",
- "ceph log last cephadm"
+ "ceph orch host ls --format json-pretty",
+ "ceph orch device ls --format json-pretty",
+ "ceph orch ls --export --format json-pretty",
+ "ceph orch ps --format json-pretty",
+ "ceph orch status --detail --format json-pretty",
+ "ceph orch upgrade status --format json-pretty",
+ "ceph log last cephadm --format json-pretty"
])
?
About "ceph needs to call sosreport -e ceph" - why? Why the plugins are not enabled on ceph (respectivelly on its individual components) by default?
How could sos get know it is running on, say, ceph osd? Is there a package specific to that? A container? A kernel module or command output? Or a filename present?
FYI we split ceph plugin per components in https://github.com/sosreport/sos/commit/13ce81156970034375e3a6985a7c147e281486f3 , so a workaround of documentation is replacing "-e ceph" by "-e ceph_common,ceph_mds,ceph_mgr,ceph_mon,ceph_osd,ceph_rgw"
(could you please raise doc BZ for it? otherwise I will once I find where to file it..)
Please double-confirm the above --forman json-pretty change, plus tell us how sos can recognize individual ceph components (via either package, container, kmod, cmdoutput or filename, if possible).
Raising needinfo on Jose as he had some pending work/PR for this. I'm reworking the PR because of the recent changes to the ceph plugins upstream via 3092 and 3089. I'm aiming to have it ready asap. Can you please test candidate release for us? https://people.redhat.com/pmoravec/sos-4.5.3-1/el8/ 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-2023:3414 |