aboutsummaryrefslogtreecommitdiff
path: root/src/garage/main.rs
diff options
context:
space:
mode:
authorAlex <alex@adnab.me>2024-01-16 13:33:43 +0000
committerAlex <alex@adnab.me>2024-01-16 13:33:43 +0000
commit9cfeea389a1274d4d3c1f4b7072b0c056af410ef (patch)
treed2e1b706c14f3c3461218cc659cd5c59d201bea8 /src/garage/main.rs
parent707d85f60293099e75e5aa821c0ee66796fdaa5b (diff)
parent82a29bf6e5bf3f0d616b3214db02eb063d7a15b4 (diff)
downloadgarage-9cfeea389a1274d4d3c1f4b7072b0c056af410ef.tar.gz
garage-9cfeea389a1274d4d3c1f4b7072b0c056af410ef.zip
Merge pull request 'CLI help, comments & messages: make clear that full-length node ID = public key' (#688) from rename-public-key into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/688
Diffstat (limited to 'src/garage/main.rs')
-rw-r--r--src/garage/main.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/garage/main.rs b/src/garage/main.rs
index 9f9eefed..5c92dae4 100644
--- a/src/garage/main.rs
+++ b/src/garage/main.rs
@@ -46,8 +46,7 @@ use secrets::Secrets;
about = "S3-compatible object store for self-hosted geo-distributed deployments"
)]
struct Opt {
- /// Host to connect to for admin operations, in the format:
- /// <public-key>@<ip>:<port>
+ /// Host to connect to for admin operations, in the format: <full-node-id>@<ip>:<port>
#[structopt(short = "h", long = "rpc-host", env = "GARAGE_RPC_HOST")]
pub rpc_host: Option<String>,
@@ -201,7 +200,7 @@ async fn cli_command(opt: Opt) -> Result<(), Error> {
// Find and parse the address of the target host
let (id, addr, is_default_addr) = if let Some(h) = opt.rpc_host {
- let (id, addrs) = parse_and_resolve_peer_addr(&h).ok_or_else(|| format!("Invalid RPC remote node identifier: {}. Expected format is <pubkey>@<IP or hostname>:<port>.", h))?;
+ let (id, addrs) = parse_and_resolve_peer_addr(&h).ok_or_else(|| format!("Invalid RPC remote node identifier: {}. Expected format is <full node id>@<IP or hostname>:<port>.", h))?;
(id, addrs[0], false)
} else {
let node_id = garage_rpc::system::read_node_id(&config.as_ref().unwrap().metadata_dir)
@@ -231,7 +230,7 @@ async fn cli_command(opt: Opt) -> Result<(), Error> {
addr
);
}
- Err(e).err_context("Unable to connect to destination RPC host. Check that you are using the same value of rpc_secret as them, and that you have their correct public key.")?;
+ Err(e).err_context("Unable to connect to destination RPC host. Check that you are using the same value of rpc_secret as them, and that you have their correct full-length node ID (public key).")?;
}
let system_rpc_endpoint = netapp.endpoint::<SystemRpc, ()>(SYSTEM_RPC_PATH.into());