Skip to content

Conversation

@MMirelli
Copy link
Contributor

@MMirelli MMirelli commented Dec 6, 2021

Motivation

#11285 prevents the autorecovery pod from initialising successfully. The pod would throw the error:

[conf/bookkeeper.conf] Applying config zkServers = pulsar-zookeeper-ca:2181
[0.001s][error][logging] Error opening log file 'logs/pulsar_bookie_gc_1.log': No such file or directory
[0.001s][error][logging] Initialization of output 'file=logs/pulsar_bookie_gc_%p.log' using options 'filecount=10,filesize=20M' failed.
Invalid -Xlog option '-Xlog:gc*:logs/pulsar_bookie_gc_%p.log:time,uptime,level,tags:filecount=10,filesize=20M', see error log for details.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

As a result the helm deployment would not complete. The error can be reproduced by deploying pulsar, using the datastax helmchart:

helm install pulsar -n pulsar -f "pulsar-values.yaml" --wait datastax-pulsar/pulsar

# pulsar-values.yaml
enableAntiAffinity: no
initialize: true  # ASF Helm Chart
restartOnConfigMapChange:
  enabled: yes
image:
  zookeeper:
    repository: <pulsar_master>/pulsar-all
    tag: latest
  bookie:
    repository: <pulsar_master>/pulsar-all
    tag: latest
  bookkeeper:
    repository: <pulsar_master>/pulsar-all
    tag: latest
  autorecovery:
    repository: <pulsar_master>/pulsar-all
    tag: latest
  broker:
    repository: <pulsar_master>/pulsar-all
    tag: latest
  proxy:
    repository: <pulsar_master>/pulsar-all
    tag: latest
  functions:
    repository: <pulsar_master>/pulsar-all
    tag: latest
  function:
    repository: <pulsar_master>/pulsar-all
    tag: latest
extra:
  function: yes
  burnell: yes
  burnellLogCollector: yes
  pulsarHeartbeat: yes
  pulsarAdminConsole: yes
  autoRecovery: yes
  functionsAsPods: yes
default_storage:
  existingStorageClassName: server-storage
volumes:
  data: #ASF Helm Chart
    storageClassName: existent-storage-class
zookeeper:
  replicaCount: 3
bookkeeper:
  replicaCount: 3
broker:
  component: broker
  replicaCount: 2
  ledger:
    defaultEnsembleSize: 1
    defaultAckQuorum:  1
    defaultWriteQuorum: 1
function:
  replicaCount: 1
  functionReplicaCount: 1
  runtime: "kubernetes"
proxy:
  replicaCount: 2
  autoPortAssign:
    enablePlainTextWithTLS: yes
  service:
    type: ClusterIP
    autoPortAssign:
      enabled: yes
grafanaDashboards:
  enabled: yes
pulsarAdminConsole:
  replicaCount: 0
  service:
    type: ClusterIP
grafana: #ASF Helm Chart
  service:
    type: ClusterIP
pulsar_manager:
  service: #ASF Helm Chart
    type: ClusterIP
kube-prometheus-stack: # Luna Streaming Helm Chart
  enabled: no
  prometheusOperator:
    enabled: no
  grafana:
    enabled: no
    service:
      type: ClusterIP
pulsarSQL:
  service:
    type: ClusterIP
enableTls: yes
cert-manager:
  enabled: true
createCertificates:
  selfSigned:
    enabled: true
enableTokenAuth: yes
autoRecovery:
  enableProvisionContainer: yes

Modifications

  • adding instruction to create /pulsar/logs/, if it does not exist

The change is equivalent to https://github.com/apache/pulsar/pull/11285/files#diff-89618c73d511b2015766c1fb0cd4bd16aa7f949dfdfa02d1995b586b8ed57d7aR291-R292 in #11285.

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

Does this pull request potentially affect one of the following parts:

  • Anything that affects deployment: yes

Documentation

Check the box below and label this PR (if you have committer privilege).

Need to update docs?

  • no-need-doc

    Without this fix, the autorecovery pod initialisation will fail with error:
    `[0.001s][error][logging] Error opening log file 'logs/pulsar_bookie_gc_1.log': No such file or directory`
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Dec 6, 2021
Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Member

@michaeljmarshall michaeljmarshall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eolivelli eolivelli merged commit 5ec8b86 into apache:master Dec 7, 2021
fxbing pushed a commit to fxbing/pulsar that referenced this pull request Dec 19, 2021
Without this fix, the autorecovery pod initialisation will fail with error:
    `[0.001s][error][logging] Error opening log file 'logs/pulsar_bookie_gc_1.log': No such file or directory`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-not-needed Your PR changes do not impact docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants