add env RUSTFS_ERASURE_SET_DRIVE_COUNT

This commit is contained in:
weisd
2024-10-05 12:33:39 +08:00
parent 10c63effd4
commit 46f7c010ca
14 changed files with 161 additions and 189 deletions
+9 -1
View File
@@ -22,7 +22,7 @@ use hyper_util::{
use protos::proto_gen::node_service::node_service_server::NodeServiceServer;
use s3s::{auth::SimpleAuth, service::S3ServiceBuilder};
use service::hybrid;
use std::{io::IsTerminal, net::SocketAddr, str::FromStr};
use std::{io::IsTerminal, net::SocketAddr, process::exit, str::FromStr};
use tokio::net::TcpListener;
use tonic::{metadata::MetadataValue, Request, Status};
use tracing::{debug, info};
@@ -93,6 +93,14 @@ async fn run(opt: config::Opt) -> Result<()> {
// 用于rpc
let (endpoint_pools, setup_type) = EndpointServerPools::from_volumes(opt.address.clone().as_str(), opt.volumes.clone())
.map_err(|err| Error::from_string(err.to_string()))?;
for (i, eps) in endpoint_pools.as_ref().iter().enumerate() {
debug!(
"created endpoints {}, set_count:{}, drives_per_set: {}, cmd: {:?}",
i, eps.set_count, eps.drives_per_set, eps.cmd_line
);
}
set_global_endpoints(endpoint_pools.as_ref().clone()).await;
update_erasure_type(setup_type).await;
-4
View File
@@ -1,11 +1,8 @@
use bytes::BufMut;
use bytes::Bytes;
use ecstore::bucket::get_bucket_metadata_sys;
use ecstore::bucket::metadata::BUCKET_TAGGING_CONFIG;
use ecstore::bucket::tags::Tags;
use ecstore::bucket_meta::BucketMetadata;
use ecstore::disk::error::DiskError;
use ecstore::disk::RUSTFS_META_BUCKET;
use ecstore::new_object_layer_fn;
use ecstore::store_api::BucketOptions;
use ecstore::store_api::CompletePart;
@@ -24,7 +21,6 @@ use http::HeaderMap;
use log::warn;
use s3s::dto::*;
use s3s::s3_error;
use s3s::Body;
use s3s::S3Error;
use s3s::S3ErrorCode;
use s3s::S3Result;