diff --git a/pageserver/src/config.rs b/pageserver/src/config.rs index d6fdb93106..f6c51bb4b8 100644 --- a/pageserver/src/config.rs +++ b/pageserver/src/config.rs @@ -15,7 +15,7 @@ use zenith_utils::zid::{ZNodeId, ZTenantId, ZTimelineId}; use std::convert::TryInto; use std::env; -use std::fs::OpenOptions; +use std::fs::{File, OpenOptions}; use std::io::Write; use std::num::{NonZeroU32, NonZeroUsize}; use std::path::{Path, PathBuf}; @@ -193,6 +193,12 @@ impl BuilderValue { bail!("Could not write all the metadata bytes in a single call"); } file.sync_all()?; + let tenant_dir = File::open( + &path + .parent() + .expect("Tetant config should always have a parent dir"), + )?; + tenant_dir.sync_all()?; Ok(()) }