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

pulsar init pod "Missing required options" #569

Closed
MiraculousNightingale opened this issue Feb 7, 2025 · 7 comments · Fixed by #572
Closed

pulsar init pod "Missing required options" #569

MiraculousNightingale opened this issue Feb 7, 2025 · 7 comments · Fixed by #572

Comments

@MiraculousNightingale
Copy link

MiraculousNightingale commented Feb 7, 2025

Description
When deploying pulsar helm chart, pulsar init pod fails with the following error:

picocli.CommandLine$MissingParameterException: Missing required options: '--cluster=<cluster>', '--web-service-url=<clusterWebServiceUrl>'
Exception in thread "main" picocli.CommandLine$MissingParameterException: Missing required options: '--cluster=<cluster>', '--web-service-url=<clusterWebServiceUrl>'
        at picocli.CommandLine$MissingParameterException.create(CommandLine.java:18661)
        at picocli.CommandLine$MissingParameterException.access$21200(CommandLine.java:18649)
        at picocli.CommandLine$Interpreter.validateConstraints(CommandLine.java:13651)
        at picocli.CommandLine$Interpreter.parse(CommandLine.java:13614)
        at picocli.CommandLine$Interpreter.parse(CommandLine.java:13559)
        at picocli.CommandLine$Interpreter.parse(CommandLine.java:13454)
        at picocli.CommandLine.parseArgs(CommandLine.java:1552)
        at org.apache.pulsar.PulsarClusterMetadataSetup.main(PulsarClusterMetadataSetup.java:227)
sh: --cluster: not found

Reproduction steps

  1. Deploy pulsar helm chart
  2. Check pods
  3. See pulsar-init pod failing
  4. Check pulsar-init logs, see error

Expected behavior
Pulsar-init pod executing successfully.

Additional context
Chart version: 3.9.0
Describing pulsar-init pod shows an empty line in the args. That seems to be the reason for the error. Why does it appear there?

Containers:
  pulsar-pulsar-init:
    Container ID:  containerd://093b1d4a1189ab6b7bc02944de20a8d26c4d3e6203e27f6f8bb7e130070f56cb
    Image:         apachepulsar/pulsar-all:4.0.0
    Image ID:      docker.io/apachepulsar/pulsar-all@sha256:45d5b93dd533c1bfc18c4d2bce94da1bb0ed5cf5070f6ec43b71f2e7abc8eade
    Port:          <none>
    Host Port:     <none>
    Command:
      timeout
      60
      sh
      -c
    Args:
      export PULSAR_MEM="-Xmx128M"; bin/pulsar initialize-cluster-metadata \
      
        --cluster pulsar \
        --metadata-store "oxia://pulsar-oxia-svc:6648/broker" \
        --configuration-store "oxia://pulsar-oxia-svc:6648/broker" \
        --web-service-url http://pulsar-broker.pulsar.svc.cluster.local:8080/ \
        --web-service-url-tls https://pulsar-broker.pulsar.svc.cluster.local:8443/ \
        --broker-service-url pulsar://pulsar-broker.pulsar.svc.cluster.local:6650/ \
        --broker-service-url-tls pulsar+ssl://pulsar-broker.pulsar.svc.cluster.local:6651/ ;
    State:          Waiting
      Reason:       CrashLoopBackOff
@lhotari
Copy link
Member

lhotari commented Feb 18, 2025

@MiraculousNightingale
This is the template

{{- if .Values.components.zookeeper }}
args:
- >-
{{- include "pulsar.toolset.zookeeper.tls.settings" . | nindent 12 }}
export PULSAR_MEM="-Xmx128M";
bin/pulsar initialize-cluster-metadata \
--cluster {{ template "pulsar.cluster.name" . }} \
--zookeeper {{ template "pulsar.zookeeper.connect" . }}{{ .Values.metadataPrefix }} \
{{- if .Values.pulsar_metadata.configurationStore }}
--configuration-store {{ template "pulsar.configurationStore.connect" . }}{{ .Values.pulsar_metadata.configurationStoreMetadataPrefix }} \
{{- else }}
--configuration-store {{ template "pulsar.zookeeper.connect" . }}{{ .Values.metadataPrefix }} \
{{- end }}
--web-service-url http://{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}.{{ template "pulsar.namespace" . }}.svc.{{ .Values.clusterDomain }}:{{ .Values.broker.ports.http }}/ \
--web-service-url-tls https://{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}.{{ template "pulsar.namespace" . }}.svc.{{ .Values.clusterDomain }}:{{ .Values.broker.ports.https }}/ \
--broker-service-url pulsar://{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}.{{ template "pulsar.namespace" . }}.svc.{{ .Values.clusterDomain }}:{{ .Values.broker.ports.pulsar }}/ \
--broker-service-url-tls pulsar+ssl://{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}.{{ template "pulsar.namespace" . }}.svc.{{ .Values.clusterDomain }}:{{ .Values.broker.ports.pulsarssl }}/ ;
{{- if .Values.extraInitCommand }}
{{ .Values.extraInitCommand }}
{{- end }}
{{- else if .Values.components.oxia }}
args:
- >-
export PULSAR_MEM="-Xmx128M";
bin/pulsar initialize-cluster-metadata \
--cluster {{ template "pulsar.cluster.name" . }} \
--metadata-store "{{ template "pulsar.oxia.metadata.url.broker" . }}" \
--configuration-store "{{ template "pulsar.oxia.metadata.url.broker" . }}" \
--web-service-url http://{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}.{{ template "pulsar.namespace" . }}.svc.{{ .Values.clusterDomain }}:{{ .Values.broker.ports.http }}/ \
--web-service-url-tls https://{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}.{{ template "pulsar.namespace" . }}.svc.{{ .Values.clusterDomain }}:{{ .Values.broker.ports.https }}/ \
--broker-service-url pulsar://{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}.{{ template "pulsar.namespace" . }}.svc.{{ .Values.clusterDomain }}:{{ .Values.broker.ports.pulsar }}/ \
--broker-service-url-tls pulsar+ssl://{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}.{{ template "pulsar.namespace" . }}.svc.{{ .Values.clusterDomain }}:{{ .Values.broker.ports.pulsarssl }}/ ;
{{- if .Values.extraInitCommand }}
{{ .Values.extraInitCommand }}
{{- end }}
{{- end }}
.
I don't see how there could be an extra line feed unless Helm is somehow injecting it.
Which Helm version (helm version) are you using? In CI, we test with 3.12.0 and 3.14.4.
What OS do you use? Which k8s server version? (kubectl version)
Helm supported version skew documentation. (Pick a Helm version that supports your k8s server version to be sure that it's compatible.)

@brunocascio
Copy link

I'm facing the same issue...
Seems that extra-line is added by kustomize when runnning kustomize --enable-helm .

@lhotari
Copy link
Member

lhotari commented Feb 19, 2025

@lhotari
Copy link
Member

lhotari commented Feb 19, 2025

PR to fix the issue is #572

@brunocascio
Copy link

Thanks @lhotari ! 🚀

Is there any ETA for bump the new chart version?

Thanks again

@lhotari
Copy link
Member

lhotari commented Feb 19, 2025

Thanks @lhotari ! 🚀

Is there any ETA for bump the new chart version?

Thanks again

@brunocascio In about 2 weeks. I'm currently working on Pulsar 3.0.10, 3.3.5 and 4.0.3 release candidates and if there aren't delays, the release for these Pulsar releases would happen on Feb 26th. I'll start the next pulsar-helm-chart release after this with Pulsar 4.0.3 as the default. It takes about 1 week to complete the release due to ASF release policy where release voting has to happen for every release.

@brunocascio
Copy link

Thanks @lhotari !

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

Successfully merging a pull request may close this issue.

3 participants