aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/system.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-02-18 20:39:55 +0100
committerAlex Auvolat <alex@adnab.me>2022-03-14 10:52:30 +0100
commitbb04d94fa92740eebeee513030faf136bfd26da7 (patch)
tree5e353982171819f00f03211855baef078156964b /src/rpc/system.rs
parent8c2fb0c066af7f68fdcfcdec96fa030af059bf63 (diff)
downloadgarage-bb04d94fa92740eebeee513030faf136bfd26da7.tar.gz
garage-bb04d94fa92740eebeee513030faf136bfd26da7.zip
Update to Netapp 0.4 which supports distributed tracing
Diffstat (limited to 'src/rpc/system.rs')
-rw-r--r--src/rpc/system.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/rpc/system.rs b/src/rpc/system.rs
index c8fc0ad5..2123a37f 100644
--- a/src/rpc/system.rs
+++ b/src/rpc/system.rs
@@ -38,6 +38,9 @@ const DISCOVERY_INTERVAL: Duration = Duration::from_secs(60);
const STATUS_EXCHANGE_INTERVAL: Duration = Duration::from_secs(10);
const PING_TIMEOUT: Duration = Duration::from_secs(2);
+/// Version tag used for version check upon Netapp connection
+pub const GARAGE_VERSION_TAG: u64 = 0x6761726167650006; // garage 0x0006
+
/// RPC endpoint used for calls related to membership
pub const SYSTEM_RPC_PATH: &str = "garage_rpc/membership.rs/SystemRpc";
@@ -194,7 +197,10 @@ impl System {
) -> Arc<Self> {
let node_key =
gen_node_key(&config.metadata_dir).expect("Unable to read or generate node ID");
- info!("Node public key: {}", hex::encode(&node_key.public_key()));
+ info!(
+ "Node ID of this node: {}",
+ hex::encode(&node_key.public_key()[..8])
+ );
let persist_cluster_layout = Persister::new(&config.metadata_dir, "cluster_layout");
let persist_peer_list = Persister::new(&config.metadata_dir, "peer_list");
@@ -222,13 +228,7 @@ impl System {
let ring = Ring::new(cluster_layout, replication_factor);
let (update_ring, ring) = watch::channel(Arc::new(ring));
- if let Some(addr) = config.rpc_public_addr {
- println!("{}@{}", hex::encode(&node_key.public_key()), addr);
- } else {
- println!("{}", hex::encode(&node_key.public_key()));
- }
-
- let netapp = NetApp::new(network_key, node_key);
+ let netapp = NetApp::new(GARAGE_VERSION_TAG, network_key, node_key);
let fullmesh = FullMeshPeeringStrategy::new(
netapp.clone(),
config.bootstrap_peers.clone(),