subiquity package-hook is outdated
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apport (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Unassigned | ||
Noble |
Fix Released
|
Undecided
|
Unassigned |
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/
[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_
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\
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_
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
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:/
[2] https:/
[3] https:/
[4] https:/
[Where Problems Could Occur]
This update only makes changes to the file: /usr/share/
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/
Related branches
- Benjamin Drung: Approve
- git-ubuntu import: Pending requested
-
Diff: 30 lines (+11/-1)2 files modifieddebian/changelog (+7/-0)
debian/package-hooks/subiquity.py (+4/-1)
- Benjamin Drung: Approve
-
Diff: 202 lines (+147/-38)2 files modifieddata/package-hooks/subiquity.py (+129/-38)
debian/changelog (+18/-0)
- Benjamin Drung: Approve
-
Diff: 192 lines (+132/-33)2 files modifieddebian/changelog (+18/-0)
debian/package-hooks/subiquity.py (+114/-33)
- Benjamin Drung: Approve
- Olivier Gayot (community): Approve
-
Diff: 156 lines (+72/-34)2 files modifieddebian/changelog (+15/-0)
debian/package-hooks/subiquity.py (+57/-34)
Changed in apport (Ubuntu): | |
status: | New → Fix Committed |
Changed in apport (Ubuntu Noble): | |
milestone: | none → ubuntu-24.04.1 |
Changed in apport (Ubuntu Jammy): | |
milestone: | none → ubuntu-22.04.5 |
In preparing the SRU uploads, I found that the pkexec permissions elevation can fail which caused the hook to crash. I will open a separate bug with the details, but I opened MP:#468177 to address the problem in the subiquity hook and included the relevant change in the SRU MPs.
Edit: I believe the "bug" was in the way I was adding a user to the machine with cloud-config. Switching to the pre-existing user on the machine allowed the permission elevation just fine. Although I still think the code change to handle this case is worthwhile.