mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-25 13:36:50 +00:00
Generated
-1
@@ -2242,7 +2242,6 @@ dependencies = [
|
|||||||
"protobuf",
|
"protobuf",
|
||||||
"protos",
|
"protos",
|
||||||
"rmp-serde",
|
"rmp-serde",
|
||||||
"router",
|
|
||||||
"s3s",
|
"s3s",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
|
|||||||
@@ -104,7 +104,11 @@ pub async fn get_local_server_property() -> ServerProperties {
|
|||||||
let mut pool_numbers = HashSet::new();
|
let mut pool_numbers = HashSet::new();
|
||||||
let mut network = HashMap::new();
|
let mut network = HashMap::new();
|
||||||
|
|
||||||
for ep in GLOBAL_Endpoints.read().await.as_ref().iter() {
|
let endpoints = match GLOBAL_Endpoints.get() {
|
||||||
|
Some(eps) => eps,
|
||||||
|
None => return ServerProperties::default(),
|
||||||
|
};
|
||||||
|
for ep in endpoints.as_ref().iter() {
|
||||||
for endpoint in ep.endpoints.as_ref().iter() {
|
for endpoint in ep.endpoints.as_ref().iter() {
|
||||||
let node_name = match endpoint.url.host_str() {
|
let node_name = match endpoint.url.host_str() {
|
||||||
Some(s) => s.to_string(),
|
Some(s) => s.to_string(),
|
||||||
|
|||||||
+11
-7
@@ -171,7 +171,7 @@ pub struct PoolSpaceInfo {
|
|||||||
impl ECStore {
|
impl ECStore {
|
||||||
pub async fn status(&self, idx: usize) -> Result<PoolStatus> {
|
pub async fn status(&self, idx: usize) -> Result<PoolStatus> {
|
||||||
let space_info = self.get_decommission_pool_space_info(idx).await?;
|
let space_info = self.get_decommission_pool_space_info(idx).await?;
|
||||||
let mut pool_info = self.pool_meta.pools[idx].clone();
|
let mut pool_info = self.pool_meta.read().unwrap().pools[idx].clone();
|
||||||
if let Some(d) = pool_info.decommission.as_mut() {
|
if let Some(d) = pool_info.decommission.as_mut() {
|
||||||
d.total_size = space_info.total;
|
d.total_size = space_info.total;
|
||||||
d.current_size = space_info.free;
|
d.current_size = space_info.free;
|
||||||
@@ -217,7 +217,7 @@ impl ECStore {
|
|||||||
return Err(Error::new(StorageError::DecommissionNotStarted));
|
return Err(Error::new(StorageError::DecommissionNotStarted));
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.pool_meta.decommission_cancel(idx) {
|
if self.pool_meta.write().unwrap().decommission_cancel(idx) {
|
||||||
// FIXME:
|
// FIXME:
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -225,11 +225,15 @@ impl ECStore {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn _get_total_usable_capacity(disks: &Vec<StorageDisk>, _info: &StorageInfo) -> usize {
|
fn get_total_usable_capacity(disks: &Vec<StorageDisk>, info: &StorageInfo) -> usize {
|
||||||
for _disk in disks.iter() {
|
let mut capacity = 0;
|
||||||
// if disk.pool_index < 0 || info.backend.standard_scdata.len() <= disk.pool_index {
|
for disk in disks.iter() {
|
||||||
// continue;
|
if disk.pool_index < 0 || info.backend.standard_sc_data.len() <= disk.pool_index as usize {
|
||||||
// }
|
continue;
|
||||||
|
}
|
||||||
|
if (disk.disk_index as usize) < info.backend.standard_sc_data[disk.pool_index as usize] {
|
||||||
|
capacity += disk.total_space as usize;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
capacity
|
capacity
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ pub struct ProcInfo {
|
|||||||
username: String,
|
username: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_proc_info(addr: &str) -> ProcInfo {
|
pub fn get_proc_info(_addr: &str) -> ProcInfo {
|
||||||
ProcInfo::default()
|
ProcInfo::default()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,6 @@ matchit = "0.8.4"
|
|||||||
shadow-rs = "0.35.2"
|
shadow-rs = "0.35.2"
|
||||||
const-str = { version = "0.5.7", features = ["std", "proc"] }
|
const-str = { version = "0.5.7", features = ["std", "proc"] }
|
||||||
atoi = "2.0.0"
|
atoi = "2.0.0"
|
||||||
serde.workspace = true
|
|
||||||
serde_urlencoded = "0.7.1"
|
serde_urlencoded = "0.7.1"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
mod admin;
|
mod admin;
|
||||||
mod config;
|
mod config;
|
||||||
mod grpc;
|
mod grpc;
|
||||||
|
#[allow(dead_code)]
|
||||||
mod peer_rest_client;
|
mod peer_rest_client;
|
||||||
mod service;
|
mod service;
|
||||||
mod storage;
|
mod storage;
|
||||||
|
|||||||
@@ -531,7 +531,7 @@ impl PeerRestClient {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn signal_service(&self, sig: u64, sub_sys: &str, dry_run: bool, exec_at: SystemTime) -> Result<()> {
|
pub async fn signal_service(&self, sig: u64, sub_sys: &str, dry_run: bool, _exec_at: SystemTime) -> Result<()> {
|
||||||
let mut client = node_service_time_out_client(&self.addr)
|
let mut client = node_service_time_out_client(&self.addr)
|
||||||
.await
|
.await
|
||||||
.map_err(|err| Error::msg(err.to_string()))?;
|
.map_err(|err| Error::msg(err.to_string()))?;
|
||||||
@@ -575,14 +575,14 @@ impl PeerRestClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub async fn get_metacache_listing(&self) -> Result<()> {
|
pub async fn get_metacache_listing(&self) -> Result<()> {
|
||||||
let mut client = node_service_time_out_client(&self.addr)
|
let mut _client = node_service_time_out_client(&self.addr)
|
||||||
.await
|
.await
|
||||||
.map_err(|err| Error::msg(err.to_string()))?;
|
.map_err(|err| Error::msg(err.to_string()))?;
|
||||||
todo!()
|
todo!()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn update_metacache_listing(&self) -> Result<()> {
|
pub async fn update_metacache_listing(&self) -> Result<()> {
|
||||||
let mut client = node_service_time_out_client(&self.addr)
|
let mut _client = node_service_time_out_client(&self.addr)
|
||||||
.await
|
.await
|
||||||
.map_err(|err| Error::msg(err.to_string()))?;
|
.map_err(|err| Error::msg(err.to_string()))?;
|
||||||
todo!()
|
todo!()
|
||||||
@@ -639,7 +639,7 @@ impl PeerRestClient {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn load_transition_tier_config(&self, start_rebalance: bool) -> Result<()> {
|
pub async fn load_transition_tier_config(&self) -> Result<()> {
|
||||||
let mut client = node_service_time_out_client(&self.addr)
|
let mut client = node_service_time_out_client(&self.addr)
|
||||||
.await
|
.await
|
||||||
.map_err(|err| Error::msg(err.to_string()))?;
|
.map_err(|err| Error::msg(err.to_string()))?;
|
||||||
|
|||||||
Reference in New Issue
Block a user