Skip to content
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

[FEATURE REQUEST] In Epiphany 2.0.0 StatefulSet 'rabbitmq-cluster' is not set up for persistence #1485

Closed
toszo opened this issue Jul 24, 2020 · 4 comments

Comments

@toszo
Copy link
Contributor

toszo commented Jul 24, 2020

Describe the bug
StatefulSet's "volumeMounts" should use "volumeClaimTemplates", like in this Kubernetes doc https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/ or in this example https://gist.github.com/pmint93/cb87c5f46502ce8047a084238cad03e4, to mount "/var/lib/rabbitmq/mnesia" to a PersistentVolume.
At the moment, all that's configured is a volume of type configMap, that injects RMQ configuration into the running container, and that's not enough to avoid losing RMQ configuration and data when the RMQ pod gets moved or the node hosting the RMQ pod gets shut down.

To Reproduce

  1. Create Epiphany with RabbitMQ cluster on top of K8s
  2. Add users, permissions, etc. to RMQ
  3. Shut down Kubernetes nodes that host the RMQ pods, then restart them.
  4. Result: any RMQ configuration done on top of the default one, and all the RMQ data are lost.

Expected behavior
Data on RabbitMQ should be persistent and work between restarts.

Config files
If applicable, add config files to help explain your problem.

OS (please complete the following information):

  • OS: [e.g. RHEL7]

Additional context
Teams request, EP-118

Suggestion from creator

So in the StatefulSet configuration, in addition to this:
volumeMounts:

mountPath: /etc/rabbitmq
name: config-volume
volumes:

configMap:
defaultMode: 420
items:
- key: rabbitmq.conf
path: rabbitmq.conf
- key: enabled_plugins
path: enabled_plugins
name: rabbitmq-config
name: config-volume

add something like this (dependent on storage provider):
volumeMounts:

name: rabbitmq-data
mountPath: /var/lib/rabbitmq/mnesia
volumeClaimTemplates:

metadata:
name: rabbitmq-data
annotations:
volume.beta.kubernetes.io/storage-class: gp2
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 4Gi

@toszo
Copy link
Contributor Author

toszo commented Jul 24, 2020

Consider using helm chart for this issue.

@mkyc
Copy link
Contributor

mkyc commented Jul 24, 2020

This is duplicate of #1486. @toszo I'd like to close this task and add comment about more context to that another one. Is that ok?

@toszo
Copy link
Contributor Author

toszo commented Jul 24, 2020

Sounds good.

@mkyc mkyc closed this as completed Jul 24, 2020
@seriva seriva changed the title In Epiphany 0.6.0 StatefulSet 'rabbitmq-cluster' is not set up for persistence [FEATURE REQUEST] In Epiphany 2.0.0 StatefulSet 'rabbitmq-cluster' is not set up for persistence Apr 20, 2022
@seriva
Copy link
Collaborator

seriva commented Apr 20, 2022

Closing as all information was moved to #1486

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants