Skip to content

Entrypoint changes affecting heap dump storage and OR_JAVA_OPTS - #2868

Merged
richturner merged 15 commits into
masterfrom
enhancement/heap_dump_storage
Jun 19, 2026
Merged

richturner merged 15 commits into
masterfrom
enhancement/heap_dump_storage

Conversation

@richturner

@richturner richturner commented Jun 12, 2026 •

Copy link
Copy Markdown
Member

Store heap dumps in /storage dir and add support for multiple and warn on heap dump presence

This allows heap dumps to persist between manager container recreation for analysis purposes.

The entrypoint script also outputs a warning message if heap dumps are found to encourage removal.

Replace OR_JAVA_OPTS with more common options JAVA_OPTS and JAVA_OPTS_APPEND

@richturner richturner self-assigned this Jun 12, 2026
@richturner
richturner requested a review from a team June 12, 2026 15:32
@richturner richturner changed the title Store heap dumps in /storage dir Store heap dumps in /storage dir and use JAVA_OPTS and JAVA_OPTS_APPEND instead of OR_JAVA_OPTS Jun 12, 2026
@richturner richturner changed the title Store heap dumps in /storage dir and use JAVA_OPTS and JAVA_OPTS_APPEND instead of OR_JAVA_OPTS Entrypoint updates including heap dump storage and replacement of OR_JAVA_OPTS Jun 12, 2026
@richturner richturner changed the title Entrypoint updates including heap dump storage and replacement of OR_JAVA_OPTS Entrypoint changes affecting heap dump storage and OR_JAVA_OPTS Jun 12, 2026
@wborn
wborn requested a review from Copilot June 13, 2026 09:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the manager container startup configuration to persist heap dumps under /storage, retain multiple dumps by renaming them, and standardize JVM option env vars from OR_JAVA_OPTS to JAVA_OPTS + JAVA_OPTS_APPEND.

Changes:

  • Update manager/balena entrypoints to rename leftover /storage/dump.hprof on startup and warn when heap dumps are present.
  • Change default JVM options in manager/balena Dockerfiles to write heap dumps to /storage/dump.hprof and run a rename script on OOM.
  • Replace OR_JAVA_OPTS with JAVA_OPTS in test/load profiles and UI test harness.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
ui/test/manager.cjs Switches UI test harness from OR_JAVA_OPTS to JAVA_OPTS and defines local default JVM args.
test/load2-eks/profiles/xlarge/values-manager-eks-load.yaml Renames env var to JAVA_OPTS for load2 xlarge EKS profile.
test/load2-eks/profiles/xlarge-minimal/values-manager-eks-load.yaml Renames env var to JAVA_OPTS for load2 xlarge-minimal EKS profile.
test/load2-eks/profiles/large/values-manager-eks-load.yaml Renames env var to JAVA_OPTS for load2 large EKS profile.
test/load2-eks/profiles/8xlarge/values-manager-eks-load.yaml Renames env var to JAVA_OPTS for load2 8xlarge EKS profile.
test/load2-eks/profiles/4xlarge/values-manager-eks-load.yaml Renames env var to JAVA_OPTS for load2 4xlarge EKS profile.
test/load2-eks/profiles/2xlarge/values-manager-eks-load.yaml Renames env var to JAVA_OPTS for load2 2xlarge EKS profile.
test/load1/deployment1/test-load1.yml Renames env var to JAVA_OPTS for load1 docker-compose profile.
test/load1-eks/values-manager-eks-load.yaml Renames env var to JAVA_OPTS for load1 EKS values.
profile/deploy.yml Updates documentation comment to reference JAVA_OPTS / JAVA_OPTS_APPEND.
manager/heapdump-rename.sh Adds OOM heap dump rename script for manager image.
manager/entrypoint.sh Adds startup-time heap dump rename + warning, and uses JAVA_OPTS + JAVA_OPTS_APPEND.
manager/Dockerfile Updates default JVM opts (heap dump path + OOM hook) and copies new scripts into image.
balena/manager.Dockerfile Mirrors manager image JVM env changes and switches to entrypoint-based startup.
balena/heapdump-rename.sh Adds OOM heap dump rename script for balena image.
balena/entrypoint.sh Adds startup-time heap dump rename + warning, and uses JAVA_OPTS + JAVA_OPTS_APPEND.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread manager/Dockerfile Resolved
Comment thread test/load1/deployment1/test-load1.yml Resolved
Comment thread profile/deploy.yml Resolved
Comment thread ui/test/manager.cjs Resolved
@richturner

Copy link
Copy Markdown
Member Author

@wborn Can you trigger another review please?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 17 out of 17 changed files in this pull request and generated 6 comments.

Comment thread manager/build.gradle Resolved
Comment thread manager/entrypoint.sh Resolved
Comment thread manager/heapdump-rename.sh Resolved
Comment thread balena/entrypoint.sh Resolved
Comment thread balena/heapdump-rename.sh Resolved
Comment thread ui/test/manager.cjs Resolved
@richturner
richturner requested review from a team and removed request for a team June 15, 2026 13:22
@richturner

Copy link
Copy Markdown
Member Author

@openremote/core-developers Ready for review

@ebariaux
ebariaux requested review from ebariaux and removed request for a team June 17, 2026 08:25
Comment thread balena/heapdump-rename.sh Resolved
Comment thread ui/test/manager.cjs Resolved
@richturner
richturner requested a review from ebariaux June 17, 2026 09:27

@wborn wborn left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We probably also needdocumentation updates for this as there are some pages about using JAVA_OPTS and heap dumps:

@richturner

Copy link
Copy Markdown
Member Author

Doc PR also created openremote/documentation#162

@richturner

Copy link
Copy Markdown
Member Author

Heap dump references don't need replacing as they relate to ad-hoc heap dump generation

@richturner
richturner enabled auto-merge (squash) June 19, 2026 07:56
@richturner
richturner merged commit 0bc842f into master Jun 19, 2026
21 checks passed
@richturner
richturner deleted the enhancement/heap_dump_storage branch June 19, 2026 12:18
@sonarqubecloud

Copy link
Copy Markdown

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 this pull request may close these issues.

4 participants