Skip to content

Commit b0a7234

Browse files
yeputonskelvich
authored andcommitted
pageserver: fix stale default listen addrs
* In command line help * In dummy_conf
1 parent ddf4b15 commit b0a7234

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

pageserver/src/bin/pageserver.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,14 @@ use clap::{App, Arg, ArgMatches};
2020
use daemonize::Daemonize;
2121

2222
use pageserver::{
23-
branches, http, page_service, tenant_mgr, PageServerConf, RelishStorageConfig, S3Config,
24-
LOG_FILE_NAME,
23+
branches,
24+
defaults::{DEFAULT_HTTP_LISTEN_ADDR, DEFAULT_PG_LISTEN_ADDR},
25+
http, page_service, tenant_mgr, PageServerConf, RelishStorageConfig, S3Config, LOG_FILE_NAME,
2526
};
2627
use zenith_utils::http::endpoint;
2728

29+
use const_format::formatcp;
30+
2831
/// String arguments that can be declared via CLI or config file
2932
#[derive(Serialize, Deserialize)]
3033
struct CfgFileParams {
@@ -228,14 +231,14 @@ fn main() -> Result<()> {
228231
.long("listen-pg")
229232
.alias("listen") // keep some compatibility
230233
.takes_value(true)
231-
.help("listen for incoming page requests on ip:port (default: 127.0.0.1:5430)"),
234+
.help(formatcp!("listen for incoming page requests on ip:port (default: {DEFAULT_PG_LISTEN_ADDR})")),
232235
)
233236
.arg(
234237
Arg::with_name("listen-http")
235238
.long("listen-http")
236239
.alias("http_endpoint") // keep some compatibility
237240
.takes_value(true)
238-
.help("http endpoint address for metrics and management API calls ip:port (default: 127.0.0.1:5430)"),
241+
.help(formatcp!("http endpoint address for metrics and management API calls on ip:port (default: {DEFAULT_HTTP_LISTEN_ADDR})")),
239242
)
240243
.arg(
241244
Arg::with_name("daemonize")

pageserver/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ impl PageServerConf {
154154
checkpoint_period: Duration::from_secs(10),
155155
gc_horizon: defaults::DEFAULT_GC_HORIZON,
156156
gc_period: Duration::from_secs(10),
157-
listen_pg_addr: "127.0.0.1:5430".to_string(),
158-
listen_http_addr: "127.0.0.1:9898".to_string(),
157+
listen_pg_addr: defaults::DEFAULT_PG_LISTEN_ADDR.to_string(),
158+
listen_http_addr: defaults::DEFAULT_HTTP_LISTEN_ADDR.to_string(),
159159
superuser: "zenith_admin".to_string(),
160160
workdir: repo_dir,
161161
pg_distrib_dir: "".into(),

0 commit comments

Comments
 (0)