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

[bitnami/tomcat] TOMCAT_EXTRA_JAVA_OPTS are added multiple times to tomcat-env.sh #53082 #53117

Conversation

christian-scheible
Copy link

Preventing TOMCAT_EXTRA_JAVA_OPTS to be added multiple times to tomcat-env.sh when the container is restarted.

Signed-off-by: Christian Scheible christian.scheible@uni-konstanz.de

Description of the change

This changes checks if the additional TOMCAT_EXTRA_JAVA_OPTS have allready been added to tomcat-env.sh before adding them. Otherwise every restart will add them again to the file.

Benefits

This prevents adding options multiple times to the JAVA_OPTS which fails for example if someone want's to attach a debugger like this: -agentlib:jdwp=transport=dt_socket,address=*:9543,suspend=n,server=y

Possible drawbacks

Applicable issues

#53082

Additional information

@github-actions github-actions bot added the triage Triage is needed label Nov 22, 2023
@javsalgar javsalgar added the verify Execute verification workflow for these changes label Nov 23, 2023
@github-actions github-actions bot added in-progress and removed triage Triage is needed labels Nov 23, 2023
@bitnami-bot bitnami-bot removed the request for review from javsalgar November 23, 2023 08:43
Copy link
Contributor

@andresbono andresbono left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution! I think it makes sense. Could you please take a look at my comment?

@@ -163,11 +163,16 @@ tomcat_enable_application() {
#########################
tomcat_initialize() {
if ! is_empty_value "$TOMCAT_EXTRA_JAVA_OPTS"; then
cat >>"${TOMCAT_BIN_DIR}/setenv.sh" <<EOF
# Check if $TOMCAT_EXTRA_JAVA_OPTS has already been added to setenv.sh
Copy link
Contributor

@andresbono andresbono Nov 30, 2023

Choose a reason for hiding this comment

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

Could you please use 4 spaces for indentation and remove the comments? As the code in this case is self-explanatory. What do you think?

Copy link
Author

Choose a reason for hiding this comment

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

Hi it seems that I have now broken it by rebasing the branch. Should I start a new branch an a new pull request?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi, that is fine, you can open a new PR if you prefer in order to restore the changes.

Copy link
Author

Choose a reason for hiding this comment

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

Ok I made a new one: #53780

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
)

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
)

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
)

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
bitnami-bot and others added 26 commits December 7, 2023 14:55
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
…53570)

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
…i#53582)

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
@christian-scheible christian-scheible deleted the tomcat-extra-java-opts-added-multiple-times branch December 13, 2023 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solved tomcat verify Execute verification workflow for these changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants