Exclude image preparation from client startup deadline
This commit is contained in:
parent
8334fd379f
commit
55eed08db7
1 changed files with 106 additions and 22 deletions
|
|
@ -157,8 +157,22 @@ impl CoordinatorClientBackend {
|
|||
let mut child = child_broker()
|
||||
.spawn_bootstrap(&target, File::from(reader))
|
||||
.map_err(failure)?;
|
||||
match child.acquisition_status().map_err(failure)? {
|
||||
match child.bootstrap_status().map_err(failure)? {
|
||||
b'L' => {
|
||||
match child.bootstrap_status().map_err(failure)? {
|
||||
b'R' => {}
|
||||
b'E' => {
|
||||
let result = child.reap().map_err(failure)?;
|
||||
return Err(failure(format!(
|
||||
"Host Coordinator refused image preparation with {result:?}"
|
||||
)));
|
||||
}
|
||||
_ => {
|
||||
return Err(failure(
|
||||
"Host Coordinator sent an invalid image-preparation status",
|
||||
));
|
||||
}
|
||||
}
|
||||
self.coordinator = Some(child);
|
||||
self.bootstrap_owner = Some(writer);
|
||||
Ok(BootstrapAcquisition::Leader)
|
||||
|
|
@ -205,7 +219,16 @@ impl CoordinatorClientBackend {
|
|||
} else {
|
||||
None
|
||||
};
|
||||
let mut observer = DomainObservation::new(initial_path, SystemObservationClock::start());
|
||||
let startup_timeout = self
|
||||
.command
|
||||
.as_ref()
|
||||
.ok_or_else(|| ClientError::Backend(failure("client command was not validated")))?
|
||||
.startup_timeout;
|
||||
let mut observer = DomainObservation::new(
|
||||
initial_path,
|
||||
SystemObservationClock::start(),
|
||||
startup_timeout,
|
||||
);
|
||||
let mut waiter_transfer = None;
|
||||
loop {
|
||||
let (state, endpoint) = match self.discover().map_err(ClientError::Backend)? {
|
||||
|
|
|
|||
Loading…
Reference in a new issue