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

Fix payara windows image #2880

Merged
merged 1 commit into from
Apr 28, 2021
Merged

Conversation

laurit
Copy link
Contributor

@laurit laurit commented Apr 28, 2021

Payara is started through a launcher process so adding agent to jvm arguments just adds it to the launcher not actual server.

:: after that place options into configuration xml after <jvm-options>-server</jvm-options>
SET IN_CONF_FILE=/server/glassfish/domains/domain1/config/domain.xml
SET OUT_CONF_FILE=/server/glassfish/domains/domain1/config/domain.xml
powershell -command "$opts='<jvm-options>' + $env:JVM_ARGS + '</jvm-options>'; $opts=$opts -replace ' ', '</jvm-options><jvm-options>'; (gc $env:IN_CONF_FILE) -replace '<jvm-options>-server</jvm-options>', ('<jvm-options>-server</jvm-options>' + $opts) | sc $env:OUT_CONF_FILE"
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these JVM_ARGS dynamic? I mean can we already bake them into image itself?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

JVM_ARGS currently contains just the path to our agent which really isn't dynamic, but as we can pass it as an environment variable for all other servers it doesn't make sense to bake this into image for only this server. Also sometimes it is useful to pass additional arguments like -verbose:class for debugging purposes.

@laurit laurit merged commit 7c51703 into open-telemetry:main Apr 28, 2021
@laurit laurit deleted the payara-windows-2 branch April 28, 2021 10:26
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.

2 participants