ceph / ceph-csi

CSI driver for Ceph
Apache License 2.0
1.19k stars 527 forks source link

Can we share VolumeLocks for NodeServer/ControllerServer? #4648

Open iPraveenParihar opened 1 month ago

iPraveenParihar commented 1 month ago
          lets discuss on this one and we need to see can what will happen when we try to do nodeserver operations like (expand/umount) etc when the fstrim is going on can it leads to corruption etc. based on that we can have central/shared locking. Is it allowed to expand or remove the image when the ControllerReclaimOperation is going on etc.

_Originally posted by @Madhu-1 in https://github.com/ceph/ceph-csi/pull/4641#discussion_r1616758500_

nixpanic commented 4 weeks ago

lets discuss on this one and we need to see can what will happen when we try to do nodeserver operations like (expand/umount) etc when the fstrim is going on can it leads to corruption etc. based on that we can have central/shared locking.

I do not think this can cause corruption. If so, it is a bug in the filesystem.

Is it allowed to expand or remove the image when the ControllerReclaimOperation is going on etc.

  1. expanding should be allowed, but maybe RBD prevents running both operations at the same time?
  2. while ControllerReclaim is running, the image is open, so deleting it may not be possible (and the CO should retry with backoff)
Madhu-1 commented 4 weeks ago

lets discuss on this one and we need to see can what will happen when we try to do nodeserver operations like (expand/umount) etc when the fstrim is going on can it leads to corruption etc. based on that we can have central/shared locking.

I do not think this can cause corruption. If so, it is a bug in the filesystem.

Is it allowed to expand or remove the image when the ControllerReclaimOperation is going on etc.

  1. expanding should be allowed, but maybe RBD prevents running both operations at the same time?
  2. while ControllerReclaim is running, the image is open, so deleting it may not be possible (and the CO should retry with backoff)

@nixpanic yes once we test these things and decide letter on!