Skip to content

Commit

Permalink
hide etcd pwd in logs
Browse files Browse the repository at this point in the history
  • Loading branch information
kwannoel committed Oct 24, 2023
1 parent 447e142 commit 6a4e3db
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/cmd_all/src/standalone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,11 @@ pub async fn standalone(opts: StandaloneOpts) -> Result<()> {
compactor_opts,
} = parse_opt_args(&opts);

if let Some(opts) = meta_opts {
if let Some(mut opts) = meta_opts {
let etcd_pwd = opts.etcd_password;
opts.etcd_password = String::from("*");
tracing::info!("starting meta-node thread with cli args: {:?}", opts);
opts.etcd_password = etcd_pwd;

let _meta_handle = tokio::spawn(async move {
risingwave_meta_node::start(opts).await;
Expand Down
3 changes: 2 additions & 1 deletion src/meta/node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#![cfg_attr(coverage, feature(no_coverage))]

mod server;

use std::time::Duration;

use clap::Parser;
Expand Down Expand Up @@ -71,7 +72,7 @@ pub struct MetaNodeOpts {

/// Password of etcd, required when --etcd-auth is enabled.
#[clap(long, env = "RW_ETCD_PASSWORD", default_value = "")]
etcd_password: String,
pub etcd_password: String,

/// Endpoint of the SQL service, make it non-option when SQL service is required.
#[clap(long, env = "RW_SQL_ENDPOINT")]
Expand Down

0 comments on commit 6a4e3db

Please sign in to comment.