The infer of --lru_mb flag giving wrong value and breaking the cluster (on helm)

I am try to use helm to install dgraph following GitHub - dgraph-io/charts: Helm charts for Dgraph, but failed, It saids " 2020/07/28 14:56:02 LRU memory (–lru_mb) must be at least 1024 MB. Currently set to: -1.000000

For more information on --lru_mb"

PS: I am a maintainer of Chaos Mesh(http://chaos-mesh.org). I am trying to test dgraph by Chaos Mesh

Can you tell what version is showing up? in the latest version it should just ignore that flag and try to infer the amount of RAM you have. And it will use 50% of it on the flag.

cc: @dmai @joaquin

Did you mean this line

++ hostname -f
+ dgraph alpha --my=my-release-dgraph-alpha-1.my-release-dgraph-alpha-headless.default.svc.cluster.local:7080 --zero my-release-dgraph-zero-0.my-release-dgraph-zero-headless.default.svc.cluster.local:5080,my-release-dgraph-zero-1.my-release-dgraph-zero-headless.default.svc.cluster.local:5080,my-release-dgraph-zero-2.my-release-dgraph-zero-headless.default.svc.cluster.local:5080

No, in the log there is the version printed.

I can get verion by using kubectl logs my-release-dgraph-zero-0
It shows

Dgraph version   : v20.03.4
Dgraph SHA-256   : ea782f7687004901e2fb4d0a11904417787217ce156104e4f333460966682a86
Commit SHA-1     : 80e6c199e
Commit timestamp : 2020-07-23 11:17:00 -0700
Branch           : HEAD
Go version       : go1.14.4

Did this is the right version?

And the errors is reported by my-release-dgraph-alpha-0

Thanks, that’s the right version. Looks like a bug. Can you destroy and recreate that cluster?

That behavior isn’t reliable anyway. I gonna move your issue to Dgraph. Cuz it isn’t a Helm issue.

I recreate one, but still failed

Can you tell details about your context? I see that you are using macOS. There is a ticket for macOS in that same topic. (let me find it) This one LRU memory in Alpha server by default set to a negative value in MacOS

Yes. I am using MacOS too

zhouqiang@MacBook-Pro-3 ~ % uname -a
Darwin MacBook-Pro-3.local 19.5.0 Darwin Kernel Version 19.5.0: Tue May 26 20:41:44 PDT 2020; root:xnu-6153.121.2~2/RELEASE_X86_64 x86_64

what about your k8s instance?

here

Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.2", GitCommit:"59603c6e503c87169aea6106f57b9f242f64df89", GitTreeState:"clean", BuildDate:"2020-01-18T23:30:10Z", GoVersion:"go1.13.5", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.2", GitCommit:"59603c6e503c87169aea6106f57b9f242f64df89", GitTreeState:"clean", BuildDate:"2020-02-07T01:05:17Z", GoVersion:"go1.13.5", Compiler:"gc", Platform:"linux/amd64"}

Not exactly the version you are in. I mean, how did you install it. Is this via Docker k8s? is it a virtual machine? is it any specific macOS implementation?

I install it by kind(kubernetes in docker)

And you are certainly using a native Docker installation. So this issue is exactly the same as LRU memory in Alpha server by default set to a negative value in MacOS

So, subscribe to that issue and add a comment referencing this topic. As this one is a duplicated.

BTW, what I recommend for you for now is to clone the repository. GitHub - dgraph-io/charts: Helm charts for Dgraph

Go to this line bellow and add the --lru_mb flag manually.

@zhouqiang-cl This is a bug, fixing at this moment.

The workaround is two options for immediate fix. With current dgraph-0.0.8 helm chart, you can do this (bash) to create a values file with the needed property.

cat <<-EOF > my_values.yaml
alpha:
  configFile:
    config.properties: |
      lru_mb=2048

EOF

helm install my-release --values my_values.yaml dgraph/dgraph

Alternatively, you can use the previous chart:

helm install my-release dgraph/dgraph --version 0.0.7

Hello.

This is fix in the latest version of the dgraph helm chart:

You can do a helm repo update to pull the latest version dgraph-0.0.9.

1 Like

Got, I will test it, thank you for your quick fix