aboutsummaryrefslogtreecommitdiff
path: root/src/membership.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-04-21 14:07:15 +0000
committerAlex Auvolat <alex@adnab.me>2020-04-21 14:08:28 +0000
commitbe0a2bae8112de1d4674767c5c60e296c28e8532 (patch)
tree84211f371693c9085caf6bf27c6bae715dbdd599 /src/membership.rs
parentcc4f2f1cfb30e3995edf3c1174bd06b4bc0a9bf1 (diff)
downloadgarage-be0a2bae8112de1d4674767c5c60e296c28e8532.tar.gz
garage-be0a2bae8112de1d4674767c5c60e296c28e8532.zip
Add node tags in configuration
Diffstat (limited to 'src/membership.rs')
-rw-r--r--src/membership.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/membership.rs b/src/membership.rs
index 6f6dd47d..89b0fd67 100644
--- a/src/membership.rs
+++ b/src/membership.rs
@@ -69,6 +69,7 @@ pub struct NetworkConfig {
pub struct NetworkConfigEntry {
pub datacenter: String,
pub n_tokens: u32,
+ pub tag: String,
}
pub struct System {
@@ -248,7 +249,8 @@ fn read_network_config(metadata_dir: &PathBuf) -> Result<NetworkConfig, Error> {
let mut net_config_bytes = vec![];
file.read_to_end(&mut net_config_bytes)?;
- let net_config = rmp_serde::decode::from_read_ref(&net_config_bytes[..])?;
+ let net_config = rmp_serde::decode::from_read_ref(&net_config_bytes[..])
+ .expect("Unable to parse network configuration file (has version format changed?).");
Ok(net_config)
}