fix bkenv has no effect bug when start bookie using bin/pulsar-daemon#5675
Merged
sijie merged 6 commits intoapache:masterfrom Nov 19, 2019
hangc0276:master
Merged
fix bkenv has no effect bug when start bookie using bin/pulsar-daemon#5675sijie merged 6 commits intoapache:masterfrom hangc0276:master
sijie merged 6 commits intoapache:masterfrom
hangc0276:master
Conversation
…metheus/PrometheusMetricsGenerator.java format code style Co-Authored-By: Sijie Guo <guosijie@gmail.com>
jiazhai
approved these changes
Nov 17, 2019
sijie
requested changes
Nov 18, 2019
| . "$PULSAR_HOME/conf/pulsar_env.sh" | ||
| fi | ||
|
|
||
| # Check bookkeeper env and load bkenv.sh |
…ty consideration, So if people already define environments in pulsar_env, those env vars will not be overridden by bkenv.sh
sijie
approved these changes
Nov 19, 2019
Contributor
|
This change is causing several side effects and I think it should be reverted. |
sijie
pushed a commit
that referenced
this pull request
Feb 8, 2020
) ### Motivation Fixes #6131 (caused by #5675): When upgrading an existing 2.4.1 bookie cluster to 2.5.0 on kubernetes, the bookie fails to start with the following exception during initialization: io.netty.util.internal.OutOfDirectMemoryError: failed to allocate 16777216 byte(s) of direct memory (used: 2147483648, max: 2147483648). This is caused by the fact that the bookie environment variables `BOOKIE_MEM` and `BOOKIE_FC` defined in conf/bkenv.sh has no effect, and it is always using the defaults values. #### Proposed solution: Set `BOOKIE_MEM` and `BOOKIE_GC` in the helm deployments charts and default to `PULSAR_MEM` if the `BOOKIE` settings are not set and then use the default settings if none of those environment variables are set. #### Changes made Helm chart deployment `values.yaml` and `values-mini.yaml` along with the `bkenv.sh` configuration script. ### Documentation Currently, the documentation explaining the deployment process and how to change settings is lacking and need to be updated.
tuteng
pushed a commit
to AmateurEvents/pulsar
that referenced
this pull request
Feb 23, 2020
…ache#6201) ### Motivation Fixes apache#6131 (caused by apache#5675): When upgrading an existing 2.4.1 bookie cluster to 2.5.0 on kubernetes, the bookie fails to start with the following exception during initialization: io.netty.util.internal.OutOfDirectMemoryError: failed to allocate 16777216 byte(s) of direct memory (used: 2147483648, max: 2147483648). This is caused by the fact that the bookie environment variables `BOOKIE_MEM` and `BOOKIE_FC` defined in conf/bkenv.sh has no effect, and it is always using the defaults values. #### Proposed solution: Set `BOOKIE_MEM` and `BOOKIE_GC` in the helm deployments charts and default to `PULSAR_MEM` if the `BOOKIE` settings are not set and then use the default settings if none of those environment variables are set. #### Changes made Helm chart deployment `values.yaml` and `values-mini.yaml` along with the `bkenv.sh` configuration script. ### Documentation Currently, the documentation explaining the deployment process and how to change settings is lacking and need to be updated.
tuteng
pushed a commit
to AmateurEvents/pulsar
that referenced
this pull request
Mar 21, 2020
…ache#6201) ### Motivation Fixes apache#6131 (caused by apache#5675): When upgrading an existing 2.4.1 bookie cluster to 2.5.0 on kubernetes, the bookie fails to start with the following exception during initialization: io.netty.util.internal.OutOfDirectMemoryError: failed to allocate 16777216 byte(s) of direct memory (used: 2147483648, max: 2147483648). This is caused by the fact that the bookie environment variables `BOOKIE_MEM` and `BOOKIE_FC` defined in conf/bkenv.sh has no effect, and it is always using the defaults values. #### Proposed solution: Set `BOOKIE_MEM` and `BOOKIE_GC` in the helm deployments charts and default to `PULSAR_MEM` if the `BOOKIE` settings are not set and then use the default settings if none of those environment variables are set. #### Changes made Helm chart deployment `values.yaml` and `values-mini.yaml` along with the `bkenv.sh` configuration script. ### Documentation Currently, the documentation explaining the deployment process and how to change settings is lacking and need to be updated. (cherry picked from commit 28875d5)
tuteng
pushed a commit
that referenced
this pull request
Apr 13, 2020
) ### Motivation Fixes #6131 (caused by #5675): When upgrading an existing 2.4.1 bookie cluster to 2.5.0 on kubernetes, the bookie fails to start with the following exception during initialization: io.netty.util.internal.OutOfDirectMemoryError: failed to allocate 16777216 byte(s) of direct memory (used: 2147483648, max: 2147483648). This is caused by the fact that the bookie environment variables `BOOKIE_MEM` and `BOOKIE_FC` defined in conf/bkenv.sh has no effect, and it is always using the defaults values. #### Proposed solution: Set `BOOKIE_MEM` and `BOOKIE_GC` in the helm deployments charts and default to `PULSAR_MEM` if the `BOOKIE` settings are not set and then use the default settings if none of those environment variables are set. #### Changes made Helm chart deployment `values.yaml` and `values-mini.yaml` along with the `bkenv.sh` configuration script. ### Documentation Currently, the documentation explaining the deployment process and how to change settings is lacking and need to be updated. (cherry picked from commit 28875d5)
jiazhai
pushed a commit
to jiazhai/pulsar
that referenced
this pull request
May 18, 2020
…ache#6201) ### Motivation Fixes apache#6131 (caused by apache#5675): When upgrading an existing 2.4.1 bookie cluster to 2.5.0 on kubernetes, the bookie fails to start with the following exception during initialization: io.netty.util.internal.OutOfDirectMemoryError: failed to allocate 16777216 byte(s) of direct memory (used: 2147483648, max: 2147483648). This is caused by the fact that the bookie environment variables `BOOKIE_MEM` and `BOOKIE_FC` defined in conf/bkenv.sh has no effect, and it is always using the defaults values. #### Proposed solution: Set `BOOKIE_MEM` and `BOOKIE_GC` in the helm deployments charts and default to `PULSAR_MEM` if the `BOOKIE` settings are not set and then use the default settings if none of those environment variables are set. #### Changes made Helm chart deployment `values.yaml` and `values-mini.yaml` along with the `bkenv.sh` configuration script. ### Documentation Currently, the documentation explaining the deployment process and how to change settings is lacking and need to be updated. (cherry picked from commit 28875d5)
huangdx0726
pushed a commit
to huangdx0726/pulsar
that referenced
this pull request
Aug 24, 2020
…ache#6201) ### Motivation Fixes apache#6131 (caused by apache#5675): When upgrading an existing 2.4.1 bookie cluster to 2.5.0 on kubernetes, the bookie fails to start with the following exception during initialization: io.netty.util.internal.OutOfDirectMemoryError: failed to allocate 16777216 byte(s) of direct memory (used: 2147483648, max: 2147483648). This is caused by the fact that the bookie environment variables `BOOKIE_MEM` and `BOOKIE_FC` defined in conf/bkenv.sh has no effect, and it is always using the defaults values. #### Proposed solution: Set `BOOKIE_MEM` and `BOOKIE_GC` in the helm deployments charts and default to `PULSAR_MEM` if the `BOOKIE` settings are not set and then use the default settings if none of those environment variables are set. #### Changes made Helm chart deployment `values.yaml` and `values-mini.yaml` along with the `bkenv.sh` configuration script. ### Documentation Currently, the documentation explaining the deployment process and how to change settings is lacking and need to be updated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
when i start bookie using
bin/pulsar-daemon start bookiecommand, i found the bookie environment variable defined in conf/bkenv.sh has no effect, but using $PULSAR_MEM and $PULSAR_GC instead.Then i check the bin/pulsar shell script, i found as follow:
but in pulsar_env.sh, the
$BOOKIE_EXTRA_OPTSdefined as follow:$BOOKIE_EXTRA_OPTSdo not define$BOOKIE_MEMand$BOOKIE_GC, then the pulsar script will using$PULSAR_MEMand$PULSAR_GCinstead to start bookkeeper.So, i suggest to load conf/bkenv.sh in bin/pulsar script and using
$BOOKIE_EXTRA_OPTSin conf/bkenv.sh instread of$BOOKIE_EXTRA_OPTSin bin/pulsar_env.sh