Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: metrics http port not use zk helm chart values #457

Closed
MageChiu opened this issue Apr 6, 2022 · 1 comment
Closed

BUG: metrics http port not use zk helm chart values #457

MageChiu opened this issue Apr 6, 2022 · 1 comment

Comments

@MageChiu
Copy link
Contributor

MageChiu commented Apr 6, 2022

Description

The zk configuration was generated without using the provided metrics port configuration

func makeZkConfigString(z *v1beta1.ZookeeperCluster) string {
	ports := z.ZookeeperPorts()

	var zkConfig = ""
	for key, value := range z.Spec.Conf.AdditionalConfig {
		zkConfig = zkConfig + fmt.Sprintf("%s=%s\n", key, value)
	}
	return zkConfig + "4lw.commands.whitelist=cons, envi, conf, crst, srvr, stat, mntr, ruok\n" +
		"dataDir=/data\n" +
		"standaloneEnabled=false\n" +
		"reconfigEnabled=true\n" +
		"skipACL=yes\n" +
		"metricsProvider.className=org.apache.zookeeper.metrics.prometheus.PrometheusMetricsProvider\n" +
		"metricsProvider.httpPort=7000\n" +
		"metricsProvider.exportJvmInfo=true\n" +
		"initLimit=" + strconv.Itoa(z.Spec.Conf.InitLimit) + "\n" +
		"syncLimit=" + strconv.Itoa(z.Spec.Conf.SyncLimit) + "\n" +
		"tickTime=" + strconv.Itoa(z.Spec.Conf.TickTime) + "\n" +
		"globalOutstandingLimit=" + strconv.Itoa(z.Spec.Conf.GlobalOutstandingLimit) + "\n" +
		"preAllocSize=" + strconv.Itoa(z.Spec.Conf.PreAllocSize) + "\n" +
		"snapCount=" + strconv.Itoa(z.Spec.Conf.SnapCount) + "\n" +
		"commitLogCount=" + strconv.Itoa(z.Spec.Conf.CommitLogCount) + "\n" +
		"snapSizeLimitInKb=" + strconv.Itoa(z.Spec.Conf.SnapSizeLimitInKb) + "\n" +
		"maxCnxns=" + strconv.Itoa(z.Spec.Conf.MaxCnxns) + "\n" +
		"maxClientCnxns=" + strconv.Itoa(z.Spec.Conf.MaxClientCnxns) + "\n" +
		"minSessionTimeout=" + strconv.Itoa(z.Spec.Conf.MinSessionTimeout) + "\n" +
		"maxSessionTimeout=" + strconv.Itoa(z.Spec.Conf.MaxSessionTimeout) + "\n" +
		"autopurge.snapRetainCount=" + strconv.Itoa(z.Spec.Conf.AutoPurgeSnapRetainCount) + "\n" +
		"autopurge.purgeInterval=" + strconv.Itoa(z.Spec.Conf.AutoPurgePurgeInterval) + "\n" +
		"quorumListenOnAllIPs=" + strconv.FormatBool(z.Spec.Conf.QuorumListenOnAllIPs) + "\n" +
		"admin.serverPort=" + strconv.Itoa(int(ports.AdminServer)) + "\n" +
		"dynamicConfigFile=/data/zoo.cfg.dynamic\n"
}

Importance

normal

Location

zk generators makeZkConfigString

Suggestions for an improvement

using the provided metrics port configuration

@anishakj
Copy link
Contributor

Fixed by PR #463

@anishakj anishakj added this to the Release 0.2.14 milestone May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants