Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow javaArgs for all Zowe Java processes #3865

Open
nigelvwilliams opened this issue Oct 3, 2024 · 7 comments
Open

Allow javaArgs for all Zowe Java processes #3865

nigelvwilliams opened this issue Oct 3, 2024 · 7 comments
Labels

Comments

@nigelvwilliams
Copy link

Customers who wish to monitor the JVMs in Zowe, say with OMEGAMON for JVM cannot easily add Java Arguments to the Java configuration.

Describe the experience you'd like
Currently only the Message Service JVM has a javaArgs yaml field. We'd like all the Java process to have that option.

Describe alternatives you've considered
Manually altering the template arguments, but they may get overwritten by maintenance.

@nigelvwilliams nigelvwilliams added the enhancement New feature or request label Oct 3, 2024
@1000TurquoisePogs
Copy link
Member

1000TurquoisePogs commented Oct 21, 2024

@balhar-jakub I'm going to move this over to api-layer as the biggest source of java, but, here's a thought to spark discussion:

Because there's many uses of java, let's continue following the sort of standardization pattern we recently did with things like networking.

Idea 1 - Object based YAML

If we assume all args implicitly have "-", it can be omitted and the object could look like:

java:
  args:
    Dkey: value

components:
  gateway:
    java:
      args:
        Dkey: override

Where, we have an object for global use, and then an override for a specific server use.
I guess you would need some shell scripting to convert the object into a string you can add to your java call.

Omitting "-" would be helpful because a YAML key starting with "-" could cause user error, parsing error, or env var error.

The object format could use some more thought for what is best.

Idea 2 - one big ugly string

java:
  args: "-Dkey0=value0 -Dkey1=value1"

In your code maybe it would look like

java \
  ${ZWE_configs_java_args:-${ZWE_java_args}} \
  # more args... \
  -jar "${JAR_FILE}"

@1000TurquoisePogs 1000TurquoisePogs transferred this issue from zowe/community Oct 21, 2024
@balhar-jakub balhar-jakub added the new New issue that has not been worked on yet label Oct 22, 2024
@EvaJavornicka EvaJavornicka added Priority: High size/M and removed new New issue that has not been worked on yet labels Oct 23, 2024
@1000TurquoisePogs
Copy link
Member

let me know what you come up with here because might want to do the same for nodejs.
Right now we have a one-off thing called ZWED_FLAGS but its undocumented.

@colinpaicemq
Copy link

z/OSMF has the following
JVM_OPTIONS="-Xoptionsfile=/global/zosmf/configuration/local_override.colin"
so have one yaml entry under java
optionsfile : .... name
That makes it easy to implement, and it is up to the user to provide and change the file.

@1000TurquoisePogs
Copy link
Member

Has anyone tried using IBM_JAVA_OPTIONS or OPENJ9_JAVA_OPTIONS to see if it has an effect?

@colinpaicemq
Copy link

colinpaicemq commented Jan 28, 2025 via email

@nosrednayduj
Copy link

UMS uses, in yaml:

 compnents.izp...javaArgs:
 - -Dsomething.something=something
 - -Dsomething.else=another

so it's an array. then we have a shell hack to concatenate the ZWE_components_izp_javaArgs_0 etc. vars into one space separated string and include $JAVAARGS in the java command. (too bad the pre-concatenated string is comma separated).

@colinpaicemq
Copy link

colinpaicemq commented Jan 29, 2025 via email

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
Development

No branches or pull requests

6 participants