add tick check disk

Signed-off-by: junxiang Mu <1948535941@qq.com>
This commit is contained in:
junxiang Mu
2024-12-18 10:52:23 +08:00
parent f472c16e8a
commit e95318092c
4 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -762,7 +762,7 @@ impl DiskAPI for LocalDisk {
self.endpoint.host_port()
}
async fn is_online(&self) -> bool {
true
self.check_format_json().await.is_ok()
}
fn endpoint(&self) -> Endpoint {
+2 -1
View File
@@ -1238,6 +1238,7 @@ impl SetDisks {
for (i, opdisk) in disks.iter().enumerate() {
if let Some(disk) = opdisk {
if disk.is_online().await && disk.get_disk_location().set_idx.is_some() {
info!("Disk {:?} is online", disk);
continue;
}
@@ -1245,6 +1246,7 @@ impl SetDisks {
}
if let Some(endpoint) = self.set_endpoints.get(i) {
info!("will renew disk, opdisk: {:?}", opdisk);
self.renew_disk(endpoint).await;
}
}
@@ -2901,7 +2903,6 @@ impl SetDisks {
info!("ns_scanner start");
let _ = join_all(futures).await;
drop(buckets_results_tx);
info!("1");
let _ = task.await;
info!("ns_scanner completed");
Ok(())
+1
View File
@@ -612,6 +612,7 @@ impl StorageAPI for Sets {
res.after.drives.push(v.clone());
}
if DiskError::UnformattedDisk.count_errs(&errs) == 0 {
info!("disk formats success, NoHealRequired, errs: {:?}", errs);
return Ok((res, Some(Error::new(DiskError::NoHealRequired))));
}
+1
View File
@@ -1935,6 +1935,7 @@ impl StorageAPI for ECStore {
r.after.drives.append(&mut result.after.drives);
}
if count_no_heal == self.pools.len() {
info!("heal format success, NoHealRequired");
return Ok((r, Some(Error::new(DiskError::NoHealRequired))));
}
info!("heal format success result: {:?}", r);