Explain active Domain maintenance contention

This commit is contained in:
ms2k 2026-07-21 22:41:46 +09:00
commit b288e77ed0

View file

@ -50,7 +50,13 @@ pub fn run_command(command: StateCommand) -> Result<i32, Box<dyn std::error::Err
return Err("reset target is not an exact configured persistent container path".into());
}
let root = configuration.persistent_domain_root().open_authority()?;
let lock = try_exclusive_flock(open_private_domain_lock(&root)?)?;
let lock = match try_exclusive_flock(open_private_domain_lock(&root)?) {
Ok(lock) => lock,
Err(error) if error.kind() == io::ErrorKind::WouldBlock => {
return Err("Domain state is busy; exit active Lazaret sessions or wait for another maintenance command to finish, then retry".into());
}
Err(error) => return Err(error.into()),
};
let database = match openat2(
root.as_fd(),
"domain.redb",