Skip to content

Commit

Permalink
go formatted the file
Browse files Browse the repository at this point in the history
  • Loading branch information
aaradhak committed Dec 18, 2024
1 parent f25297a commit 168257b
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions mantle/kola/tests/upgrade/basic.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,25 +314,25 @@ func runFnAndWaitForRebootIntoVersion(c cluster.TestCluster, m platform.Machine,
}

func waitForUpgradeToBeStaged(c cluster.TestCluster, m platform.Machine) {
// Here we set up a systemd path unit to watch for when ostree
// behind the scenes updates the refs in the repo under the
// /ostree/deploy directory.
// Using /ostree/deploy as the canonical API for monitoring deployment changes.
// This path is updated by ostree for deployment changes.
// refchanged.path will trigger when it gets updated and will then stop wait.service.
// The systemd-run --wait causes it to not return here (and thus
// continue execution of code here) until wait.service has been
// stopped by refchanged.service. This is an effort to make us
// start waiting inside runFnAndWaitForRebootIntoVersion until
// later in the upgrade process because we are seeing failures due
// to timeouts and we're trying to reduce the variability by
// minimizing the wait inside that function to just the actual reboot.
// https://github.com/coreos/fedora-coreos-tracker/issues/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/deploy systemctl stop wait.service")
c.RunCmdSync(m, "sudo systemd-run --wait -u wait sleep infinity")
// Here we set up a systemd path unit to watch for when ostree
// behind the scenes updates the refs in the repo under the
// /ostree/deploy directory.
// Using /ostree/deploy as the canonical API for monitoring deployment changes.
// This path is updated by ostree for deployment changes.
// refchanged.path will trigger when it gets updated and will then stop wait.service.
// The systemd-run --wait causes it to not return here (and thus
// continue execution of code here) until wait.service has been
// stopped by refchanged.service. This is an effort to make us
// start waiting inside runFnAndWaitForRebootIntoVersion until
// later in the upgrade process because we are seeing failures due
// to timeouts and we're trying to reduce the variability by
// minimizing the wait inside that function to just the actual reboot.
// https://github.com/coreos/fedora-coreos-tracker/issues/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/deploy systemctl stop wait.service")
c.RunCmdSync(m, "sudo systemd-run --wait -u wait sleep infinity")
}

func waitForUpgradeToVersion(c cluster.TestCluster, m platform.Machine, version string) {
Expand Down

0 comments on commit 168257b

Please sign in to comment.