Compare commits

..

1 Commits

Author SHA1 Message Date
Alex Auvolat 672ba550a8 Enable k2v feature flag in CI 2022-09-20 16:21:05 +02:00
6 changed files with 20 additions and 36 deletions
+11 -17
View File
@@ -15,24 +15,18 @@ Garage [![Build Status](https://drone.deuxfleurs.fr/api/badges/Deuxfleurs/garage
] ]
</p> </p>
Garage is an S3-compatible distributed object storage service Garage is a lightweight S3-compatible distributed object store, with the following goals:
designed for self-hosting at a small-to-medium scale.
Garage is designed for storage clusters composed of nodes running - As self-contained as possible
at different physical locations, - Easy to set up
in order to easily provide a storage service that replicates data at these different - Highly resilient to network failures, network latency, disk failures, sysadmin failures
locations and stays available even when some servers are unreachable. - Relatively simple
Garage also focuses on being lightweight, easy to operate, and highly resilient to - Made for multi-datacenter deployments
machine failures.
Garage is built by [Deuxfleurs](https://deuxfleurs.fr), Non-goals include:
an experimental small-scale self hosted service provider,
which has been using it in production since its first release in 2020.
Learn more on our dedicated documentation pages: - Extremely high performance
- Complete implementation of the S3 API
- Erasure coding (our replication model is simply to copy the data as is on several nodes, in different datacenters if possible)
- [Goals and use cases](https://garagehq.deuxfleurs.fr/documentation/design/goals/) Our main use case is to provide a distributed storage layer for small-scale self hosted services such as [Deuxfleurs](https://deuxfleurs.fr).
- [Features](https://garagehq.deuxfleurs.fr/documentation/reference-manual/features/)
- [Quick start](https://garagehq.deuxfleurs.fr/documentation/quick-start/)
Garage is entirely free software released under the terms of the AGPLv3.
+1 -1
View File
@@ -14,10 +14,10 @@ website.
Garage is an opinionated object storage solutoin, we focus on the following **desirable properties**: Garage is an opinionated object storage solutoin, we focus on the following **desirable properties**:
- **Internet enabled**: made for multi-sites (eg. datacenters, offices, households, etc.) interconnected through regular Internet connections.
- **Self-contained & lightweight**: works everywhere and integrates well in existing environments to target [hyperconverged infrastructures](https://en.wikipedia.org/wiki/Hyper-converged_infrastructure). - **Self-contained & lightweight**: works everywhere and integrates well in existing environments to target [hyperconverged infrastructures](https://en.wikipedia.org/wiki/Hyper-converged_infrastructure).
- **Highly resilient**: highly resilient to network failures, network latency, disk failures, sysadmin failures. - **Highly resilient**: highly resilient to network failures, network latency, disk failures, sysadmin failures.
- **Simple**: simple to understand, simple to operate, simple to debug. - **Simple**: simple to understand, simple to operate, simple to debug.
- **Internet enabled**: made for multi-sites (eg. datacenters, offices, households, etc.) interconnected through regular Internet connections.
We also noted that the pursuit of some other goals are detrimental to our initial goals. We also noted that the pursuit of some other goals are detrimental to our initial goals.
The following has been identified as **non-goals** (if these points matter to you, you should not use Garage): The following has been identified as **non-goals** (if these points matter to you, you should not use Garage):
+2 -2
View File
@@ -137,8 +137,8 @@ let
/* [2] */ hardeningDisable = [ "pie" ]; /* [2] */ hardeningDisable = [ "pie" ];
}; };
overrideArgs = old: { overrideArgs = old: {
/* [4] */ features = [ "bundled-libs" "sled" "metrics" ] /* [4] */ features = [ "bundled-libs" "sled" "k2v" ]
++ (if release then [ "kubernetes-discovery" "telemetry-otlp" "lmdb" "sqlite" ] else []); ++ (if release then [ "kubernetes-discovery" "telemetry-otlp" "metrics" "lmdb" "sqlite" ] else []);
}; };
}) })
+2 -5
View File
@@ -34,10 +34,7 @@ pub struct AdminApiServer {
} }
impl AdminApiServer { impl AdminApiServer {
pub fn new( pub fn new(garage: Arc<Garage>) -> Self {
garage: Arc<Garage>,
#[cfg(feature = "metrics")] exporter: PrometheusExporter,
) -> Self {
let cfg = &garage.config.admin; let cfg = &garage.config.admin;
let metrics_token = cfg let metrics_token = cfg
.metrics_token .metrics_token
@@ -50,7 +47,7 @@ impl AdminApiServer {
Self { Self {
garage, garage,
#[cfg(feature = "metrics")] #[cfg(feature = "metrics")]
exporter, exporter: opentelemetry_prometheus::exporter().init(),
metrics_token, metrics_token,
admin_token, admin_token,
} }
+3 -3
View File
@@ -607,7 +607,7 @@ impl BlockManagerLocked {
path2.set_extension("tmp"); path2.set_extension("tmp");
let mut f = fs::File::create(&path2).await?; let mut f = fs::File::create(&path2).await?;
f.write_all(data).await?; f.write_all(data).await?;
//f.sync_all().await?; f.sync_all().await?;
drop(f); drop(f);
fs::rename(path2, path).await?; fs::rename(path2, path).await?;
@@ -620,13 +620,13 @@ impl BlockManagerLocked {
// Now, we do an fsync on the containing directory, to ensure that the rename // Now, we do an fsync on the containing directory, to ensure that the rename
// is persisted properly. See: // is persisted properly. See:
// http://thedjbway.b0llix.net/qmail/syncdir.html // http://thedjbway.b0llix.net/qmail/syncdir.html
/*let dir = fs::OpenOptions::new() let dir = fs::OpenOptions::new()
.read(true) .read(true)
.mode(0) .mode(0)
.open(directory) .open(directory)
.await?; .await?;
dir.sync_all().await?; dir.sync_all().await?;
drop(dir);*/ drop(dir);
Ok(()) Ok(())
} }
+1 -8
View File
@@ -32,9 +32,6 @@ pub async fn run_server(config_file: PathBuf) -> Result<(), Error> {
// ---- Initialize Garage internals ---- // ---- Initialize Garage internals ----
#[cfg(feature = "metrics")]
let metrics_exporter = opentelemetry_prometheus::exporter().init();
info!("Initializing background runner..."); info!("Initializing background runner...");
let watch_cancel = netapp::util::watch_ctrl_c(); let watch_cancel = netapp::util::watch_ctrl_c();
let (background, await_background_done) = BackgroundRunner::new(16, watch_cancel.clone()); let (background, await_background_done) = BackgroundRunner::new(16, watch_cancel.clone());
@@ -53,11 +50,7 @@ pub async fn run_server(config_file: PathBuf) -> Result<(), Error> {
} }
info!("Initialize Admin API server and metrics collector..."); info!("Initialize Admin API server and metrics collector...");
let admin_server = AdminApiServer::new( let admin_server = AdminApiServer::new(garage.clone());
garage.clone(),
#[cfg(feature = "metrics")]
metrics_exporter,
);
info!("Launching internal Garage cluster communications..."); info!("Launching internal Garage cluster communications...");
let run_system = tokio::spawn(garage.system.clone().run(watch_cancel.clone())); let run_system = tokio::spawn(garage.system.clone().run(watch_cancel.clone()));