Skip to content

Commit f2f757c

Browse files
committed
fix: improve metrics port helper
1 parent db1bcf8 commit f2f757c

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

  • rust/operator-binary/src/zk_controller/build/properties

rust/operator-binary/src/zk_controller/build/properties/zoo_cfg.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,12 @@ impl ValidatedCluster {
162162
/// Resolves the metrics HTTP port for the given role group, honoring a
163163
/// `metricsProvider.httpPort` `configOverride` if present.
164164
pub fn metrics_http_port(&self, rolegroup_config: &ZookeeperRoleGroupConfig) -> Port {
165-
// The metrics port is independent of the server.<myid> quorum entries.
166-
build_base(self, rolegroup_config)
165+
// Only a `configOverride` can change the metrics port; the seeded default and the
166+
// TLS/quorum settings never touch `metricsProvider.httpPort`.
167+
rolegroup_config
168+
.config_overrides
169+
.zoo_cfg
170+
.overrides
167171
.get(METRICS_PROVIDER_HTTP_PORT_KEY)
168172
.and_then(|port| port.parse::<u16>().ok())
169173
.map(Port::from)

0 commit comments

Comments
 (0)