logging(disks): Propogate storage disk init error, improve logging (#1825)

Co-authored-by: houseme <housemecn@gmail.com>
This commit is contained in:
evan slack
2026-02-15 02:28:07 -05:00
committed by GitHub
parent e41ddad003
commit 2093a13308
2 changed files with 43 additions and 13 deletions
+9 -6
View File
@@ -217,7 +217,7 @@ impl ECStore {
let mut times = 0;
let mut interval = 1;
loop {
if let Ok(fm) = store_init::connect_load_init_formats(
match store_init::connect_load_init_formats(
first_is_local,
&disks,
pool_eps.set_count,
@@ -226,15 +226,18 @@ impl ECStore {
)
.await
{
break fm;
Ok(fm) => break Ok(fm),
// Wrap the final error if we are giving up
Err(e) if times >= 10 => {
break Err(Error::other(format!("can not get formats after {} retries, last error: {e}", times)));
}
// Retrying so just drop the error
Err(_) => {}
}
times += 1;
if interval < 16 {
interval *= 2;
}
if times > 10 {
return Err(Error::other("can not get formats"));
}
info!("retrying get formats after {:?}", interval);
select! {
_ = tokio::signal::ctrl_c() => {
@@ -245,7 +248,7 @@ impl ECStore {
}
}
}
};
}?;
if deployment_id.is_none() {
deployment_id = Some(fm.id);