mayastor
mayastor copied to clipboard
Volume/nexus/info entry remain even after deleting the volume
Describe the bug A clear and concise description of what the bug is.
One of the entry in etcd remains after deleting the app and pvc/pv
To Reproduce Steps to reproduce the behavior:
- Install the app
- Note down the etcd key values
- Delete the app and ensure pvc is also deleted (reclaim policy delete)
- Check the etcd key values. Note, all key values are deleted except the below one. /namespace/mayastor/volume/cf7eb7fe-1a91-4b25-9546-181a222cf69b/nexus/66e60328-1cb8-4851-bf33-94645c58dcdb/info
Expected behavior A clear and concise description of what you expected to happen. I think this must also be removed since user has removed everything include the volume
Screenshots If applicable, add screenshots to help explain your problem.
** OS info (please complete the following information):**
- Distro: [e.g. NixOS]
- Kernel version
- MayaStor revision or container image
Additional context Add any other context about the problem here.
@hasethuraman, without delving into the code I suspect we're only clearing the volume spec and not the entire volume entry when we delete a volume, we should definitely do it, good catch thanks.
@mittachaitu did we discuss that the advantage of retaining this entry?
Synced up with @mittachaitu. Please ignore my earlier comment. There is no benefit.
@mittachaitu did we discuss that the advantage of retaining this entry?
May I know if I can pick up this and try providing a fix?
Hey @hasethuraman sorry I completely forgot about this. I just tested this, it's pretty bad! The problem is that volume destroy only deletes the info if the target exists: control-plane/agents/src/bin/core/volume/operations.rs:165 -.- If you want to pick this up please go ahead, but if don't have time please let me know as we probably want to fix this for the next release. Thanks!
Thanks @tiagolobocastro. Let me try and see if I can get a PR by next week. Hope that works.
That'd be great, thank you!
Forgot to close this, fixed by @hasethuraman :)