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
mariadb-galera: wsrep_node_address not correctly set in dual-stack environment #4077
Comments
Hi @sptmhall , |
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback. |
Hello, Regards, |
Hi, @kkosewski. Thanks for reaching out. There hasn't been any progress so far, but I will try to raise the priority of this. |
Hello @sptmhall and @kkosewski, if you look at https://github.com/bitnami/bitnami-docker-mariadb-galera/blob/master/10.5/debian-10/rootfs/opt/bitnami/scripts/mariadb-env.sh#L180, you'll see that it would allow to have a workaround but I believe a proper solution (finding IPv6 address and IPv4 and choosing the right one according to where we want to listen on) would be better... |
Bitnami init script can automatically choose the node address (which is the IP address of the container). Unfortunately, this doesn't work when on dual stack as both IP addresses with a space are given (see bitnami/charts#4077). This patch force the IP address so we can get rid of this issue Issue-ID: OOM-2661 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com> Change-Id: I5dd2147df1932b1f0fdde7c2b55585cff45bab68
Any reason why fieldRef is not used or do you foresee any issue if fieldRef is used? - name: MARIADB_GALERA_NODE_ADDRESS
valueFrom:
fieldRef:
fieldPath: status.podIP |
Hi, I can see in the container logic the env var is There is probably a typo in the README or in the logic but in the logic |
@miguelaeh I see |
ah ok, so it seems that the variable that should be set is |
Hello, any update on this issue? I am having the same error |
I think this PR will bring some light here: https://github.com/bitnami/bitnami-docker-mariadb-galera/pull/69 |
So it seems that the docker image now supports the dual stack mode, what about the Helm chart? I still see the value |
You can edit that in your own |
Unfortunately, this issue was created a long time ago and although there is an internal task to fix it, it was not prioritized as something to address in the short/mid term. It's not a technical reason but something related to the capacity since we're a small team. Being said that, contributions via PRs are more than welcome in both repositories (containers and charts). Just in case you would like to contribute. During this time, there are several releases of this asset and it's possible the issue has gone as part of other changes. If that's not the case and you are still experiencing this issue, please feel free to reopen it and we will re-evaluate it. |
Thanks @kprasad99 😄 that worked |
mariadb-galera 4.4.5
By default the wsrep_node_address is obtained by running
hostname -i
. In dual-stack environments this returns 2 IP Addresses seperated by a space. Using this value results in a "Too many arguments" error.I tried overriding the wsrep_node_address by setting the "DB_GALERA_NODE_ADDRESS" env variable using "staus.podIP" (which returns only the IPv4 Address). And verified the environment variable was properly set in the running container, however it appears as if the check for the override does not work.
I was only able to get the pods to start by copying /opt/bitnami/scripts/libmariadbgalera.sh out of the container, modifying line 631 from "hostname -i" to "hostname -i | sed 's/.* //'", creating a configmap of the modified file, and mounting it into the pod using extraVolumes/extraVolumeMounts. Note: this is probably not a good solution, it was a quick hack that works in my environment. I am not confident that the IPv4 address will always show up as the second address when running
hostname -i
./opt/bitnami/scripts/libmariadbgalera.sh
These are the errors from the log
This is the running mysqld process, you can see both IP Addresses and the reason it was reported as a "too many arguments" error:
To Reproduce:
Create a mariadb-galera instance on a dual-stack Kubernetes 1.19 environment.
"helm install -n my_namespace mariadb bitnami/mariadb-galera"
To reproduce with the override, add "--set extraEnvVars[0].name=DB_GALERA_NODE_ADDRESS --set extraEnvVars[0].valueFrom.fieldRef.fieldPath=status.podIP"
The behavior will be the same. I verified the env variable was properly set by running
Kubernetes Version:
Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.2", GitCommit:"f5743093fd1c663cb0cbc89748f730662345d44d", GitTreeState:"clean", BuildDate:"2020-09-16T13:41:02Z", GoVersion:"go1.15", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.2", GitCommit:"f5743093fd1c663cb0cbc89748f730662345d44d", GitTreeState:"clean", BuildDate:"2020-09-16T13:32:58Z", GoVersion:"go1.15", Compiler:"gc", Platform:"linux/amd64"}
Helm Version:
version.BuildInfo{Version:"v3.3.4", GitCommit:"a61ce5633af99708171414353ed49547cf05013d", GitTreeState:"clean", GoVersion:"go1.14.9"}
The text was updated successfully, but these errors were encountered: