aboutsummaryrefslogtreecommitdiff
path: root/src/garage/server.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2024-01-16 12:12:27 +0100
committerAlex Auvolat <alex@adnab.me>2024-01-16 12:12:27 +0100
commit4c5be79b8015510618ad1df7451c50e3f2659978 (patch)
tree09f2dbdd30f8464c2d1f27532a690a46258aedb9 /src/garage/server.rs
parentd91a1de7315373271bce72088a4c73007f2154e8 (diff)
parent083e982f5fd0e88e496da7d67734abd8927f3f98 (diff)
downloadgarage-4c5be79b8015510618ad1df7451c50e3f2659978.tar.gz
garage-4c5be79b8015510618ad1df7451c50e3f2659978.zip
Merge tag 'v0.8.5' into sync-08-09
Garage v0.8.5 This minor release includes the following improvements and fixes: New features: - Configuration: make LMDB's `map_size` configurable and make `block_size` and `sled_cache_capacity` expressable as strings (such as `10M`) (#628, #630) - Add support for binding to Unix sockets for the S3, K2V, Admin and Web API servers (#640) - Move the `convert_db` command into the main Garage binary (#645) - Add support for specifying RPC secret and admin tokens as environment variables (#643) - Add `allow_world_readable_secrets` option to config file (#663, #685) Bug fixes: - Use `statvfs` instead of mount list to determine free space in metadata/data directories (#611, #631) - Add missing casts to fix 32-bit build (#632) - Fix error when none of the HTTP servers (S3/K2V/Admin/Web) is started and fix shutdown hang (#613, #633) - Add missing CORS headers to PostObject response (#609, #656) - Monitoring: finer histogram boundaries in Prometheus exported metrics (#531, #686) Other: - Documentation improvements (#641)
Diffstat (limited to 'src/garage/server.rs')
-rw-r--r--src/garage/server.rs13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/garage/server.rs b/src/garage/server.rs
index 3ad10b72..ac76a44d 100644
--- a/src/garage/server.rs
+++ b/src/garage/server.rs
@@ -15,9 +15,9 @@ use garage_web::WebServer;
use garage_api::k2v::api_server::K2VApiServer;
use crate::admin::*;
+use crate::secrets::{fill_secrets, Secrets};
#[cfg(feature = "telemetry-otlp")]
use crate::tracing_setup::*;
-use crate::{fill_secrets, Secrets};
async fn wait_from(mut chan: watch::Receiver<bool>) {
while !*chan.borrow() {
@@ -29,12 +29,19 @@ async fn wait_from(mut chan: watch::Receiver<bool>) {
pub async fn run_server(config_file: PathBuf, secrets: Secrets) -> Result<(), Error> {
info!("Loading configuration...");
- let config = fill_secrets(read_config(config_file)?, secrets);
+ let config = fill_secrets(read_config(config_file)?, secrets)?;
// ---- Initialize Garage internals ----
#[cfg(feature = "metrics")]
- let metrics_exporter = opentelemetry_prometheus::exporter().init();
+ let metrics_exporter = opentelemetry_prometheus::exporter()
+ .with_default_summary_quantiles(vec![0.25, 0.5, 0.75, 0.9, 0.95, 0.99])
+ .with_default_histogram_boundaries(vec![
+ 0.001, 0.0015, 0.002, 0.003, 0.005, 0.007, 0.01, 0.015, 0.02, 0.03, 0.05, 0.07, 0.1,
+ 0.15, 0.2, 0.3, 0.5, 0.7, 1., 1.5, 2., 3., 5., 7., 10., 15., 20., 30., 40., 50., 60.,
+ 70., 100.,
+ ])
+ .init();
info!("Initializing Garage main data store...");
let garage = Garage::new(config.clone())?;