[Bug 2067775] Re: subiquity package-hook is outdated

Benjamin Drung 2067775 at bugs.launchpad.net
Fri Jun 28 10:52:04 UTC 2024


We should combine this SRU with the fixes for:
* bug #2067120 (apport-retrace fix retracing crashes on Ubuntu)
* bug #2066995 (apport: create /var/crash with setgid permission)
* bug #2069360 (apport-autoreport.service fails if autoreporting is disabled)

I'll plan to work on it next week.

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/2067775

Title:
  subiquity package-hook is outdated

Status in apport package in Ubuntu:
  Fix Committed
Status in apport source package in Jammy:
  New
Status in apport source package in Noble:
  New

Bug description:
  [Impact]

  The Subiquity package hook in Apport has not been updated to collect
  the type of information we are typically interested in (e.g.
  /var/log/installer/\*). This means users who run `ubuntu-bug
  subiquity` from the terminal will not automatically collect relevant
  information to attach to their bug reports. This upload fixes this by
  updating Subiquity's package hook to collect logs and information
  typically used for debugging Subiquity bugs. This fix needs to be SRUd
  to Noble and Jammy so that users performing these installs can run
  `ubuntu-bug subiquity` and collect relevant information.

  [Test Plan]

  The test plan is focused on testing the behavior of apport within the
  live installation environment, where we primarily expect users to
  submit bug reports from. Thus the test plan is split into three
  different test plans: Two for Desktop images and one for Server. For
  Noble, all three test scenarios are relevant. For Jammy, it is only
  necessary to test Server since the Desktop installer for Jammy is not
  Subiquity based.

  Desktop - Manual:
  1) Download the latest Noble Desktop ISO [1].
  2) Begin an installation using the media you downloaded. You may progress the install as far as you like, with the following restrictions: (1) At minimum you need wait for the first screen to show up and (2) at most you may allow the install to finish but do not allow the system to restart (you need to be in the live-environment to proceed).
  3) Open a terminal (ctl + alt + t) 
  4) Enable proposed[4] and update apport
  5) Run the following command "APPORT_LAUNCHPAD_INSTANCE=qastaging ubuntu-bug subiquity"
  6) 4 authorization prompts will display, requesting access to collect information from the system. Allow all of them.
  7) Inspect the fields of the report and ensure that none report "permission denied" or similar. 
  8) Click "Send" on the resulting dialog to send the report. Firefox will open up to finish filling out the bug information on launchpad.
  9) Log in and enter anything as the title and hit continue. Click "No, I need to report a new bug" if necessary
  10) Enter anything in the "further information section". Ensure that the field below this section, titled "This bug contains information that is", is marked "Private" by default.
  11) You can now submit the bug and inspect the automatically filled description for further errors in the report. (Errors messages are typically short enough to show up in the body of the bug description while larger attachments with real information end up as attachments)

  Desktop - Automatic:
  1) Download the latest Noble Desktop ISO [1].
  2) Begin an installation using the media you downloaded. You may progress the install as far as you like, with the following restrictions: (1) At minimum you need wait for the first screen to show up and (2) at most you may allow the install to finish but do not allow the system to restart (you need to be in the live-environment to proceed).
  3) Open a terminal (ctl + alt + t) 
  4) Enable proposed[4] and update apport
  5) Create a fake subiquity crash file: sudo printf "Package: subiquity\nProblemType: crash\n" > /var/crash/test.crash
  6) authorize the collection of information
  7) Inspect the generated data. Ensure:
  	- The key LaunchpadPrivate exists
  	- There are no "permission denied" errors
  - Do NOT submit the report

  
  Server (Jammy or Noble):
  1) Download the latest Server ISO for the release you have chosen to verify (Noble[2] or Jammy[3]) 
  2) Begin an installation using the media you downloaded. You may progress the install as far as you like, with the following restrictions: (1) At minimum you need wait for the first screen to show up and (2) at most you may allow the install to finish but do not allow the system to restart (you need to be in the live-environment to proceed).
  3) Enter the debug shell (F2 or ctrl+z)
  4) Enable proposed[4] and update apport
  5) Run the following command "sudo APPORT_LAUNCHPAD_INSTANCE=qastaging ubuntu-bug subiquity" (sudo is required)
  6) Apport will ask for which matching application you want to report against. Select option 2, which should read "subiquity (1234 of snap /snap/subiquity/1234 of version $release_ver) deb package"
  7) Now apport should ask how you want to proceed. Select "S: Send report"
  8) Once the upload is complete, open the URL in a browser on another machine to complete the installation.
  9) Log in and enter anything as the title and hit continue. Click "No, I need to report a new bug" if necessary
  10) Enter anything in the "further information section". Ensure that the field below this section, titled "This bug contains information that is", is marked "Private" by default.
  11) You can now submit the bug and inspect the automatically filled description for further errors in the report. (Errors messages are typically short enough to show up in the body of the bug description while larger attachments with real information end up as attachments)

  
  [1] https://releases.ubuntu.com/noble/ubuntu-24.04-desktop-amd64.iso
  [2] https://releases.ubuntu.com/noble/ubuntu-24.04-live-server-amd64.iso
  [3] https://releases.ubuntu.com/jammy/ubuntu-22.04.4-live-server-amd64.iso
  [4] https://wiki.ubuntu.com/Testing/EnableProposed

  
  [Where Problems Could Occur]

  This update only makes changes to the file: /usr/share/apport/package-hooks/subiquity.py
  thus I only expect regressions in the form of Subiquity bug reporting failures. This code in this file is only ever executed as part of Subiquity's "package hook" and so should only regress behavior as part of data collection for subiquity bug reporting.

  Potential regressions:
  - The data collection for subiquity bugs could now crash, preventing users from submitting bugs manually via ubuntu-bug at all.
  - For Desktop, subiquity relies on the Whoopsie service picking up the automatic crash report written to /var/crash/ to get users to submit bug reports. Even though the report is populated, Whoopsie still runs the apport package hook and updates the report with missing information. Thus it's possible crashes in the package hook will prevent reporting of automatically generated crash reports which otherwise already had sufficient information. 

  
  [Other Info]

  - The fields starting with "lsusb" may report an error with exit code
  1 when run on a QEMU VM. This is acceptable.

  Potential questions:

  - Q: Jammy and Noble have already released, how will users get this update?
    A: There is still one more point release for Jammy and the upcoming .1 release for Noble, wherein the ISO builds will pick up the newly SRU'd version. (It's possible a user could manually update apport, but I don't expect users to know or need to do this)
    
  - Q: Why is sudo necessary on Server?
  - A: Due to a bug in Subiquity's debug shell, it is required to run ubuntu-bug with sudo to pick up the correct hook (outside of the snap).


  [ Original Description ]
  The Subiquity package hook in Apport has not been updated to collect the type of information we are typically interested in (e.g. /var/log/installer/subiquity-*).

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apport/+bug/2067775/+subscriptions




More information about the Ubuntu-sponsors mailing list