Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USHIFT-1022: Add sos debugging tips to docs #1562

Merged
merged 1 commit into from
Mar 27, 2023

Conversation

pacevedom
Copy link
Contributor

Which issue(s) this PR addresses:

Closes #

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 24, 2023
@dhellmann
Copy link
Contributor

There was a ticket for the sos work. It would be good to link this PR to that ticket, for future reference.

@@ -35,19 +35,135 @@ configuration, diagnostic, and troubleshooting data to be provided to Red Hat Te

> See [Generating sos reports for technical support](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/generating_sos_reports_for_technical_support/index) for more information on the `sos` utility usage.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We support RHEL 9 now

Suggested change
> See [Generating sos reports for technical support](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/generating_sos_reports_for_technical_support/index) for more information on the `sos` utility usage.
> See [Generating sos reports for technical support](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/getting_the_most_from_your_support_experience/generating-an-sos-report-for-technical-support_getting-the-most-from-your-support-experience) for more information on the `sos` utility usage.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

> See [documentation](https://github.com/sosreport/sos) for further information on `sos` utility.

Sos tool is composed of different plugins for tailored retrieval of information from different applications.
A MicroShift specific plugin has been added from sos version 4.5.1, being able to gather:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A MicroShift specific plugin has been added from sos version 4.5.1, being able to gather:
A MicroShift specific plugin has been added from sos version 4.5.1 and it can gather the following data:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment on lines 46 to 49
Plugin is automatically enabled as soon as it detects any of the following conditions:
* MicroShift RPMs being installed.
* MicroShift systemd service being present, whether running or not.
* MicroShift ovnk pods running.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Plugin is automatically enabled as soon as it detects any of the following conditions:
* MicroShift RPMs being installed.
* MicroShift systemd service being present, whether running or not.
* MicroShift ovnk pods running.
The plugin is automatically enabled when it detects any of the following conditions:
* MicroShift RPMs are installed
* MicroShift systemd service is present, whether running or not
* MicroShift ovnk pods are running

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

* MicroShift systemd service being present, whether running or not.
* MicroShift ovnk pods running.

For more information on the plugin design and output format, please check the [enhancement proposal](https://github.com/openshift/enhancements/blob/master/enhancements/microshift/microshift-supportability-tools.md).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we should reference the ER from the docs. It can be confusing because the plugin will evolve and eventually not be like described in the ER.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I included it because there is quite some relevant details there. Arent the ER's supposed to evolve with the implementation, if changes are significant enough?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just, these are user docs and ERs are very technical. A developer should be able to find the ER without the reference.

Comment on lines 55 to 65
$ sos report --list-profiles

sosreport (version 4.3)

The following profiles are available:

boot boot, devices, dracut, grub2, services, systemd, udev
cluster conntrack
container cgroups, containers_common, crio, podman, selinux
debug hts, kdump
desktop soundcard, x11
hardware ata, block, crypto, devices, hardware, kernel, logs,
memory, multipath, networking, networkmanager, ntb,
openhpi, pci, processor, scsi, soundcard, teamd, udev,
udisks, usb, x11
identity krb5, ldap, login, nis, pam, ssh, sssd, sudo
java jars
kernel ebpf, kernel, system
memory memory, processor
microshift microshift, microshift_ovn
network conntrack, ebpf, firewall_tables, firewalld,
networking, networkmanager, nss, openssl, teamd,
unbound
openshift selinux
packagemanager dnf, rpm, subscription_manager, yum
performance tuned
perl perl
sap vhostmd
security auditd, nss, openssl, pam, selinux, ssh, sssd
services chrony, nis, ssh, sssd, systemd, sysvipc, unbound
storage ata, block, devicemapper, devices, filesys, iscsi,
logs, lvm2, md, multipath, scsi, xfs
sysmgmt dnf, insights, ldap, subscription_manager, yum
system anaconda, anacron, auditd, boot, cgroups, chrony,
console, cron, crypto, dbus, devices, dnf, ebpf,
firewall_tables, hardware, host, i18n, insights, kdump,
kernel, krb5, kvm, ldap, libraries, libvirt, login,
logrotate, logs, memory, multipath, networking,
networkmanager, openhpi, pam, pci, process, processor,
python, release, rpm, selinux, services, ssh,
subscription_manager, sudo, system, systemd, sysvipc
tuned, udev, udisks, unbound, vhostmd, yum
virt kvm, libvirt, vhostmd, xen
webserver perl

24 profiles, 91 plugins
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's shorten the list. Alternatively, just grep for microshift to show the appropriate line

Suggested change
$ sos report --list-profiles
sosreport (version 4.3)
The following profiles are available:
boot boot, devices, dracut, grub2, services, systemd, udev
cluster conntrack
container cgroups, containers_common, crio, podman, selinux
debug hts, kdump
desktop soundcard, x11
hardware ata, block, crypto, devices, hardware, kernel, logs,
memory, multipath, networking, networkmanager, ntb,
openhpi, pci, processor, scsi, soundcard, teamd, udev,
udisks, usb, x11
identity krb5, ldap, login, nis, pam, ssh, sssd, sudo
java jars
kernel ebpf, kernel, system
memory memory, processor
microshift microshift, microshift_ovn
network conntrack, ebpf, firewall_tables, firewalld,
networking, networkmanager, nss, openssl, teamd,
unbound
openshift selinux
packagemanager dnf, rpm, subscription_manager, yum
performance tuned
perl perl
sap vhostmd
security auditd, nss, openssl, pam, selinux, ssh, sssd
services chrony, nis, ssh, sssd, systemd, sysvipc, unbound
storage ata, block, devicemapper, devices, filesys, iscsi,
logs, lvm2, md, multipath, scsi, xfs
sysmgmt dnf, insights, ldap, subscription_manager, yum
system anaconda, anacron, auditd, boot, cgroups, chrony,
console, cron, crypto, dbus, devices, dnf, ebpf,
firewall_tables, hardware, host, i18n, insights, kdump,
kernel, krb5, kvm, ldap, libraries, libvirt, login,
logrotate, logs, memory, multipath, networking,
networkmanager, openhpi, pam, pci, process, processor,
python, release, rpm, selinux, services, ssh,
subscription_manager, sudo, system, systemd, sysvipc
tuned, udev, udisks, unbound, vhostmd, yum
virt kvm, libvirt, vhostmd, xen
webserver perl
24 profiles, 91 plugins
$ sos report --list-profiles
sosreport (version 4.3)
The following profiles are available:
...
...
microshift microshift, microshift_ovn
...
...
24 profiles, 91 plugins

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Log into the host running MicroShift and execute the following command to generate an obfuscated
report that should not contain sensitive information (in this example only microshift plugin was
enabled. Your system's output may vary):
```bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we please shorten the output? Let's think what is relevant for the users to see. We may even want to skip it completely.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

The report archives can be found in the `/var/tmp/sosreport-*` files.
Log into the host running MicroShift and execute the following command to generate an obfuscated
report that should not contain sensitive information (in this example only microshift plugin was
enabled. Your system's output may vary):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to update the command below to explicitly run microshift plugin only? This way, we should not need to explain about different output, etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


The output file was generated in `/var/tmp/` dir, and a checksum file is also generated.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The output file was generated in `/var/tmp/` dir, and a checksum file is also generated.
The output file and its checksum are generated in `/var/tmp/` directory.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

$ sudo ls -tr /var/tmp/sosreport-* | tail -2
/var/tmp/sosreport-host0-2022-11-24-pvbcaji-obfuscated.tar.xz
/var/tmp/sosreport-host0-2022-11-24-pvbcaji-obfuscated.tar.xz.sha256
$ sudo ls -tr /var/tmp/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to leave the original command to only display the last two archives? The current command will display everything in the /var/tmp

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough, it should be mostly empty though.

@pacevedom pacevedom changed the title NOISSUE: Add sos debugging tips to docs USHIFT-1022: Add sos debugging tips to docs Mar 27, 2023
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 27, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Mar 27, 2023

@pacevedom: This pull request references USHIFT-1022 which is a valid jira issue.

In response to this:

Which issue(s) this PR addresses:

Closes #

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ggiguash
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 27, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 27, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ggiguash, pacevedom

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 27, 2023

@pacevedom: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot merged commit 25c2efc into openshift:main Mar 27, 2023
@pacevedom pacevedom deleted the sos_dev_docs branch December 18, 2023 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants