Do not propose to reboot on WSL
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-release-upgrader (Ubuntu) |
Fix Released
|
Low
|
Edu Gómez Escandell | ||
Jammy |
Fix Released
|
Medium
|
Brian Murray |
Bug Description
[Impact]
- On WSL, at the end of a do-release-upgrade, the upgrader proposes to reboot the machine. On WSL it is not possible to reboot due to the lack of systemd, thus this causes an error message to appear, and the reboot to not happen.
- The fix solves this by:
1. Not atemptiong to reboot
2. Asking the user to close the WSL instance
- Furthermore, if the Ubuntu WSL launcher is recent enough:
3. ubuntu-
[Test Plan]
UBUNTU TEST
- Modify "/etc/update-
- Enable the proposed pocket
- Update and upgrade via apt
- Run "sudo do-release-upgrade -d", and say yes to all prompts
- Update should complete without issues
WINDOWS TEST
- Download "Ubuntu 22.04 LTS" from Microsoft Store
- Open "Ubuntu 22.04 LTS"
- Modify "/etc/update-
- Enable the proposed pocket
- Update and upgrade via apt
- Run "sudo do-release-upgrade -d", and say yes to all prompts
- Old behaviour: At the very end it displays an error message indicating it failed to reboot.
- New behaviour: At the very end:
1. You'll be asked to close all other instances of Ubuntu WSL.
2. File /run/launcher-
3. You'll be asked to close the current instance of Ubuntu WSL.
4. If you have the store verion of Ubuntu WSL nothing else will happen.
If you have the latest version from the repository, Ubuntu WSL will
shutdown right after. You can validate it via:
A. Not complying in step 1, and seeing the other instances shut down.
B. Place some file in /tmp/ and see how it has been removed.
[Where problems could occur]
- Any change whatsoever in program behaviour on Ubuntu Desktop is undesired, especially if it prevents Ubuntu Desktop from rebooting.
- If the Ubuntu WSL instance that we upgarde from was started without the launcher (e.g via VS code, or with "wsl -d Ubuntu2204LTS"), the shutdown will not happen immediately, but rather be posponed until whichever comes first:
- All instances are closed for around 10 seconds
- A Ubuntu WSL instance started with the launcher is closed.
This could be a bit annoying for the user but it's not fatal.
[Other Info]
- A sufficiently new version of the launcher is needed for the forced shutdown to occur. It is currently only available with the Github version, but it'll be part of store versions from the next release onwards.
Related branches
- Ubuntu Core Development Team: Pending requested
-
Diff: 68 lines (+28/-3)3 files modifiedDistUpgrade/DistUpgradeController.py (+12/-3)
DistUpgrade/DistUpgradeView.py (+10/-0)
debian/changelog (+6/-0)
Changed in update-manager (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Low |
Changed in ubuntu-release-upgrader (Ubuntu): | |
status: | Triaged → In Progress |
assignee: | nobody → Eduard Gómez Escandell (edugomez) |
description: | updated |
description: | updated |
Changed in ubuntu-release-upgrader (Ubuntu Jammy): | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Brian Murray (brian-murray) |
description: | updated |
description: | updated |
description: | updated |
tags: |
added: verification-done verification-done-jammy removed: verification-needed verification-needed-jammy |
How can the upgrader detect that it is running on WSL?