Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Windows Installer patch to avoid unrequested reboots #24827

Merged
merged 5 commits into from
Dec 13, 2024

Conversation

l0rd
Copy link
Member

@l0rd l0rd commented Dec 12, 2024

The problem

When upgrading from v5.3.1 to a new version on a Windows machine without WSL, the installer asks to reboot. This problem doesn't impact users because v5.3.1 is the last release, but it is blocking the release v5.3.2.

Why it happens

The ForceReboot action in the v5.3.1 package is executed during a "major upgrade" to a new version (if WSL is not installed).

Changes introduced by this PR

  • Fix the ForceReboot action condition to avoid it during updates
  • Add a Windows Installer patch for the already released v5.3.1 so that updates from that version don't trigger an unrequested reboot.
  • Bump the WiX version to 5.0.2
  • Add tests for upgrades to next version
  • Add tests for upgrades from v5.3.1 (minor upgrade)

⚠️ To build the Windows installer from this PR branch (to test the PR), build the v5.3.1 locally first because of this issue and change the Product ID in podman.wxs (as described in this PR contrib/win-installer/README.md preparation section).

This PR supersedes #24778

Reference: https://github.com/orgs/wixtoolset/discussions/8854
Fixes #24735

Does this PR introduce a user-facing change?

None

l0rd added 4 commits December 12, 2024 15:56
Adding a patch to the bundle so that the update from previous version
(v5.3.1) is a minor update, not a major one. A minor update prevents the
full uninstallation of v5.3.1 and an unrequested reboot of the machine.

Signed-off-by: Mario Loriedo <[email protected]>
When building an installer from main branch, and using it
to upgrade the latest Podman release on Windows, a reboot
is triggered if WSL is not installed.

This is a regression caused by an update of the condition
to execute `ForceReboot`.

This commit fixes the condition and updates some defaults
to make it even more unlikely that reboot happens withtout
a specific user request for it.

It doesn't fix the v5.3.1 to v5.3.2 upgrade though. v5.3.1
has been released already and this commit doesn't avoid that it
triggers a reboot when updated.

Signed-off-by: Mario Loriedo <[email protected]>
For some reason, after upgrading to WiX v5, the forceReboot action
appeared before the Dism actions in the msi InstallExecuteSequence
table. As a consequence the user was asked to reboot before WSL or
Hyper-V installation and to reboot a second time after their
installation.

To avoid that the ForceReboot action field `Before=StopServices` is
replaced with `After=DismX86`

Signed-off-by: Mario Loriedo <[email protected]>
Copy link
Contributor

openshift-ci bot commented Dec 12, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: l0rd

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 12, 2024
@l0rd l0rd force-pushed the win-installer-patch branch from c071db0 to 78f37fe Compare December 12, 2024 15:57
This reverts commit 916b805.

Signed-off-by: Mario Loriedo <[email protected]>
@l0rd l0rd force-pushed the win-installer-patch branch from 78f37fe to 5f79cd3 Compare December 12, 2024 16:49
@l0rd
Copy link
Member Author

l0rd commented Dec 13, 2024

@inknos @lsm5 @containers/podman-maintainers PTAL

@l0rd
Copy link
Member Author

l0rd commented Dec 13, 2024

cc @n1hility if you have the chance to give it a look.

@Luap99
Copy link
Member

Luap99 commented Dec 13, 2024

I cannot really review any of these changes but please mark this as Fixes #24735 so this PR will be properly linked and the issue will be closed.

@baude
Copy link
Member

baude commented Dec 13, 2024

not a wix SME but LGTM

@baude
Copy link
Member

baude commented Dec 13, 2024

/cherry-pick v5.3

@openshift-cherrypick-robot
Copy link
Collaborator

@baude: once the present PR merges, I will cherry-pick it on top of v5.3 in a new PR and assign it to you.

In response to this:

/cherry-pick v5.3

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@mheon
Copy link
Member

mheon commented Dec 13, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 13, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit f325054 into containers:main Dec 13, 2024
88 checks passed
@openshift-cherrypick-robot
Copy link
Collaborator

@baude: new pull request created: #24840

In response to this:

/cherry-pick v5.3

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. release-note-none
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The Windows installer triggers a reboot when upgrading from 5.3.1 and WSL is not installed
5 participants