SRU: [lxd] Drop db collection and introduce lxd.buginfo

Bug #1868215 reported by Seyeong Kim
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
sosreport (Ubuntu)
Fix Released
Undecided
Seyeong Kim
Bionic
Fix Released
Undecided
Seyeong Kim
Eoan
Fix Released
Undecided
Seyeong Kim
Focal
Fix Released
Undecided
Seyeong Kim

Bug Description

[Impact]

sosreport doesn't have to collect everything related to lxd which is very huge and unhelpful that much.
This commit make sosreport collect proper info as installation types.

[Test Case]

Scenario #1
* Deploy a machine (Xenial) with lxd installed as a DEB package
* Install sosreport
* sudo sosreport -o lxd or/and sudo sosreport -a
* Extract the archive in /tmp and go in path_to_sosreport/sos_commands/lxd
The data collection should be the one in the else statement of the plugin.

Scenario #2
* Deploy a machine (Bionic and late) with lxd installed as a SNAP.
* Install sosreport
* sudo sosreport -o lxd or/and sudo sosreport -a
* Extract the archive in /tmp and go in path_to_sosreport/sos_commands/lxd
The data collection should be the one in the if statement of the plugin, only executing "lxd.buginfo" command only available in SNAP.

Scenario #3:
A quick script to run on a node to verify multiple different options (as a sanity check):

https://raw.githubusercontent.com/sosreport/sos/master/tests/simple.sh

sudo bash simple.sh /usr/bin/python3 /usr/bin/sosreport

simple.sh is a quick port of the travis tests to bash, requires root.

There is some work to incorporate this exact script into the sosreport package for autopkg testing, but meanwhile it can be run manually for verifications.

[Regression]

"lxd.buginfo" has the advantage of not needing updates whenever
lxd upstream add a new feature or find something new that’s worth capturing since LXD is now only offered as a SNAP nowadays.

The plugin will remain backward compatible with DEB and SNAP, until there is no supported lxd DEB package available.

If a problem occurs it will only impact the lxd plugin, not the other plugins nor core functionnalities.

If for some reasons a command can be executed (not found in versions installed or else). sosreport is fault tolerant, and will continue/skip the command that doesn't exist, fails, ...

FWIW, the commit has been +1 by lxd upstream himself stgraber:
https://github.com/sosreport/sos/pull/1982/

[Others]

upstream patch
- https://github.com/sosreport/sos/pull/1982/commits/bdc5ffdf5b8376ab2014ec8fbd9a878cc9d0d264

LXD upstream reference:
https://discuss.linuxcontainers.org/t/what-lxd-information-should-be-collected-by-sosreport

Seyeong Kim (seyeongkim)
tags: added: sts
Changed in sosreport (Ubuntu Bionic):
assignee: nobody → Seyeong Kim (xtrusia)
Changed in sosreport (Ubuntu Eoan):
assignee: nobody → Seyeong Kim (xtrusia)
Changed in sosreport (Ubuntu Focal):
assignee: nobody → Seyeong Kim (xtrusia)
Seyeong Kim (seyeongkim)
Changed in sosreport (Ubuntu Bionic):
status: New → In Progress
Changed in sosreport (Ubuntu Eoan):
status: New → In Progress
Changed in sosreport (Ubuntu Focal):
status: New → In Progress
Eric Desrochers (slashd)
description: updated
Eric Desrochers (slashd)
description: updated
description: updated
tags: added: sts-sponsor-slashd
Revision history for this message
Seyeong Kim (seyeongkim) wrote :
Revision history for this message
Seyeong Kim (seyeongkim) wrote :
Revision history for this message
Seyeong Kim (seyeongkim) wrote :
description: updated
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "lp1868215_focal.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 :

Pushed into focal along with LP: #1865212.

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

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

---------------
sosreport (3.9-1ubuntu2) focal; urgency=medium

  * d/p/0002-lxd-drop-db-collection-and-introduce-lxd-buginfo.patch:
    - Drop db collection and introduce lxd.buginfo (LP: #1868215)

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

 -- Seyeong Kim <email address hidden> Fri, 20 Mar 2020 06:48:01 +0000

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

[FOCAL]

Note: lxd only available via SNAP.

# lsb_release -cs
focal

# snap list lxd
Name Version Rev Tracking Publisher Notes
lxd 3.0.4 11348 3.0/stable/… canonical✓ -

# ls -altr <path_to_sosreport>/sos_commands/lxd/lxd.buginfo
-rw-r--r-- 1 root root 22017 Mar 25 16:41 <path_to_sosreport>/sos_commands/lxd/lxd.buginfo

Eric Desrochers (slashd)
tags: added: sts-sponsor-volunteer
Revision history for this message
Eric Desrochers (slashd) wrote :

[STS-SPONSOR]

Sponsored for E/B.

Thanks for your contribution Seyeong.

Eric Desrochers (slashd)
tags: removed: sts-sponsor-slashd sts-sponsor-volunteer
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Seyeong, 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.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-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 verification-needed-eoan
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Seyeong, 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.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-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
Seyeong Kim (seyeongkim) wrote :

verified bionic

root@xtrusia:/tmp/sosreport-xtrusia-2020-04-07-ojxtgec/sos_commands/lxd# ll
total 36
drwx------ 2 root root 4096 Apr 7 03:11 ./
drwxr-xr-x 53 root root 4096 Apr 7 03:11 ../
-rw-r--r-- 1 root root 25844 Apr 7 03:11 lxd.buginfo
root@xtrusia:/tmp/sosreport-xtrusia-2020-04-07-ojxtgec/sos_commands/lxd# dpkg -l | grep sosreport
ii sosreport 3.9-1ubuntu0.18.04.2 amd64 Set of tools to gather troubleshooting data from a system

tags: added: verification-done-bionic
removed: verification-needed-bionic
Revision history for this message
Seyeong Kim (seyeongkim) wrote :

verified eoan

root@xtrusia:/tmp/sosreport-xtrusia-2020-04-07-xyioxiy/sos_commands/lxd# ll
total 36
drwx------ 2 root root 4096 Apr 7 06:20 ./
drwxr-xr-x 54 root root 4096 Apr 7 06:20 ../
-rw-r--r-- 1 root root 27074 Apr 7 06:20 lxd.buginfo
root@xtrusia:/tmp/sosreport-xtrusia-2020-04-07-xyioxiy/sos_commands/lxd# dpkg -l | grep sosreport
ii sosreport 3.9-1ubuntu0.19.10.2 amd64 Set of tools to gather troubleshooting data from a system

tags: added: verification-done-eoan
removed: verification-needed-eoan
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello! Thank you for your verification. Did your testing also involve performing the test from Scenario #3?

Revision history for this message
Seyeong Kim (seyeongkim) wrote :

@sil2100 no but I just ran on both Bionic and Eoan.

It shows me "Everything worked!" at the end of string.
but there is /var/tmp/sosreport*.tar*: Cannot open: No such file or directory.

so I changed /var/tmp/* to /tmp/ and ran again. it looks fine.

do you need any output file here?

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

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

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

  * d/p/002-lxd-drop-db-collection-and-introduce-lxd-buginfo.patch
    - Drop db collection and introduce lxd.buginfo (LP: #1868215)

 -- Seyeong Kim <email address hidden> Tue, 24 Mar 2020 19:40:21 -0700

Changed in sosreport (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) 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.2

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

  * d/p/0002-lxd-drop-db-collection-and-introduce-lxd-buginfo.patch
    - Drop db collection and introduce lxd.buginfo (LP: #1868215)

 -- Seyeong Kim <email address hidden> Tue, 24 Mar 2020 19:33:15 -0700

Changed in sosreport (Ubuntu Eoan):
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.