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

graylog: improve JRE handling #117809

Merged
merged 1 commit into from Mar 28, 2021
Merged

graylog: improve JRE handling #117809

merged 1 commit into from Mar 28, 2021

Conversation

lheckemann
Copy link
Member

Motivation for this change

Since the upstream graylogctl script will prefer finding its java
executable based on JAVA_HOME, we now set this instead of PATH in
order to allow it to find the JRE. By setting it conditionally on it
not already being set, we allow selecting a different JRE at runtime.

Things done

@r-rmcgibbo
Copy link

r-rmcgibbo commented Mar 27, 2021

Result of nixpkgs-review pr 117809 at 52a82e3 run on x86_64-linux 1

1 package built successfully:
  • graylog
2 suggestions:
  • warning: missing-phase-hooks

    installPhase should probably contain runHook preInstall and runHook postInstall.

    Near pkgs/tools/misc/graylog/default.nix:20:3:

       |
    20 |   installPhase = ''
       |   ^
    
  • warning: unclear-gpl

    gpl3 is a deprecated license, please check if project uses gpl3Plus or gpl3Only and change meta.license accordingly.

    Near pkgs/tools/misc/graylog/default.nix:29:5:

       |
    29 |     license     = licenses.gpl3;
       |     ^
    

Result of nixpkgs-review pr 117809 at 52a82e3 run on aarch64-linux 1

1 package built successfully:
  • graylog
2 suggestions:
  • warning: missing-phase-hooks

    installPhase should probably contain runHook preInstall and runHook postInstall.

    Near pkgs/tools/misc/graylog/default.nix:20:3:

       |
    20 |   installPhase = ''
       |   ^
    
  • warning: unclear-gpl

    gpl3 is a deprecated license, please check if project uses gpl3Plus or gpl3Only and change meta.license accordingly.

    Near pkgs/tools/misc/graylog/default.nix:29:5:

       |
    29 |     license     = licenses.gpl3;
       |     ^
    

@SuperSandro2000
Copy link
Member

@lheckemann tests fail in ofborg

@Ma27
Copy link
Member

Ma27 commented Mar 27, 2021

And it's not transient:

machine # [   21.094467] graylogctl[999]: which: no java in (/nix/store/b86fbamwswj596c1md5f0sh0a5wsbz8x-which-2.21/bin:/nix/store/yyw2db5czblg7k86py43x0628w157p8x-procps-3.3.16/bin:/nix/store/15gmaah0dihis48xpr4nlm50giwlv403-libressl-3.2.5-nc/bin:/nix/store/9fkdn82nzxgkxyax3m9qdh2knj7apaa5-coreutils-8.32/bin:/nix/store/7nx8fqzpi5nsbi07md1qb1gbf9fscf9i-findutils-4.7.0/bin:/nix/store/ia1dn8zyi07phxkx02c0wwqc7v7c54nl-gnugrep-3.6/bin:/nix/store/ij7k48dhdrda13gcp3lbpi507b2awnmr-gnused-4.8/bin:/nix/store/caz5k18ar764161b0amywc002cp39lgx-systemd-247.3/bin:/nix/store/b86fbamwswj596c1md5f0sh0a5wsbz8x-which-2.21/sbin:/nix/store/yyw2db5czblg7k86py43x0628w157p8x-procps-3.3.16/sbin:/nix/store/15gmaah0dihis48xpr4nlm50giwlv403-libressl-3.2.5-nc/sbin:/nix/store/9fkdn82nzxgkxyax3m9qdh2knj7apaa5-coreutils-8.32/sbin:/nix/store/7nx8fqzpi5nsbi07md1qb1gbf9fscf9i-findutils-4.7.0/sbin:/nix/store/ia1dn8zyi07phxkx02c0wwqc7v7c54nl-gnugrep-3.6/sbin:/nix/store/ij7k48dhdrda13gcp3lbpi507b2awnmr-gnused-4.8/sbin:/nix/store/caz5k18ar764161b0amywc002cp39lgx-systemd-247.3/sbin)
machine: waiting for TCP port 9000
machine # [   21.532366] graylogctl[995]: Running graylog-server ...
machine # [   21.540196] graylogctl[995]: Unrecognized VM option 'UseConcMarkSweepGC'
machine # [   21.541386] graylogctl[995]: Error: Could not create the Java Virtual Machine.
machine # [   21.542246] graylogctl[995]: Error: A fatal exception has occurred. Program will exit.
machine # [   21.545431] systemd[1]: graylog.service: Main process exited, code=exited, status=1/FAILURE
machine # [   21.546462] systemd[1]: graylog.service: Failed with result 'exit-code'.
machine # [   21.547379] systemd[1]: graylog.service: Consumed 222ms CPU time, no IO, received 1.0K IP traffic, sent 1.4K IP traffic.

Since the upstream graylogctl script will prefer finding its java
executable based on JAVA_HOME, we now set this instead of PATH in
order to allow it to find the JRE. By setting it conditionally on it
not already being set, we allow selecting a different JRE at runtime.

We also explicitly use openjdk11, which supports the
UseConcMarkSweepGC option which graylog insists on using.
@Ma27 Ma27 merged commit c2836eb into NixOS:master Mar 28, 2021
@Ma27 Ma27 deleted the graylog-4 branch March 28, 2021 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants