proxmox-rrd: use syncfs after writing rrd files

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
This commit is contained in:
Dietmar Maurer
2021-10-18 13:45:30 +02:00
parent bd10af6eda
commit 98eb435d90
6 changed files with 31 additions and 2 deletions

View File

@ -30,7 +30,9 @@ use proxmox_rest_server::{
ServerAdapter, WorkerTask, cleanup_old_tasks,
};
use proxmox_backup::rrd_cache::{ rrd_update_gauge, rrd_update_derive, initialize_rrd_cache};
use proxmox_backup::rrd_cache::{
initialize_rrd_cache, rrd_update_gauge, rrd_update_derive, rrd_sync_journal,
};
use proxmox_backup::{
server::{
auth::check_pbs_auth,
@ -896,6 +898,8 @@ async fn run_stat_generator() {
generate_host_stats().await;
rrd_sync_journal();
tokio::time::sleep_until(tokio::time::Instant::from_std(delay_target)).await;
}