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

Persistent disks deleted after redeploying Memgraph #68

Closed
Josipmrden opened this issue Nov 4, 2024 · 2 comments · Fixed by #83
Closed

Persistent disks deleted after redeploying Memgraph #68

Josipmrden opened this issue Nov 4, 2024 · 2 comments · Fixed by #83
Assignees
Labels
memgraph Memgraph standalone issue memgraph-ha Memgraph HA chart issue

Comments

@Josipmrden
Copy link
Contributor

Some helm chart functionality seems to delete the persistent disks after redeploying Memgraph (stateful set). More info coming.

@matkob
Copy link
Contributor

matkob commented Nov 6, 2024

The issue is about the PersistentVolume Reclaim Policy that is used by the charts. Current default behaviour deletes the precious volumes the moment the PersistentVolumeClaim is deleted. This is quite risky and in my setup it proved to cause some data loss.

It's not an obvious bug on memgraph side but it's definitely an area for improvement. The setup should be robust enough to survive some mistakes on user side. And this can be easily achieved by changing that default reclaim policy. I'd suggest to set it to Retain by default and allow users to change it through Helm values. Worst case scenario, users will have to delete the volumes by hand which is much better "side effect" than loosing the data.

More information on this topic:
https://kubernetes.io/docs/concepts/storage/persistent-volumes/#reclaim-policy
https://kubernetes.io/docs/tasks/administer-cluster/change-pv-reclaim-policy/

@antejavor
Copy link
Collaborator

Hi @matkob, thanks for providing this feedback.

This is quite reasonable, I agree with the reasoning, and we will include it in the next release of charts. 🦾

@antejavor antejavor self-assigned this Nov 7, 2024
@antejavor antejavor added this to the Memgraph-2.22.0 milestone Nov 20, 2024
@antejavor antejavor added memgraph-ha Memgraph HA chart issue memgraph Memgraph standalone issue labels Nov 20, 2024
@antejavor antejavor linked a pull request Nov 26, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
memgraph Memgraph standalone issue memgraph-ha Memgraph HA chart issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants