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] RabbitMQ needs to be highly available #1486

Closed
20 tasks
toszo opened this issue Jul 24, 2020 · 9 comments
Closed
20 tasks

[FEATURE REQUEST] RabbitMQ needs to be highly available #1486

toszo opened this issue Jul 24, 2020 · 9 comments

Comments

@toszo
Copy link
Contributor

toszo commented Jul 24, 2020

Is your feature request related to a problem? Please describe.
When RabbitMQ is deployed as pods inside the Kubernetes cluster teh application needs RMQ to be highly available and not lose configuration or data when pods are moved, or VMs restarted, or cluster restored for backup/restore or DR activities.

Describe the solution you'd like
RabbitMQ clustered and replicated.

Describe alternatives you've considered
None

Additional context
Teams request, EP-112
More context from duplicate issue #1485 in comments below.


DoD checklist

  • Changelog
    • updated
    • not needed
  • COMPONENTS.md
    • updated
    • not needed
  • Schema
    • updated
    • not needed
  • Backport tasks
    • created
    • not needed
  • Documentation
    • added
    • updated
    • not needed
  • Feature has automated tests
  • Automated tests passed (QA pipelines)
    • apply
    • upgrade
    • backup/restore
  • Idempotency tested
  • All conversations in PR resolved
  • Solution meets requirements and is done according to design doc
  • Usage compliant with license
@toszo
Copy link
Contributor Author

toszo commented Jul 24, 2020

May be related and resolved similat to #1485

@mkyc
Copy link
Contributor

mkyc commented Jul 24, 2020

@seriva as far as I understand this task it depends on whole #1455 epic. We need to have persistence layer in k8s first. Am I right?

@toszo
Copy link
Contributor Author

toszo commented Jul 24, 2020

Looks like. Added dependency.

@mkyc
Copy link
Contributor

mkyc commented Jul 24, 2020

Added section "More context is provided also in duplicate task #1485" to issue description.

@rafzei rafzei changed the title RabbitMQ needs to be highly available [FEATURE REQUEST] RabbitMQ needs to be highly available Jul 29, 2020
@rafzei rafzei added the source/jira This task origins from internal JIRA label Nov 23, 2020
@Harshini097t
Copy link

Hello Team, I was looking into this issue and wondering is it still something that is to be addressed? In that case what is expected to be done for it.

@seriva
Copy link
Collaborator

seriva commented Apr 8, 2022

#1455 is almost completed which would make this possible. If there is a need for it we can consider it.

@seriva
Copy link
Collaborator

seriva commented Apr 20, 2022

Adding comment from #1485 so we can close that one:

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

Create Epiphany with RabbitMQ cluster on top of K8s
Add users, permissions, etc. to RMQ
Shut down Kubernetes nodes that host the RMQ pods, then restart them.
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

@seriva
Copy link
Collaborator

seriva commented May 20, 2022

We need to check this with outstanding pull #3122. @Harshini097t could you check if this is what you are working on?

@seriva
Copy link
Collaborator

seriva commented Nov 16, 2022

Not going todo anymore feature requests for Epiphany.

@seriva seriva closed this as completed Nov 16, 2022
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

5 participants