SosreportUpdates

Differences between revisions 79 and 102 (spanning 23 versions)
Revision 79 as of 2020-06-26 18:33:28
Size: 3325
Editor: slashd
Comment:
Revision 102 as of 2024-07-24 08:17:27
Size: 5289
Editor: arif-ali
Comment:
Deletions are marked like this. Additions are marked like this.
Line 4: Line 4:
Sosreport is an extensible, portable, support data collection tool primarily aimed at Linux distributions and other UNIX-like operating systems. This tool '''is mission critical for Canonical to support UA (Ubuntu Advantage) customer, partners and community'''. Sosreport is also widely used by other third party vendors. sosreport is an extensible, portable, support data collection tool primarily aimed at Linux distributions and other UNIX-like operating systems. This tool '''is mission critical for Canonical to support UPro (Ubuntu Pro) customer, partners and community'''. sosreport is also widely used by other third party vendors.
Line 7: Line 7:
  * https://sos.readthedocs.io/en/latest/   * https://sos.readthedocs.io/en/main/
Line 16: Line 16:
  * Should be tested with Canonical internal tooling such as:
    * https://github.com/canonical/hotsos
Line 17: Line 19:
  * Under various UA customer similar environment and context (for LTS version only, no UA customer has such setup using non-LTS):
   * Cloud, Ceph, Landscape, MAAS, JuJu managed environment, ....
  * Under various UPro customer similar environment and context (for LTS version only, no UPro customer has such setup using non-LTS):
   * Cloud, Ceph, Landscape, MAAS, sunbeam, juju managed environment, ....
Line 22: Line 24:
 * For each test above
  * Make sure sosreport generates an archive under '''/tmp''' in the form of '''sosreport-<HOSTNAME>-2020-06-19-ogwtrgb.tar.xz''' with its accompanied md5 checksum '''sosreport-<HOSTNAME>-2020-06-19-ogwtrgb.tar.xz.md5''' (Note that the naming pattern may vary depending on the options and versions used.)
=== sos report - Collect and package diagnostic and support data ===
sos report is now used to generate sosreport tar
balls

  * Make sure sosreport generates an archive under '''/tmp''' in the form of '''sosreport-<HOSTNAME>-2020-06-19-ogwtrgb.tar.xz''' with its accompanied sha256 checksum '''sosreport-<HOSTNAME>-2020-06-19-ogwtrgb.tar.xz.sha256''' (Note that the naming pattern may vary depending on the options and versions used.)
Line 40: Line 44:
=== sos clean - Obfuscate sensitive data from one or more sosreports ===
sos clean, also available as sos mask, is a newly added sub-command in this release and is an implementation of the standalone soscleaner project.

$ sos clean <path_to_sosreport>

It can obfuscate: keywords, username, hostname, domain, ip & mac addresses.

 * Make sure it generates a default_mapping file inside /etc/sos/cleaner/ (at first run)

 * Make sure it produces the following files:
  * Tarball with sensitive information obfuscated (e.g. Ready to share with 3rd party vendor):
   * sosreport-host0-2020-08-26-eywxccq-obfuscated.tar.xz
  * Tarball accompanied sha256 checksum:
   * sosreport-host0-2020-08-26-eywxccq-obfuscated.tar.xz.sha256
  * Private mapping file (Not to share, keep it private):
   * sosreport-host0-2020-08-26-eywxccq-private_map
  * sos clean execution logs (Not to share, keep it private):
   * sosreport-<REAL_HOSTNAME>-2020-08-26-eywxccq-obfuscation.log

=== sos collect - Collect sosreports from multiple (cluster) nodes ===
sos collect is a new sub command in this release, and is an integration of the standalone sos-collector project, with the aim being to collect sosreports from multiple systems simultaneously.
Line 42: Line 68:
 * v4.7.2 [[https://bugs.launchpad.net/bugs/2054395|(LP: #2054395)]]
 * v4.5.6 [[https://bugs.launchpad.net/bugs/2028327|(LP: #2028327)]]
 * v4.4 [[https://bugs.launchpad.net/bugs/1986611|(LP: #1986611)]]
 * v4.3 [[https://bugs.launchpad.net/bugs/1960996|(LP: #1960996)]]
 * v4.2 [[https://bugs.launchpad.net/bugs/1941745|(LP: #1941745)]]
 * v4.1 [[https://bugs.launchpad.net/bugs/1917894|(LP: #1917894)]]
 * v4.0 [[https://bugs.launchpad.net/bugs/1892275|(LP: #1892275)]]
Line 46: Line 79:

This document describes the policy for updating sosreport package in a stable supported distro, including LTS. It is also the aim of this document to provide an example for any upstream project that wants to push updates to an Ubuntu stable release.

sosreport is an extensible, portable, support data collection tool primarily aimed at Linux distributions and other UNIX-like operating systems. This tool is mission critical for Canonical to support UPro (Ubuntu Pro) customer, partners and community. sosreport is also widely used by other third party vendors.

Therefore, in addition to bug fixes, new features are allowed in an update as long as the conditions outlined below are met.

Process

This is the mandatory process that the proposed packages have to pass. The following requirements must be met:

  • Sosreport needs to be tested
    • By a reasonable amount of Canonical Support team members with positive and detailed feedbacks (documented in an LP bug)
    • Should be tested with Canonical internal tooling such as:
    • On physical hardware, container and virtual machine.
    • Under various UPro customer similar environment and context (for LTS version only, no UPro customer has such setup using non-LTS):
      • Cloud, Ceph, Landscape, MAAS, sunbeam, juju managed environment, ....
    • On as much architecture as available to the testers.
    • For commonly used parameters : -a, --all-logs, --upload, --batch, ...

sos report - Collect and package diagnostic and support data

sos report is now used to generate sosreport tarballs

  • Make sure sosreport generates an archive under /tmp in the form of sosreport-<HOSTNAME>-2020-06-19-ogwtrgb.tar.xz with its accompanied sha256 checksum sosreport-<HOSTNAME>-2020-06-19-ogwtrgb.tar.xz.sha256 (Note that the naming pattern may vary depending on the options and versions used.)

  • Extract the archive
    • Validate its content and make sure it is sane and accurate.
    • Validate that sosreport obfuscates sensible information for plugins instructed to do so such as:
      • landscape plugin, should obfuscate password(s) and secret-token from config file.
      • or any plugins (sos/plugins/) exercising the do_file_sub() method.

    • Inspect for 0 size file(s) within the archive and use common sense if legit or not (e.g. "command is not found" can be avoided for instance)
      • find /path_to_sosreport_archive/ -type f -size 0
    • Look under "sos_reports" for full report.
    • Look under "sos_logs" for WARN and/or ERROR
      • grep -v "INFO:" sos_logs/sos.log
      • Look under "sos_logs" for error files (e.g. sos_logs/systemd-plugin-errors.txt).

sos clean - Obfuscate sensitive data from one or more sosreports

sos clean, also available as sos mask, is a newly added sub-command in this release and is an implementation of the standalone soscleaner project.

$ sos clean <path_to_sosreport>

It can obfuscate: keywords, username, hostname, domain, ip & mac addresses.

  • Make sure it generates a default_mapping file inside /etc/sos/cleaner/ (at first run)
  • Make sure it produces the following files:
    • Tarball with sensitive information obfuscated (e.g. Ready to share with 3rd party vendor):
      • sosreport-host0-2020-08-26-eywxccq-obfuscated.tar.xz
    • Tarball accompanied sha256 checksum:
      • sosreport-host0-2020-08-26-eywxccq-obfuscated.tar.xz.sha256
    • Private mapping file (Not to share, keep it private):
      • sosreport-host0-2020-08-26-eywxccq-private_map
    • sos clean execution logs (Not to share, keep it private):
      • sosreport-<REAL_HOSTNAME>-2020-08-26-eywxccq-obfuscation.log

sos collect - Collect sosreports from multiple (cluster) nodes

sos collect is a new sub command in this release, and is an integration of the standalone sos-collector project, with the aim being to collect sosreports from multiple systems simultaneously.

Previous sosreport updates bugs

Requesting the SRU

The SRU should be requested as usual (StableReleaseUpdates) with the additional note about having the above steps being completed.

SosreportUpdates (last edited 2024-07-24 08:17:27 by arif-ali)