Apparently it is wrong to assume that `DeleteVolume` gets called
only after `UnstageVolume` returns success. This was causing the
disk image file to be deleted while the volume was still mounted.
This would prevent the loop device from getting detached and in
turn disk space from getting reclaimed.
Since remote tasks might get a bit longer to get scheduled, it's
reasonable to increase this timeout. Specifically, we faced an
issue with a `DeleteVolume` action timing out over and over since
it was running a bit over the default timeout.
The default root subvol comes with its own limitations and it might be
better off changing the default subvol upon creation. This should also
let us create hidden subvols that may be used for storing snapshots,
without exposing them to the end-user.
PVCs are data volumes most of the times, and reserving space for system
tasks is probably unnecessary.
The user can still modify a specific PVC's reserved blocks through the
`tune2fs` command.
Summary: So that it's possible to use it with any other blockdevice provider.
Test Plan: N/A
Reviewers: sina_rad, h.marvi, mhyousefi, s.afshari
Differential Revision: https://phab.hamravesh.ir/D870
Test Plan:
- Deploy using `feature-fstype` image tag
- Create the following storage class:
```
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: btrfs-sc
parameters:
fsType: btrfs
provisioner: rawfile.hamravesh.com
reclaimPolicy: Delete
volumeBindingMode: WaitForFirstConsumer
allowVolumeExpansion: true
```
- Create and use a pvc backed by the new storage class
- Exec into the pod and verify that the mounted volume is a `btrfs` filesystem indeed
Reviewers: h.marvi, sina_rad, mhyousefi, bghadiri
Reviewed By: h.marvi, mhyousefi, bghadiri
Differential Revision: https://phab.hamravesh.ir/D833
Summary: Trying to add custom `fsType`s, new metadata fields need to be stored. We need a mechanism to migrate existing volume metadata.
Test Plan:
- Install the chart using an older image tag like `36fc480`
- Create and use a pvc
- Verify that the volume's metadata file, located at `/var/csi/rawfile/pvc-.../disk.meta` does not contain the `schema_version` field
- Upgrade the chart to use the image tag `feature-schema-migration`
- Wait until all node pods are upgraded
- Verify that the volume's metadata file contains the new `schema_version` field
Reviewers: bghadiri, h.marvi, mhyousefi, sina_rad
Reviewed By: bghadiri, h.marvi, mhyousefi
Differential Revision: https://phab.hamravesh.ir/D832