[Bug 1958668] Re: Do not propose to reboot on WSL
Eduard Gómez Escandell
1958668 at bugs.launchpad.net
Wed Jul 20 09:19:17 UTC 2022
** Description changed:
[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-release-upgrade will signal the Ubuntu WSL launcher to shutdown WSL right after closing
[Test Plan]
- - Open ubuntu WSL
- - Run do-release-upgrade -p
- - Old behaviour: Error message:
- "System has not been booted with systemd as init system (PID 1). Can't operate."
+ - Download "Ubuntu 22.04 LTS" from Microsoft Store
+ - Open "Ubuntu 22.04 LTS"
+ - Modify "/etc/update-manager/release-upgrades" to say "Prompt=normal"
+ - Enable the proposed pocket
+ - Update and upgrade via apt
+ - Run "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:
+ - New behaviour: At the very end:
1. You'll be asked to close all other instances of Ubuntu WSL.
2. File /proc/sys/fs/binfmt_misc/WSLInterop will be created with contents
"action: reboot"
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]
- The launcher involvement is needed because WSL doesn't shut down when
all instances of a distro are closed. Rather, it waits for around ten
seconds. The launcher is in charge of forcing this shutdown. The reboot
is automatic when opening a new instance.
- - Step 1 in the "Test Plan > New behaviour" part is purely for user-experience, it is unnecessary otherwise. When Ubuntu WSL shuts down, all open instances will show an error message and stop working. We ask users to close other instances:
- - To hide the expected error message from them, so as not to worry them.
- - To ensure no unsaved work is open in one of the open instances, hence avoiding
- data loss.
-
- A sufficiently new version of the launcher is needed for the forced shutdown to
occur. It is currently only with the Github version, but it'll be part of store
versions from the next release onwards.
** Description changed:
[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-release-upgrade will signal the Ubuntu WSL launcher to shutdown WSL right after closing
[Test Plan]
- Download "Ubuntu 22.04 LTS" from Microsoft Store
- Open "Ubuntu 22.04 LTS"
- Modify "/etc/update-manager/release-upgrades" to say "Prompt=normal"
- Enable the proposed pocket
- Update and upgrade via apt
- Run "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 /proc/sys/fs/binfmt_misc/WSLInterop will be created with contents
+ 2. File /run/launcher-command will be created with contents
"action: reboot"
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]
- The launcher involvement is needed because WSL doesn't shut down when
all instances of a distro are closed. Rather, it waits for around ten
seconds. The launcher is in charge of forcing this shutdown. The reboot
is automatic when opening a new instance.
- A sufficiently new version of the launcher is needed for the forced shutdown to
occur. It is currently only with the Github version, but it'll be part of store
versions from the next release onwards.
** Description changed:
[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-release-upgrade will signal the Ubuntu WSL launcher to shutdown WSL right after closing
[Test Plan]
- Download "Ubuntu 22.04 LTS" from Microsoft Store
- Open "Ubuntu 22.04 LTS"
- Modify "/etc/update-manager/release-upgrades" to say "Prompt=normal"
- Enable the proposed pocket
- Update and upgrade via apt
- - Run "do-release-upgrade -d", and say yes to all prompts
+ - 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-command will be created with contents
"action: reboot"
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]
- The launcher involvement is needed because WSL doesn't shut down when
all instances of a distro are closed. Rather, it waits for around ten
seconds. The launcher is in charge of forcing this shutdown. The reboot
is automatic when opening a new instance.
- A sufficiently new version of the launcher is needed for the forced shutdown to
occur. It is currently only with the Github version, but it'll be part of store
versions from the next release onwards.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ubuntu-release-upgrader in
Ubuntu.
https://bugs.launchpad.net/bugs/1958668
Title:
Do not propose to reboot on WSL
Status in ubuntu-release-upgrader package in Ubuntu:
Fix Released
Status in ubuntu-release-upgrader source package in Jammy:
Fix Committed
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-release-upgrade will signal the Ubuntu WSL launcher to shutdown WSL right after closing
[Test Plan]
- Download "Ubuntu 22.04 LTS" from Microsoft Store
- Open "Ubuntu 22.04 LTS"
- Modify "/etc/update-manager/release-upgrades" to say "Prompt=normal"
- 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-command will be created with contents
"action: reboot"
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]
- The launcher involvement is needed because WSL doesn't shut down
when all instances of a distro are closed. Rather, it waits for around
ten seconds. The launcher is in charge of forcing this shutdown. The
reboot is automatic when opening a new instance.
- A sufficiently new version of the launcher is needed for the forced shutdown to
occur. It is currently only with the Github version, but it'll be part of store
versions from the next release onwards.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1958668/+subscriptions
More information about the foundations-bugs
mailing list