zfs-localpv/pkg
Pawan d57976e483 fix(zfspv): fixing data loss in case of pod deletion
looks like a bug in ZFS as when you change the mountpoint property to none,
ZFS automatically umounts the file system. When we delete the pod, we get the
unmount request for the old pod and mount request for the new pod. Unmount
is done by the driver by setting mountpoint to none and the driver assumes that
unmount has done and proceeded to delete the mountpath, but here zfs has not unmounted
the dataset

```
$ sudo zfs get all zfspv-pool/pvc-3fe69b0e-9f91-4c6e-8e5c-eb4218468765 | grep mount
zfspv-pool/pvc-3fe69b0e-9f91-4c6e-8e5c-eb4218468765  mounted               yes                                                                                                -
zfspv-pool/pvc-3fe69b0e-9f91-4c6e-8e5c-eb4218468765  mountpoint            none                                                                                               local
zfspv-pool/pvc-3fe69b0e-9f91-4c6e-8e5c-eb4218468765  canmount              on
```

here, the driver will assume that dataset has been unmouted and proceed to delete the
mountpath and it will delete the data as part of cleaning up for the NodeUnPublish request.

Shifting to use zfs umount instead of doing zfs set mountpoint=none for umounting the dataset.
Also the driver is using os.RemoveAll which is very risky as it will clean
child also, since the mountpoint is not supposed to have anything,
just os.Remove is sufficient and it will fail if there is anything there.

Signed-off-by: Pawan <pawan@mayadata.io>
2020-04-22 23:49:30 +05:30
..
apis/openebs.io/zfs/v1alpha1 feat(validation): adding validation for ZFSPV CR parameters (#66) 2020-04-14 17:26:46 +05:30
builder feat(crd-gen): automate the CRDs generation with validations for APIs (#75) 2020-04-01 17:54:20 +05:30
client/k8s/v1alpha1 feat(analytics): adding google analytics for ZFSPV 2020-03-02 23:00:22 +05:30
common feat(analytics): adding google analytics for ZFSPV 2020-03-02 23:00:22 +05:30
config feat(zfs-localpv): initial commit 2019-09-18 08:44:08 +05:30
driver feat(zfspv): adding poolname info to the PV volumeattributes (#80) 2020-04-14 08:46:35 +05:30
generated feat(crd-gen): automate the CRDs generation with validations for APIs (#75) 2020-04-01 17:54:20 +05:30
mgmt feat(crd-gen): automate the CRDs generation with validations for APIs (#75) 2020-04-01 17:54:20 +05:30
response feat(resize): adding Online volume expansion support for ZFSPV 2020-03-04 18:30:28 +05:30
usage feat(analytics): adding google analytics for ZFSPV 2020-03-02 23:00:22 +05:30
version feat(analytics): adding google analytics for ZFSPV 2020-03-02 23:00:22 +05:30
zfs fix(zfspv): fixing data loss in case of pod deletion 2020-04-22 23:49:30 +05:30