aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/membership.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/rpc/membership.rs')
-rw-r--r--src/rpc/membership.rs20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/rpc/membership.rs b/src/rpc/membership.rs
index 37cf8105..72477539 100644
--- a/src/rpc/membership.rs
+++ b/src/rpc/membership.rs
@@ -240,11 +240,21 @@ impl System {
let net_config = match persist_config.load() {
Ok(x) => x,
Err(e) => {
- info!(
- "No valid previous network configuration stored ({}), starting fresh.",
- e
- );
- NetworkConfig::new()
+ match Persister::<garage_rpc_021::ring::NetworkConfig>::new(
+ &metadata_dir,
+ "network_config",
+ )
+ .load()
+ {
+ Ok(old_config) => NetworkConfig::migrate_from_021(old_config),
+ Err(e2) => {
+ info!(
+ "No valid previous network configuration stored ({}, {}), starting fresh.",
+ e, e2
+ );
+ NetworkConfig::new()
+ }
+ }
}
};