add lshw cmd into sosreport's hardware plugin

Bug #1871494 reported by Eric Desrochers
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
sosreport (Ubuntu)
Fix Released
Low
Heather Lemon
Xenial
Fix Released
Low
Heather Lemon
Bionic
Fix Released
Low
Heather Lemon
Eoan
Fix Released
Low
Heather Lemon
Focal
Fix Released
Low
Heather Lemon
Groovy
Fix Released
Low
Heather Lemon

Bug Description

[Impact]

  lshw(1) https://linux.die.net/man/1/lshw
 * lshw is a small tool to extract detailed information on the hardware
   configuration of the machine. It can report exact memory configuration,
   firmware version, mainboard configuration, CPU version and speed,
   cache configuration, bus speed, etc. on DMI-capable x86 or IA-64
   systems and on some PowerPC machines (PowerMac G4 is known to work).

 * Adding 'lshw' will help Canonical or third-party vendor using the
   sosreport package to not having to ask 'lshw' in addition to sosreport.
   This is a frequent command to run to troubleshoot/debug things

 * Including hardware information is a helpful debug step to determine
   issues found

[Test Case]

 * Run sosreport in different customer scenarios:
    server, desktop, cloud, hypervisor, instance (container, vm),
    physical server, since this is specifically listing hardware
    informations.
 * For all distros:
   - install sosreport from the proposed pocket
   - run sosreport with default settings `sudo sosreport -a --config
   sos.conf`
   Or to just test hardware plugin `sosreport -o hardware --config
   sos.conf`
 * Extract archive and look at contents
    - untar report file in /tmp/<sosreport.tar.gz>
    - cd <sosreport folder>/sos_commands/hardware/
    - less lshw
     -- the ouput is information about the system's hardware
    - look under "sos_logs" for warnings/errors.
    - look under "sos_reports" for full report.
 * Run `simple.sh`: A quick port of the travis unit tests to bash.

Generates various types of sosreports collection.
 * Ensure simple.sh test passes
    - wget https://raw.githubusercontent.com/sosreport/sos/master
      /test/simple.sh
    - execute command `sudo tests/simple.sh`

[Regression Potential]

 * Command implicitly slows down python script
 * Unit test failures
 * Only affects the hardware plugin and won't affect core functionalities nor other plugins
 * Lshw that is commonly used on system, the command cannot create any harm on the system (read only)
 * If the command doesn't exist sosreport will continue and move on
 * Lshw must be run as super user or it will only report partial information

[Other Info]

 * Upstream commit: https://github.com/sosreport/sos/pull/1994/commits/2dd5cd45a8381fa36ea99c85b526f9d79e526d91

[Original description]

 * This is a wishlist to add the cmd 'lshw' into the hardware's sosreport plugin

Eric Desrochers (slashd)
tags: added: sts sts-sponsor-volunteer
Changed in sosreport (Ubuntu Focal):
status: New → In Progress
assignee: nobody → Heather Lemon (hypothetical-lemon)
Changed in sosreport (Ubuntu Eoan):
status: New → In Progress
Changed in sosreport (Ubuntu Bionic):
status: New → In Progress
Changed in sosreport (Ubuntu Xenial):
status: New → In Progress
Changed in sosreport (Ubuntu Eoan):
assignee: nobody → Heather Lemon (hypothetical-lemon)
Changed in sosreport (Ubuntu Bionic):
assignee: nobody → Heather Lemon (hypothetical-lemon)
Changed in sosreport (Ubuntu Xenial):
assignee: nobody → Heather Lemon (hypothetical-lemon)
importance: Undecided → Wishlist
Changed in sosreport (Ubuntu Bionic):
importance: Undecided → Wishlist
Changed in sosreport (Ubuntu Eoan):
importance: Undecided → Wishlist
Changed in sosreport (Ubuntu Focal):
importance: Undecided → Wishlist
Eric Desrochers (slashd)
description: updated
Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :

debdiff for focal lshw command patch

Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :

build #2 for lshw command

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "fix_1871494.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Revision history for this message
Eric Desrochers (slashd) wrote :

Thanks Heather for your Ubuntu contribution for Focal.

Since this change is not release critical, I'll put the sponsoring on hold while Focal is currently transitionning from devel to stable.

I'll sponsor it as soon as I can.

Meanwhile, could you please produce the debdiff(s) for the stable release: Eoan/Bionic/Xenial ?

- Eric

Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :

Yeah that sounds good. Thanks.

description: updated
Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :
Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :
Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :
Eric Desrochers (slashd)
tags: added: sts-sponsor-slashd
removed: sts-sponsor-volunteer
Revision history for this message
Eric Desrochers (slashd) wrote :

Heather, can you please produce a 'groovy' 20.10 debdiff ?

Thanks

Changed in sosreport (Ubuntu Groovy):
importance: Wishlist → Low
Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :
Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :
Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :

attached thanks!

Revision history for this message
Eric Desrochers (slashd) wrote :

Uploaded in groovy.

Eric Desrochers (slashd)
Changed in sosreport (Ubuntu Focal):
importance: Wishlist → Low
Changed in sosreport (Ubuntu Eoan):
importance: Wishlist → Low
Changed in sosreport (Ubuntu Bionic):
importance: Wishlist → Low
Changed in sosreport (Ubuntu Xenial):
importance: Wishlist → Low
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sosreport - 3.9-1ubuntu3

---------------
sosreport (3.9-1ubuntu3) groovy; urgency=low

  * d/p/0003-lshw-command.patch: (LP: #1871494)
    - Add `lshw` command to hardware plugin

  [Eric Desrochers]
  * d/p/0004-lds-substitute-oidc-conf.patch:
    - landscape substitute oidc conf
      in service file (LP: #1874526)

 -- Heather Lemon <email address hidden> Mon, 27 Apr 2020 09:33:16 -0600

Changed in sosreport (Ubuntu Groovy):
status: In Progress → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Eric, or anyone else affected,

Accepted sosreport into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/sosreport/3.9-1ubuntu2.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in sosreport (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Eric, or anyone else affected,

Accepted sosreport into eoan-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/sosreport/3.9-1ubuntu0.19.10.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-eoan to verification-done-eoan. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-eoan. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in sosreport (Ubuntu Eoan):
status: In Progress → Fix Committed
tags: added: verification-needed-eoan
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Eric, or anyone else affected,

Accepted sosreport into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/sosreport/3.9-1ubuntu0.18.04.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in sosreport (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed-bionic
Revision history for this message
Eric Desrochers (slashd) wrote :

[VERIFICATION EOAN]

This was tested using the following proposed pkg:
sosreport 3.9-1ubuntu0.19.10.3

I confirmed the sosreport's hw plugin collect 'lshw' command as root,
and its content is accurate.

# lsb_release -cs
eoan

# sosreport -a
# cd /tmp
# tar Jxvf sosreport*.tar.xz
# sudo lshw | tee /tmp/lshw_not_from_sosreport.eoan

# diff -u /tmp/lshw_not_from_sosreport.eoan /path_to_sosreport/sos_commands/hardware/lshw
17c17
< size: 2487MHz
---
> size: 3289MHz

The "size:" is dynamic so it keeps changing at each lshw run, the rest remain identical.
No content missing/altered/... during the lshw sosreport collection.

tags: added: verification-done-eoan
removed: verification-needed-eoan
Revision history for this message
Eric Desrochers (slashd) wrote :

[VERIFICATION FOCAL]

This was tested using the following proposed pkg:
sosreport 3.9-1ubuntu2.1

I confirmed the sosreport's hw plugin collect 'lshw' command as root,
and its content is accurate.

# lsb_release -cs
focal

# sosreport -a
# cd /tmp
# tar Jxvf sosreport*.tar.xz
# sudo lshw | tee /tmp/lshw_not_from_sosreport.focal

# diff -u /tmp/lshw_not_from_sosreport.focal /path_to_sosreport/sos_commands/hardware/lshw
17c17
< size: 2545MHz
---
> size: 3240MHz

The "size:" is dynamic so it keeps changing at each lshw run, the rest remain identical.
No content missing/altered/... during the lshw sosreport collection.

tags: added: verification-done-focal
removed: verification-needed-focal
Revision history for this message
Eric Desrochers (slashd) wrote :

[VERIFICATION BIONIC]

This was tested using the following proposed pkg:
sosreport 3.9-1ubuntu0.18.04.3

I confirmed the sosreport's hw plugin collect 'lshw' command as root,
and its content is accurate.

# lsb_release -cs
focal

# sosreport -a
# cd /tmp
# tar Jxvf sosreport*.tar.xz
# sudo lshw | tee /tmp/lshw_not_from_sosreport.bionic

# diff -u /tmp/lshw_not_from_sosreport.bionic /path_to_sosreport/sos_commands/hardware/lshw
17c17
< size: 2869MHz
---
> size: 3200MHz

The "size:" is dynamic so it keeps changing at each lshw run, the rest remain identical.
No content missing/altered/... during the lshw sosreport collection.

tags: added: verification-done verification-done-bionic
removed: sts-sponsor-slashd verification-needed verification-needed-bionic
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sosreport - 3.9-1ubuntu2.1

---------------
sosreport (3.9-1ubuntu2.1) focal; urgency=low

  * d/p/0003-lshw-command.patch: (LP: #1871494)
    - Add `lshw` command to hardware plugin

  [Eric Desrochers]
  * d/p/0004-lds-substitute-oidc-conf.patch:
    - landscape substitute oidc conf
      in service file (LP: #1874526)

 -- Heather Lemon <email address hidden> Mon, 27 Apr 2020 09:33:16 -0600

Changed in sosreport (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for sosreport has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sosreport - 3.9-1ubuntu0.19.10.3

---------------
sosreport (3.9-1ubuntu0.19.10.3) eoan; urgency=medium

  * d/p/0003-lshw-command.patch: (LP: #1871494)
    - Add `lshw` command to hardware plugin

  [Eric Desrochers]
  * d/p/0004-lds-substitute-oidc-conf.patch:
    - landscape substitute oidc conf
      in service file (LP: #1874526)

  [Eric Desrochers]
  * d/tests/{control,simple.sh}: (LP: #1865212)
    - Add testsuite "simple.sh". A port of the travis tests to bash
      provided by upstream.

 -- Heather Lemon <email address hidden> Wed, 29 Apr 2020 13:47:47 +0000

Changed in sosreport (Ubuntu Eoan):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sosreport - 3.9-1ubuntu0.18.04.3

---------------
sosreport (3.9-1ubuntu0.18.04.3) bionic; urgency=medium

  * d/p/0003-lshw-command.patch: (LP: #1871494)
    - Add `lshw` command to hardware plugin

  [Eric Desrochers]
  * d/p/0004-lds-substitute-oidc-conf.patch:
    - landscape substitute oidc conf
      in service file (LP: #1874526)

  [Eric Desrochers]
  * d/tests/{control,simple.sh}: (LP: #1865212)
    - Add testsuite "simple.sh". A port of the travis tests to bash
      provided by upstream.

 -- Heather Lemon <email address hidden> Wed, 29 Apr 2020 14:04:05 +0000

Changed in sosreport (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Eric Desrochers (slashd) wrote :

Sponsored for Xenial.

It is now waiting for SRU verification team approval for the package to start building in xenial-proposed for the testing phase.

Thanks for your contribution Heather !

Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Eric, or anyone else affected,

Accepted sosreport into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/sosreport/3.9-1ubuntu0.16.04.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in sosreport (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-xenial
removed: verification-done
Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :

[VERIFICATION XENIAL]

Testing using
Tested using focal sosreport: sosreport_3.9-1ubuntu0.16.04.2

# installed sosreport from proposed
$ pull-lp-source sosreport xenial-proposed
# cd into sosreport and run command
$ sudo ./sosreport -o hardware --config sos.conf
# untar tar created from sosreport
$ tar -xvf <name of tar file>
# find `lshw` command output
$ cd /tmp/<name of tar file>/sos_commands/hardware
# verify output of lshw command
$ less lshw
# verified command ran and its output was saved to lshw file

tags: added: verification-done-xenial
removed: verification-needed-xenial
Revision history for this message
Eric Desrochers (slashd) wrote :

@Heather Lemon (hypothetical-lemon)

Thanks for your verification.

Could you please do the test one more time but this time using the binary package (and not testing the code from the source package) ?

Using the binary package will implictly allow one to conclude that the package is installable (including their dependencies), that the binaries are executed as expected, configuration (sos.conf) is in place, .... Basically, the test result will be closer to reality where users will install the sosreport binary package. They won't run sosreport from the source package.

Your test concludes the code works (without the packaging layer)

What we want to know is if the package of sosreport (binary package) works and do what we expect it to do.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.

- Eric

Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :

[VERIFICATION XENIAL]

Tested using sosreport: sosreport_3.9-1ubuntu0.16.04.2

# installed sosreport from proposed
$ sudo apt-get install sosreport/xenial-proposed
# run sosreport
$ sudo sosreport -o hardware
# untar tar created from sosreport
$ sudo tar -xvf <name of tar file>
# find `lshw` command output
$ cd /tmp/<name of tar file>/sos_commands/hardware
# verify output of lshw command
$ less lshw
# verified command ran and its output was saved to lshw file

- Thanks for catching that Eric!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sosreport - 3.9-1ubuntu0.16.04.2

---------------
sosreport (3.9-1ubuntu0.16.04.2) xenial; urgency=low

  * d/p/0002-lshw-command.patch (LP: #1871494)
    - Add `lshw` command to hardware plugin

 -- Heather Lemon <email address hidden> Wed, 22 Apr 2020 09:32:27 -0600

Changed in sosreport (Ubuntu Xenial):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.