KongZ / charts

Source for Helm chart repositories contribution
https://charts.kong-z.com/
Apache License 2.0
61 stars 66 forks source link

Support for Graylog 5.x #136

Open pschichtel opened 1 year ago

pschichtel commented 1 year ago

When upgrading the image to 5.0.1 graylog fails to start up with the following message:

Unrecognized VM option 'UseCGroupMemoryLimitForHeap'

I guess the reason for this is that fact that graylog 5 runs on Java 17.

Other significant changes in graylog 5:

mazmar commented 1 year ago

I am facing the same issue, but one thing to note is that 4.3.8 already supports mongodb 5.x so I was able to upgrade mongodb and still run the 4.3.8.

as @pschichtel said it crashes on the uncrecognized option

pschichtel commented 1 year ago

I removed the option in a local copy of the chart and graylog starts up as expected, but I'm still facing other issues while attempting to use OpenSearch (using the opensearch operator). Once I have it running I intent to open a PR.

pschichtel commented 1 year ago

4.3.8 already supports mongodb 5.x

@mazmar do you have a source for this?

pschichtel commented 1 year ago

Ok found it.

The Graylog 5 upgrade documentation confirms it: https://go2docs.graylog.org/5-0/upgrading_graylog/upgrading_graylog.html#version-compatibility The Graylog 4.x installation documentation does not list it, but I guess they haven't updated that one: https://go2docs.graylog.org/4-x/downloading_and_installing_graylog/installing_graylog.html

mazmar commented 1 year ago

Sorry, yes you are correct they did not update the documentation for 4.x I did not notice that. I only checked the upgrade instructions last week.

Anyway, I've set the heap manually as it said in values.yaml and it doesn't use the option UseCGroupMemoryLimitForHeap. It started correctly after that and I didn't need to adjust anything else. I am running unsupported ES 7.14.

Only problem is that after upgrading mongo to last version 5 from bitnami the arbitter is broken :( but that is not part of this chart. I will upgrade to mongo 6 this week.

dsiperek-vendavo commented 1 year ago

I was able to upgrade also by just setting the heapSize in value.yaml file.

pauronda-visma commented 1 year ago

Hi there. I followed your steps:

It almost worked, but it gets stuck in this point: /entrypoint.sh: line 56: 37 Killed "${JAVA_HOME}/bin/java" ${GRAYLOG_SERVER_JAVA_OPTS} -jar -Dlog4j.configurationFile=${GRAYLOG_HOME}/config/log4j2.xml -Djava.library.path=${GRAYLOG_HOME}/lib/sigar/ -Dgraylog2.installation_source=docker ${GRAYLOG_HOME}/graylog.jar server -f ${GRAYLOG_HOME}/config/graylog.conf

I feel that maybe is the ${GRAYLOG_SERVER_JAVA_OPTS} parameter in -jar on the entrypoint.sh https://github.com/KongZ/charts/blob/4e9167072434933f0790ad83ca962ae8665a3c6f/charts/graylog/templates/configmap.yaml#L241

Could you help me?

pauronda-visma commented 1 year ago

Hi again, sorry for bothering you.

It worked after modifying entrypoint.sh

I hardcoded the Java VM options from graylog 5 docker repository and worked.

-Dlog4j2.formatMsgNoLookups=true -Djdk.tls.acknowledgeCloseNotify=true -XX:+UnlockExperimentalVMOptions -XX:-OmitStackTraceInFastThrow -XX:+UseG1GC -server

More info: https://github.com/Graylog2/graylog-docker/blob/56c630a6c43a98b49802555bea314cf132f1a86a/docker/oss/Dockerfile#L67

EDIT: I realized it can be passed as a value using greylog.javaOpts https://github.com/KongZ/charts/blob/3e07a732eb17d2c0492a3c974cbd25768c6af113/charts/graylog/values.yaml#L62

pschichtel commented 1 year ago

@pauronda-visma Intersting. for me it started, but the UI was unable to perform search API requests against the OpenSearch instance. I haven't been able to get back to my local setup for this.

pauronda-visma commented 1 year ago

Same was for me, but after removing the value graylog.elasticsearch.version on values.yaml it worked for me. https://github.com/KongZ/charts/blob/main/charts/graylog/values.yaml#L403

More info: https://github.com/KongZ/charts/issues/133 https://github.com/Graylog2/graylog2-server/issues/14236

luizjr commented 1 year ago

Error, not connecting to opensearch cluster

image

luizjr commented 1 year ago

I managed to update, and I made a pull request.

https://github.com/KongZ/charts/pull/138