AmadeusITGroup / Redis-Operator

Redis Operator creates/configures/manages Redis clusters atop Kubernetes
MIT License
167 stars 62 forks source link

redis fail to start with `unknown flag: --max-memory-policy` error #29

Closed bluebenno closed 5 years ago

bluebenno commented 5 years ago

getting unknown flag: --max-memory-policy on redis startup. Please say, if I have missed something or are doing something wrong.

$ git clone https://github.com/AmadeusITGroup/Redis-Operator.git

$ git rev-parse HEAD e3484d9c44af945a9953737f30dcf048b83bf9ac

$ helm install --name op chart/redis-operator

$ cd chart/redis-cluster $ helm install --name mycluster . --set numberOfMaster=3 --set replicationFactor=1

NAME:   mycluster
LAST DEPLOYED: Sat Sep 22 12:05:17 2018
NAMESPACE: default
STATUS: DEPLOYED

RESOURCES:
==> v1beta1/ClusterRole
NAME        AGE
redis-node  0s

==> v1beta1/ClusterRoleBinding
NAME        AGE
redis-node  0s

==> v1/ServiceAccount
NAME        SECRETS  AGE
redis-node  1        0s

==> v1alpha1/RedisCluster
NAME       AGE
mycluster  0s

$ kubectl get pods

op-redis-operator-54d86fd856-fxhf5   1/1       Running            0          35m
rediscluster-mycluster-qm2fq         0/1       CrashLoopBackOff   1          14s```

$ kubectl logs rediscluster-mycluster-qm2fq```
Program started at: 2018-09-22 02:05:35.620877372 +0000 UTC m=+0.065421591
BUILDTIME=2018-07-03/17:42:00
TAG=latest
COMMIT=695c49903eceee361c910c007ca9bc63ca99fbd0
VERSION=0.1.0
unknown flag: --max-memory-policy
Usage of /redisnode:
      --alsologtostderr                  log to standard error as well as files (default false)
      --bin string                       redis server binary file name (default "redis-server")
      --c string                         redis config file path (default "/redis-server/redis.conf")

<snip>```

$ grep resources values.yaml
```resources: {}
  # We usually recommend not to specify default resources and to leave this as a conscious
  # resources, such as Minikube. If you do want to specify resources, uncomment the following
  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.```

```$ minikube version
minikube version: v0.28.2

helm version
Client: &version.Version{SemVer:"v2.9.1", GitCommit:"20adb27c7c5868466912eebdf6664e7390ebe710", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.9.1", GitCommit:"20adb27c7c5868466912eebdf6664e7390ebe710", GitTreeState:"clean"}

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.2", GitCommit:"bb9ffb1654d4a729bb4cec18ff088eacc153c239", GitTreeState:"clean", BuildDate:"2018-08-08T16:31:10Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.0", GitCommit:"fc32d2f3698e36b93322a3465f63a14e9f0eaead", GitTreeState:"clean", BuildDate:"2018-03-26T16:44:10Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}
clamoriniere1A commented 5 years ago

Hi @bluebenno ,

Sorry that it didn't work directly as it should be.

I identified the problem: the support of --max-memory-policy is in present in the HEAD but not docker images with the latest tag. By default, the helm chart takes the latest tag. But in your case, you need to overwrite this value by --set image.tag=master.

$ helm install --name op chart/redis-operator --set image.tag=master

$ cd chart/redis-cluster
$ helm install --name mycluster . --set numberOfMaster=3 --set replicationFactor=1 --set image.tag=master

I will improve the situation by setting image.tag=master in the charts value.yaml files on the master branch.

Thank you for trying the redis-operator, let me know if you have any other issue or if you have feedback to give.

bluebenno commented 5 years ago

thanks so much, up and running