krata: rework xenstore watch for reliability

This commit is contained in:
Alex Zenla
2024-03-23 08:46:20 +00:00
parent 3d5095c78b
commit 7b2de22320
4 changed files with 64 additions and 35 deletions

View File

@ -247,7 +247,8 @@ impl Runtime {
.await?
.ok_or_else(|| anyhow!("unable to resolve guest: {}", uuid))?;
let path = format!("/local/domain/{}/krata/guest/exit-code", info.domid);
let handle = context.xen.store.watch(&path).await?;
let handle = context.xen.store.create_watch().await?;
context.xen.store.bind_watch(&handle, &path).await?;
let watch = ExitCodeWatch {
handle,
sender,