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

Mayastor is removing volumes with set persistentVolumeReclaimPolicy Retain #1787

Open
fara-tode opened this issue Dec 18, 2024 · 4 comments
Open

Comments

@fara-tode
Copy link

Describe the bug
when setting pv with Retain and delete this pv afterwards, mayastor is removing completely this volume.
This is not happening on my other installations of mayastor, also was not occuring on this installation but one day it just started.

To Reproduce

create pvc
kubectl patch pv pv-123213  -p '{"spec":{"persistentVolumeReclaimPolicy":"Retain"}}'
kubectl delete pvc ...
kubetcl delete pv pv-123213

It may be hard to reproduce, as it just started one day to occur on one of my mayastor deployment.

Expected behavior
When PV with retain is deleted, data is not be deleted from mayastor.

Screenshots
If applicable, add screenshots to help explain your problem.

** OS info (please complete the following information):**
Distro: Ubuntu 24.04.1 LTS
Kernel version: 6.8.0-47-generic
MayaStor revision or container image: openebs.io/version=2.7.0

Additional context
adding dump from working and nonworking installation.

mayastor-2024-12-18--13-39-19-UTC-notwork.tar.gz
mayastor-2024-12-18--13-42-41-UTC-work.tar.gz

@tiagolobocastro
Copy link
Contributor

If you delete the PV then yes we are also deleting the corresponding mayastor volume IIRC.

Is there any reason why you'd want to keep the mayastor volume when PV is deleted? We could provide a way of disabling this behavior.

@fara-tode
Copy link
Author

fara-tode commented Dec 19, 2024

Yes, i want to change node affinity on pv definition. So i'd like to remove it, then recreate it, but when is set to retain I expect the data will not be deleted from maya.

And that is pretty weird that it was not removed before, and it is not on my other clusters, but now it is on one.

@tiagolobocastro
Copy link
Contributor

Looks like it runs on a 10 minute timer by default, so it might explain why you haven't seen it before.
This was mainly used as a work around for a K8s bug which I believe has been fixed now so I suggest we make this disabled by default and configurable via helm just in case.
Maybe we can get this in for v2.7.2

@fara-tode
Copy link
Author

I don't think that 10min timer is a case as the volume from mayastor is removed within second every time.

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

No branches or pull requests

2 participants