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

mantle/kola: Add function to enhance upgrade stability #3938

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aaradhak
Copy link
Member

This commit introduces the waitForUpgradeToBeStaged function to improve the stability of kola upgrade test by reducing timeout-related failures.
The new function sets up a systemd path unit to monitor updates in the /ostree/repo/refs/heads/ostree/1/1 directory, triggering a stop on wait.service once changes are detected.
By ensuring we wait later in the upgrade process, we minimize the waiting period in runFnAndWaitForRebootIntoVersion, focusing only on the actual reboot phase.

Author : Dusty Mabe dusty@dustymabe.com
Ref: coreos/fedora-coreos-tracker#1805

This commit introduces the `waitForUpgradeToBeStaged` function to
improve the stability of kola upgrade test by reducing timeout-related
failures.
The new function sets up a systemd path unit to monitor updates in the
`/ostree/repo/refs/heads/ostree/1/1` directory, triggering a stop on
`wait.service` once changes are detected.
By ensuring we wait later in the upgrade process, we minimize the
waiting period in `runFnAndWaitForRebootIntoVersion`, focusing
only on the actual reboot phase.

Author : Dusty Mabe <dusty@dustymabe.com>
Ref: coreos/fedora-coreos-tracker#1805
//
// Note: if systemd-run ever gains the ability to --wait when
// generating a path unit then the below can be simplified.
c.RunCmdSync(m, "sudo systemd-run -u refchanged --path-property=PathChanged=/ostree/repo/refs/heads/ostree/1/1 systemctl stop wait.service")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The canonical API for this is /ostree/deploy, which ostree touches whenever it changed the deployments exactly for the purpose of other things wanting to monitor changes:

https://github.com/ostreedev/ostree/blob/ab8a7f7855b0e0a7f3fe7214b77521268b994ce4/src/libostree/ostree-sysroot.c#L449

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

so we just need to change this to path-property=PathChanged=/ostree/deploy then and update the comment accordingly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants