Explain active Domain maintenance contention
This commit is contained in:
parent
d38357a65d
commit
b288e77ed0
1 changed files with 38 additions and 1 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in a new issue