From d4d730e5894b6c9e918d9079dbf3e6d46aae7146 Mon Sep 17 00:00:00 2001 From: Hannes Laimer Date: Wed, 4 May 2022 05:49:06 +0000 Subject: [PATCH] proxy: rrd: skip update disk stats for offline datastores RDD update did not use lookup_datastore() and therefore bypassed the maintenance mode checks. This adds the needed check directly. Signed-off-by: Hannes Laimer --- src/bin/proxmox-backup-proxy.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/bin/proxmox-backup-proxy.rs b/src/bin/proxmox-backup-proxy.rs index 6a305b7c..c71d0009 100644 --- a/src/bin/proxmox-backup-proxy.rs +++ b/src/bin/proxmox-backup-proxy.rs @@ -1071,6 +1071,12 @@ fn generate_host_stats_sync() { .unwrap_or_default(); for config in datastore_list { + if config + .get_maintenance_mode() + .map_or(false, |mode| mode.check(Some(Operation::Read)).is_err()) + { + continue; + } let rrd_prefix = format!("datastore/{}", config.name); let path = std::path::Path::new(&config.path); gather_disk_stats(disk_manager.clone(), path, &rrd_prefix);