Skip to content

Commit

Permalink
Use /ostree/deploy as canonical API for deployment monitoring
Browse files Browse the repository at this point in the history
Replaced the use of the systemd PathChanged property on
/ostree/repo/refs/heads/ostree/1/1 with /ostree/deploy, the canonical API
for monitoring deployment changes in ostree
  • Loading branch information
aaradhak committed Dec 12, 2024
1 parent 23adfa5 commit cca0826
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions mantle/kola/tests/upgrade/basic.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,10 @@ 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/repo/refs/heads/ostree/1/1 directory. refchanged.path
// will trigger when it gets updated and will then stop wait.service.
// /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
Expand All @@ -329,7 +331,7 @@ func waitForUpgradeToBeStaged(c cluster.TestCluster, m platform.Machine) {
//
// 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")
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")
}

Expand Down

0 comments on commit cca0826

Please sign in to comment.