Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

[stable/redis-ha] Update redis image + Fix persistance volume claim #2543

Merged
merged 8 commits into from
Oct 27, 2017

Conversation

smileisak
Copy link
Contributor

@smileisak smileisak commented Oct 21, 2017

Update default redis image used within this chart. Related with these issues #2527, #2394

quay.io/smile/redis:4.0.2

Dockerfile can be found here.

And fix Persistance Volume Claim name to enable persistance correctly. Related with these issues:
#2539, #2386

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 21, 2017
@k8s-ci-robot
Copy link
Contributor

Hi @smileisak. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Oct 21, 2017
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Oct 21, 2017
@smileisak smileisak changed the title [stable/redis-ha] Update redis image [stable/redis-ha] Update redis image + Fix persistance volume claim Oct 23, 2017
@esvirskiy
Copy link

Hi @smileisak,

Are you saying that Persistence should now work with image quay.io/smile/redis:4.0.2? I just checked and it does not.

@smileisak
Copy link
Contributor Author

smileisak commented Oct 24, 2017

@esvirskiy Statefulset was pointing to a wrong pvc
Changes were made here and here.

@esvirskiy
Copy link

@smileisak So helm install --set replicas.master=1 --set replicas.slave=3 --set persistentVolume.enabled=true --set redis_imae=quay.io/smile/redis:4.0.2 stable/redis-ha should work? I just tested and it still fails with the same errors as from #2539

@smileisak
Copy link
Contributor Author

@esvirskiy While this PR not merged, it will not work !
@viglesiasce can you please review this PR ?

@esvirskiy
Copy link

ah, understood!

@fastjames
Copy link

@smileisak I am having a slightly different problem when I try to use this chart with your changes: the persistentVolumeClaim in redis-deployment.yaml has the same name as the pvc in redis-master-statefulset.yaml. When the redis node tries to attach the volume it has already been attached to another node and so the operation fails. Is there some accessMode or other configuration that fixes this when you run it? Here's a log entry from the redis-ha pod:

6m 6m 1 {controller-manager } Warning FailedMount Failed to attach volume "pvc-dc74d4a6-bcdb-11e7-b773-127b619127fe" on node "ip-172-20-123-234.ec2.internal" with: Error attaching EBS volume "vol-0734c17871f7d4198" to instance "i-0420cc6c734c0b9e8": VolumeInUse: vol-0734c17871f7d4198 is already attached to an instance

@viglesiasce
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Oct 26, 2017



redis_image: quay.io/smile/redis:4.0.2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add the source of this image in the sources of the Chart.yaml?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@viglesiasce viglesiasce merged commit 5a636b1 into helm:master Oct 27, 2017
fabiormoura added a commit to fabiormoura/charts that referenced this pull request Oct 28, 2017
* upstream/master: (132 commits)
  [stable/spinnaker] use the /health endpoint instead of /env (helm#2608)
  [stable/concourse] bump dependency postgresql 0.8.3 (helm#2391)
  [stable/redis-ha] fix: sentinel depl should use resources.sentinel (helm#2468)
  [stable/redis-ha] Update redis image + Fix  persistance volume claim  (helm#2543)
  redis-ha: Fix broken link to k8s.io docs (helm#2418)
  Adding docs on supported Kubernetes versions (helm#2581)
  [stable/traefik] Bump Traefik version to 1.4.1 (helm#2589)
  [stable/parse] Release 0.2.8 (helm#2593)
  [stable/redis] Release 1.0.1 (helm#2592)
  [stable/phabricator] Release 0.4.26 (helm#2584)
  [stable/odoo] Release 0.5.15 (helm#2558)
  [stable/ghost] Release 1.0.7 (helm#2575)
  Adding @scottrigby and @mattfarina to OWNERS (helm#2580)
  Adjusting ingress record to better support TLS (helm#2484)
  [stable/redis] release 1.0.0 (helm#2380)
  Updated the NOTES for istio. (helm#2438)
  [stable/redmine] Release 2.0.1 (helm#2490)
  [stable/mariadb] Update to mariadb non-root image (helm#2423)
  Update CI to use Helm 2.6.2 (helm#2405)
  update kubernetes-dashboard image version to v1.7.1 (helm#2514)
  ...
@esvirskiy
Copy link

esvirskiy commented Oct 31, 2017

I just tested and I am seeing the exact same issues when using persistent volume claim.

$ helm install --set replicas.master=1 --set replicas.slave=3 --set persistentVolume.enabled=true stable/redis-ha
NAME:   hoping-termite
LAST DEPLOYED: Tue Oct 31 11:19:03 2017
NAMESPACE: default
STATUS: DEPLOYED

RESOURCES:
==> v1/PersistentVolumeClaim
NAME                         STATUS   VOLUME  CAPACITY  ACCESSMODES  STORAGECLASS  AGE
hoping-termite-redis-ha-pvc  Pending  gp2     1s

==> v1/Service
NAME                     CLUSTER-IP     EXTERNAL-IP  PORT(S)    AGE
redis-sentinel           100.67.84.157  <none>       26379/TCP  0s
hoping-termite-redis-ha  100.66.78.145  <none>       6379/TCP   0s

==> v1beta1/Deployment
NAME                              DESIRED  CURRENT  UP-TO-DATE  AVAILABLE  AGE
hoping-termite-redis-ha           3        3        3           0          0s
hoping-termite-redis-ha-sentinel  3        3        3           0          0s

==> v1beta1/StatefulSet
NAME                            DESIRED  CURRENT  AGE
hoping-termite-redis-ha-master  1        1        0s


NOTES:
Redis cluster can be accessed via port 6379 on the following DNS name from within your cluster:
hoping-termite-redis-ha.default.svc.cluster.local

To connect to your Redis server:

1. Run a Redis pod that you can use as a client:

   kubectl exec -it hoping-termite-redis-ha-master-0 bash

2. Connect using the Redis CLI:

  redis-cli -h hoping-termite-redis-ha.default.svc.cluster.local

screen shot 2017-10-31 at 11 20 50 am

@jalberto
Copy link

jalberto commented Nov 1, 2017

I have troubles with latest version too @smileisak
looks like slave and master are trying to mount same PVC

@burd0047
Copy link

burd0047 commented Nov 6, 2017

having the same issue.

@esvirskiy
Copy link

Bump?

@smileisak
Copy link
Contributor Author

smileisak commented Nov 8, 2017

Sorry guys, I was not available this periode of time, i started migrating the slave deployment to statefulset and creating 2 persistant volume claims for master and slave components. It will be available soon..

@esvirskiy
Copy link

will this ever be fixed?

@smileisak
Copy link
Contributor Author

@esvirskiy yes it was fixed

@esvirskiy
Copy link

I'm still seeing issues when persistent volume is enabled.

My command:
$ helm install --set replicas.master=1 --set replicas.slave=3 --set persistentVolume.enabled=true stable/redis-ha

Screenshot:

screen shot 2017-11-20 at 2 09 43 pm

@esvirskiy
Copy link

@smileisak is the command above incorrect? How do I enable persistent volume?

@icelynjennings
Copy link

Hi, there are still some scaling issues with the PVCs, they appear not to scale:

  • 1 PVC is created for the masters' StatefulSet, instead of 1 per replica
  • 1 PVC is created for the slaves' StatefulSet, instead 1 per replica

As mentioned in #2386 (comment) it looks like the PVCs have to be modified to use volumeClaimTemplates

As a consequence, only one master / slave are able to start, see pictures below

screenshot-2017-11-28 workloads - kubernetes dashboard

screenshot-2017-11-28 persistent volume claims - kubernetes dashboard

screenshot-2017-11-28 stateful sets - kubernetes dashboard

@renaudguerin
Copy link

Hi, is anyone working on the necessary changes mentioned above ?

@esvirskiy
Copy link

How can I enable PersistentVolume? I have

persistentVolume:
  ## If true, redis will create/use a Persistent Volume Claim
  ## If false, use emptyDir
  ##
  enabled: true

but

 $ kubectl get pods
NAME                                                    READY     STATUS    RESTARTS   AGE
estranged-heron-kubernetes-dashboard-6b6b9bdc87-2sdg2   1/1       Running   0          9m
redis-test-redis-ha-sentinel-846dbb8999-6vk8r           1/1       Running   0          6m
redis-test-redis-ha-sentinel-846dbb8999-dhzw4           1/1       Running   0          6m
redis-test-redis-ha-sentinel-846dbb8999-l8v9m           1/1       Running   0          6m
redis-test-redis-ha-server-6d5cdf675c-lqxfh             1/1       Running   4          6m
redis-test-redis-ha-server-6d5cdf675c-lwtfq             1/1       Running   4          6m
redis-test-redis-ha-server-6d5cdf675c-z5x6h             1/1       Running   4          6m
 $ kubectl get pvc
No resources found.

@smileisak
Copy link
Contributor Author

@ianmaddox can you take a look ;)

@esvirskiy
Copy link

@ianmaddox pretty please? :)

@esvirskiy
Copy link

Got redis-ha to use PVC but it does not work...


$ helm install --set replicas.master=1 --set replicas.slave=2 --set persistentVolume.enabled=true --name=whatever stable/redis-ha
NAME:   whatever
LAST DEPLOYED: Tue Mar  6 12:06:47 2018
NAMESPACE: default
STATUS: DEPLOYED

RESOURCES:
==> v1/PersistentVolumeClaim
NAME                   STATUS  VOLUME                                    CAPACITY  ACCESSMODES  STORAGECLASS  AGE
whatever-redis-ha-pvc  Bound   pvc-c1599d54-2160-11e8-b233-08002741a5b2  2Gi       RWO          standard      1s

==> v1/Service
NAME               CLUSTER-IP     EXTERNAL-IP  PORT(S)    AGE
redis-sentinel     10.111.25.244  <none>       26379/TCP  1s
whatever-redis-ha  10.107.53.212  <none>       6379/TCP   1s

==> v1beta1/Deployment
NAME                        DESIRED  CURRENT  UP-TO-DATE  AVAILABLE  AGE
whatever-redis-ha           2        2        2           0          1s
whatever-redis-ha-sentinel  3        3        3           0          1s

==> v1beta1/StatefulSet
NAME                      DESIRED  CURRENT  AGE
whatever-redis-ha-master  1        1        1s


NOTES:
Redis cluster can be accessed via port 6379 on the following DNS name from within your cluster:
whatever-redis-ha.default.svc.cluster.local

To connect to your Redis server:

1. Run a Redis pod that you can use as a client:

   kubectl exec -it whatever-redis-ha-master-0 bash

2. Connect using the Redis CLI:

  redis-cli -h whatever-redis-ha.default.svc.cluster.local

$ kubectl get pvc
NAME                    STATUS    VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
whatever-redis-ha-pvc   Bound     pvc-c1599d54-2160-11e8-b233-08002741a5b2   2Gi        RWO            standard       7m

screen shot 2018-03-06 at 12 13 21 pm

@ianmaddox
Copy link
Contributor

Hey all. I've spent a little time with this but got hung up by the RBAC changes. More soon.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants