mayastor icon indicating copy to clipboard operation
mayastor copied to clipboard

Volume/nexus/info entry remain even after deleting the volume

Open hasethuraman opened this issue 2 years ago • 3 comments

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:

  1. Install the app
  2. Note down the etcd key values
  3. Delete the app and ensure pvc is also deleted (reclaim policy delete)
  4. 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 avatar Jul 14 '22 07:07 hasethuraman

@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.

tiagolobocastro avatar Jul 19 '22 13:07 tiagolobocastro

@mittachaitu did we discuss that the advantage of retaining this entry?

hasethuraman avatar Aug 02 '22 11:08 hasethuraman

Synced up with @mittachaitu. Please ignore my earlier comment. There is no benefit.

@mittachaitu did we discuss that the advantage of retaining this entry?

hasethuraman avatar Aug 02 '22 12:08 hasethuraman

May I know if I can pick up this and try providing a fix?

hasethuraman avatar Mar 31 '23 10:03 hasethuraman

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!

tiagolobocastro avatar Mar 31 '23 10:03 tiagolobocastro

Thanks @tiagolobocastro. Let me try and see if I can get a PR by next week. Hope that works.

hasethuraman avatar Mar 31 '23 11:03 hasethuraman

That'd be great, thank you!

tiagolobocastro avatar Mar 31 '23 11:03 tiagolobocastro

Forgot to close this, fixed by @hasethuraman :)

tiagolobocastro avatar Jan 20 '24 21:01 tiagolobocastro